qt5base-lts/mkspecs/common/clang-mac.conf
Joerg Bornemann 8ffb200153 Fix LTCG linker flags for macOS with separate debug info
The linker must not throw away the lto.o file. We now instruct the
linker to create a non-temporary lto.o, dependent on the target name.

In order to do that we introduce a new mkspec variable
QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO. This variable can contain
single-$ variable references that get evaluated when loading ltcg.prf.

Fixes: QTBUG-72846
Change-Id: I0ea882628d63e5406ba0ee68c7435af597364b0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-08 17:00:17 +01:00

15 lines
657 B
Plaintext

QMAKE_OBJCFLAGS_PRECOMPILE = -x objective-c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvm.clang.1_0
QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO = -Wl,-object_path_lto,${OBJECTS_DIR}/${TARGET}_lto.o
QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_LFLAGS += -stdlib=libc++
QMAKE_AR_LTCG = libtool -static -o
QMAKE_CFLAGS_APPLICATION_EXTENSION = -fapplication-extension