Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
In a Qt context, rcc is commonly used to embed resources into binaries. This works by creating a .cpp file containing the resources byte-by-byte in a big char[] (plus some actual code to access it), which is then picked up by the normal buildsystem activities.
This process does not scale, and hit compiler limits for resources bigger than a few megabytes.
To work around this limitation, the "big resources" hack exist: This creates an array of the right size with a 'magic marker' "QRC_DATA" in the beginning and (implicit) \0's at the end. That's no problem for compilers. in the second phase the array of is found by searching for the magic marker and the marker and the \0's are replaced by the actual resource data.
However, this second phase (binary patching) is fragile and does not work at all in some setups, see e.g. https://bugreports.qt.io/browse/QTBUG-41301
Some toolchains have the possibility of embedding binary blobs directly into the output, which is not only more robust but also much faster then the deviation through the .cpp+compilation/
Tasks:
- Investigated whether there is a way to embed binaries for all supported toolchains.
- provide a means in Qt's buildsystem to use direct binary embedding where possible.
Attachments
Issue Links
- is required for
-
QTBUG-41301 2-Pass version of rcc does not work when using link-time optimization
-
- Reported
-