summaryrefslogtreecommitdiffstats
path: root/mkspecs/common
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-11-06 11:23:12 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-11-08 17:00:17 +0100
commit8ffb200153d1b1a8402c875c4961160efb149201 (patch)
treec10b914ba68bc3072a4ce77a4e2d6eaa7ad21563 /mkspecs/common
parent26f8adb1eefd1a8822413e036f2878b8cc1e7029 (diff)
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>
Diffstat (limited to 'mkspecs/common')
-rw-r--r--mkspecs/common/clang-mac.conf1
1 files changed, 1 insertions, 0 deletions
diff --git a/mkspecs/common/clang-mac.conf b/mkspecs/common/clang-mac.conf
index cbae2e6262..143406308c 100644
--- a/mkspecs/common/clang-mac.conf
+++ b/mkspecs/common/clang-mac.conf
@@ -5,6 +5,7 @@ QMAKE_OBJCXXFLAGS_PRECOMPILE = -x objective-c++-header -c ${QMAKE_PCH_INPUT}
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++