qt5base-lts/mkspecs/features/link_ltcg.prf
Thiago Macieira 0f569f5900 Clean up ltcg.prf with variables, including a new static mode
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>
2015-01-11 03:41:48 +01:00

24 lines
958 B
Plaintext

gcc {
!clang:!intel_icc:greaterThan(QMAKE_HOST.cpu_count, 1) {
# Override LTO number of jobs
QMAKE_LFLAGS_LTCG ~= s/^-flto$/-flto=$$QMAKE_HOST.cpu_count/
}
# When doing link-time code generation, we need to pass the compiler
# flags during linking the stage too. This file is processed after
# default_post.prf, so the QMAKE_CXXFLAGS already contains
# QMAKE_CXXFLAGS_DEBUG or _RELEASE.
use_c_linker {
# use_c_linker.prf is in effect, use the C flags
QMAKE_LFLAGS_LTCG += $$QMAKE_CFLAGS $$QMAKE_CFLAGS_LTCG
QMAKE_LFLAGS_APP += $$QMAKE_CFLAGS_APP
QMAKE_LFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB
QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB
} else {
QMAKE_LFLAGS_LTCG = $$QMAKE_CXXFLAGS $$QMAKE_LFLAGS_LTCG
QMAKE_LFLAGS_APP += $$QMAKE_CXXFLAGS_APP
QMAKE_LFLAGS_SHLIB += $$QMAKE_CXXFLAGS_SHLIB
QMAKE_LFLAGS_PLUGIN += $$QMAKE_CFLAGS_SHLIB
}
}