diff options
| author | Olivier De Cannière <olivier.decanniere@qt.io> | 2024-10-30 13:40:55 +0100 |
|---|---|---|
| committer | Olivier De Cannière <olivier.decanniere@qt.io> | 2024-11-04 15:21:09 +0100 |
| commit | 318ac440653a570d2bd18fc3d25e1b2fc8af88fa (patch) | |
| tree | b20109a0333f44538565c69a4d69cd0683495133 /tools/qmlcachegen/qmlcachegen.cpp | |
| parent | 09f51978f4ab03f9dcaa36aba4f0c861f59b890c (diff) | |
aotstats: Support --only-bytecode and modules with no qml files
It is possible to pass --only-bytecode to qmlcachegen. As the name
implies, this only generates the bytecode for the qml files and does not
compile them. This case was not taken into account which could lead to
files commands depend upon not being generated.
Therefore, keep track of empty and only-bytecode modules in files
generated by cmake and pass them to qmlaotstats upon aggregation such
that it can include that information in the report.
Also, only pass the arguments specific to aotstats to qmlcachegen if
--only-bytecode is not set for that module.
Fixes: QTBUG-130084
Task-number: QTBUG-124667
Pick-to: 6.8
Change-Id: I44b4a80e8a6fd2f9bc16ae1bb2c8d540ff3b697b
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tools/qmlcachegen/qmlcachegen.cpp')
| -rw-r--r-- | tools/qmlcachegen/qmlcachegen.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index 3b8fe5bad4..aebca5f2fc 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -257,6 +257,11 @@ int main(int argc, char **argv) error.augment("Error compiling qml file: "_L1).print(); return EXIT_FAILURE; } + + if (parser.isSet(onlyBytecode)) { + QQmlJS::AotStats emptyStats; + emptyStats.saveToDisk(outputFileName + u".aotstats"_s); + } } else { QStringList importPaths; |
