diff options
Diffstat (limited to 'mkspecs/features/ltcg.prf')
-rw-r--r-- | mkspecs/features/ltcg.prf | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf index f2dbc6fa9e..d81f340edd 100644 --- a/mkspecs/features/ltcg.prf +++ b/mkspecs/features/ltcg.prf @@ -1,8 +1,16 @@ -CONFIG(release, debug|release) { +static:no-static-ltcg { + # Static library but no-static-ltcg enabled: skip LTCG +} else: CONFIG(release, debug|release) { + separate_debug_info { + # Evaluate single-$ variable references that have no valid value at mkspec loading time + QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO ~= s/\\$\\{/\$\$\{/ + eval(QMAKE_LFLAGS_LTCG += $$QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO) + } + # We need fat object files when creating static libraries on some platforms # so the linker will know to load a particular object from the library # in the first place. On others, we have special ar and nm to create the symbol - # tables so the linker will know better. For other compilers, we disable LTCG + # tables so the linker will know better. For other compilers, we disable LTCG # for static libraries. msvc { # Nothing to do @@ -22,7 +30,7 @@ CONFIG(release, debug|release) { } } - fat-lto { + fat-lto|if(static:fat-static-lto) { QMAKE_CFLAGS_LTCG += $$QMAKE_CFLAGS_LTCG_FATOBJECTS QMAKE_CXXFLAGS_LTCG += $$QMAKE_CXXFLAGS_LTCG_FATOBJECTS } |