Commit Graph

9 Commits

Author SHA1 Message Date
Simon Hausmann e0add0b655 Fix relocation related errors when loading AOT caches
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>
2017-03-09 08:19:56 +00:00
Simon Hausmann 55e558144d Fix time stamp related errors when loading AOT caches
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>
2017-03-09 08:19:49 +00:00
Simon Hausmann ba6de61acd Fix skipping of qml cache generation on unsupported architectures
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>
2017-03-07 07:06:44 +00:00
Simon Hausmann 1102f6ca7f Fix qmlcachegen command line parameters
Add support for specifying the output file name

Change-Id: I3ec3cecae2334a7640baa928c0739c5521496d2d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-07 07:06:28 +00:00
Robert Loehning ba68c32568 Do not crash when qmlcachegen is called without arguments
Change-Id: Ib91271e0ac365f69e43dfc0981c74dcfd69d6ab3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-02-23 18:23:47 +00:00
Simon Hausmann 7cab0a31de Fix crash when generating cache files
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>
2017-02-08 16:18:13 +00:00
Simon Hausmann 835f8a9038 Allow selecting armv7 as target architecture in qmlcachegen
Change-Id: I36e8f95e83ea3de6553145efc762e3bc46f60071
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-01 11:52:40 +00:00
Simon Hausmann eeb08d9537 Re-do QML type compilation of ahead-of-time generated QML cache files
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>
2017-01-31 17:09:26 +00:00
Simon Hausmann 27c678cea6 Added tool to generate QML cache files
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>
2017-01-31 17:09:15 +00:00