summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/ltcg.prf6
1 files changed, 4 insertions, 2 deletions
diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf
index f2dbc6fa9e..a94f6d0eeb 100644
--- a/mkspecs/features/ltcg.prf
+++ b/mkspecs/features/ltcg.prf
@@ -1,4 +1,6 @@
-CONFIG(release, debug|release) {
+static:no-static-ltcg {
+ # Static library but no-static-ltcg enabled: skip LTCG
+} else: CONFIG(release, debug|release) {
# 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
@@ -22,7 +24,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
}