summaryrefslogtreecommitdiff
path: root/tools/qmlcachegen/qmlcachegen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix support for jsTr() and QT_TR_NOOP in list elements when cachingSimon Hausmann2017-04-061-3/+5
| | | | | | | | | Similar to the Qt Quick Compiler we need to do the expression simplification pass at cache generation time to extract translation calls in list elements. Change-Id: I267fc9647ab82bc83d6b087c06c0036df38238ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix loading of ahead-of-time generated cache files when cross-compilingSimon Hausmann2017-04-061-4/+11
| | | | | | | | | The target ABI is something that we must include correctly at cache generation time. The corresponding qmake variable is available in qtbase now, so we can use that and embed it in the generated data. Change-Id: Icd6e44824f5151535ce9ddac27687b7877288725 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-03-251-6/+2
|\
| * Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-03-151-6/+2
| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmltypecompiler_p.h src/qml/qml/qqmltypeloader.cpp src/qml/qml/qqmltypeloader_p.h Change-Id: I4894555ab7a0879b56bbda7a46d16d1c40c19e7c
* | QHash: use the public functions to set the global hash seedThiago Macieira2017-03-161-2/+2
|/ | | | | | Task-number: QTBUG-47566 Change-Id: I4a7dc1fe14154695b968fffd14abd2e3189c6ad2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix support for enums and translations in list elementsSimon Hausmann2017-03-101-0/+35
| | | | | | | | | | | | | | | QQC uses valid constructs like ListElement { dayOfWeek: Locale.Sunday }, where the enums are resolved at type compilation time. Syntactically Locale.Sunday is a JS expression, but as scripts are not permitted for list elements, we must retain the values in string form when generating the binary (cache) qml representation. This is a forward port of commit 736f4f9c847d1102f6ac77674c831f0555ff445e from the qml compiler, and also matches QTRD-3226. Change-Id: I3e615f224d4ab222a50f3271735cb8f7a24f5f11 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix relocation related errors when loading AOT cachesSimon Hausmann2017-03-091-2/+2
| | | | | | | | | | | | | | | | The original directory of the source file the cache was created from - when generating ahead of time - is unlikely going to be identical to the final location for example on a deployed device. Therefore when generating caches ahead of time, don't store the source path, don't attempt to verify it when loading and don't try to save the cache file at run-time again. We still need set the sourceFileIndex at load-time though, in order to make relative path url resolution work (for example source: "my.png" in an Image element). Change-Id: I3d6952f5d0a165cfa2cb400191a9f6ffe6be69f4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix time stamp related errors when loading AOT cachesSimon Hausmann2017-03-091-2/+0
| | | | | | | | | | | | | | Cache files created ahead of time do not require a timestamp match towards the source file. This is because we cannot guarantee that all transport mechanism from source to deployment preserve the timestamp at the required resolution (if at all) and the source may also not be present at all (obfuscated deployment chosen). For cache files created at run-time however we'll continue to require time stamp verification. Change-Id: Ia7cdf3d063edd5bb1e6985089f1a666c970a0bd0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix skipping of qml cache generation on unsupported architecturesSimon Hausmann2017-03-071-5/+21
| | | | | | | | Detect support for the target architecture at qmake time and gently skip the process. Change-Id: I7cc22a0cfb9a8b503c182062a56e506035f84fa2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qmlcachegen command line parametersSimon Hausmann2017-03-071-7/+15
| | | | | | | Add support for specifying the output file name Change-Id: I3ec3cecae2334a7640baa928c0739c5521496d2d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Do not crash when qmlcachegen is called without argumentsRobert Loehning2017-02-231-1/+3
| | | | | Change-Id: Ib91271e0ac365f69e43dfc0981c74dcfd69d6ab3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash when generating cache filesSimon Hausmann2017-02-081-1/+2
| | | | | | | | | Make sure that the allocator in bootstrap builds really just allocates memory for the generated code and otherwise doesn't try to allocate executable memory. Change-Id: Ic40724903706ae98ef272a028e7d8299400e232b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow selecting armv7 as target architecture in qmlcachegenSimon Hausmann2017-02-011-3/+17
| | | | | Change-Id: I36e8f95e83ea3de6553145efc762e3bc46f60071 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Re-do QML type compilation of ahead-of-time generated QML cache filesSimon Hausmann2017-01-311-0/+1
| | | | | | | | | | As we currently lack the ability to do type resolution at AOT cache generation time, we need to re-do the work after loading the cache file, making us essentially only re-use the code and avoiding the step of parsing. Change-Id: I12844692d4766345d8a313b59d21abf1f868e2d1 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Added tool to generate QML cache filesSimon Hausmann2017-01-311-0/+294
This is an initial preview that will allow generating cache files ahead of time, with some limitations: * There's no support for import dependency resolution * Only ARMv7 is supported as cross-compile target Change-Id: I894237f55ba0c0a71f0ed5dda2ff6f7e5bd6603e Reviewed-by: Lars Knoll <lars.knoll@qt.io>