qt5base-lts/mkspecs/features/link_ltcg.prf

24 lines
958 B
Plaintext
Raw Normal View History

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
}
}