summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/ltcg.prf
Commit message (Collapse)AuthorAgeFilesLines
* Clean up ltcg.prf with variables, including a new static modeThiago Macieira2015-01-111-17/+17
| | | | | | | | | | By using the special "ar" and "ranlib" tools, the symbol table is made visible, so we don't need fat LTO binaries. Since we need to store the new tool names, we may as well clean up ltcg.prf with variable names for the fat mode too. Change-Id: I7e53af0c74a3d069313f38500b72538af1d61128 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Let qmake find the number of processors onlineThiago Macieira2015-01-111-8/+2
| | | | | | | Instead of trying to load in ltcg.prf and cache the value. Change-Id: If485ff68fc6ff9d9cf7009cd72d5e702d0199c7f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix linking of sources without LTCG to a static lib with LTCGThiago Macieira2014-12-011-17/+1
| | | | | | | | | | | | | | | | | | | | Whenever a binary is created and linked against a static lib that was compiled with LTCG, the final linking step requires the compiler flags so that the pre-compiled data in the shared library can get properly compiled. This could happen for a static build of Qt with LTCG, but also happens frequently for Qt's own build when linking regular libraries and applications against QtBootstrap or QtPlatformSupport. The linking fails when the target is a shared library (example: QtWaylandClient linking against QtPlatformSupport). The .prl file actually contains the "ltcg" flag, so the best solution would actually be to process that flag there and add link_ltcg if any dependent .prl has "ltcg", but I couldn't find out how to do that. Change-Id: I4a75a14d1dcb8c2089a427285e25d5555df7d7d3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Make sure plugins under LTCG get the right flags too.Thiago Macieira2014-12-011-0/+2
| | | | | Change-Id: I51384b4c3ceca25b6e010ccf67fa0f1995cfa557 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add link-time optimization support for Clang, GCC and ICCThiago Macieira2014-07-231-0/+54
GCC currently requires fat object files for static libraries, since the linker would otherwise not load the .o file from the archive at all and the linking would fail with a lot of undefined references. Clang on Linux also needs this, but it has no equivalent flag, so enabling LTCG for Clang on static libraries will result in linker error. This commit does not add support for enabling it in configure. It can be enabled on a per-project basis by doing CONFIG += ltcg or by passing -config ltcg to qmake's command-line. Change-Id: I52cf99f1ed9f1701e23a3b457ba3502fd28126ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>