aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/cpp/gcc.js
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2023-12-10 15:32:45 +0300
committerIvan Komissarov <ABBAPOH@gmail.com>2023-12-11 15:41:14 +0000
commite6216e9fcf76264cbb8698fab0c6674c874ec2a2 (patch)
treec2c764b3516368b68eda72325b0adb3416e84c18 /share/qbs/modules/cpp/gcc.js
parente56cbf7b64810ca0fadc8d3ffbc92a5ba1b293a0 (diff)
apple: disable lazy linker mode for Xcode 15
According to the ld man, this mode is deprecated; with clang 15.0.0, it is no longer possible to pass this option via compiler frontend (it treats -lazy_library flag as -l flag and tries to link to "azy_library"). Change-Id: I74a877c359ae3550d372486e055a9b4c3e9be997 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share/qbs/modules/cpp/gcc.js')
-rw-r--r--share/qbs/modules/cpp/gcc.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js
index b60608682..82f6889e4 100644
--- a/share/qbs/modules/cpp/gcc.js
+++ b/share/qbs/modules/cpp/gcc.js
@@ -477,7 +477,10 @@ function linkerFlags(project, product, inputs, outputs, primaryOutput, linkerPat
if (isDarwin && symbolLinkMode) {
if (!["lazy", "reexport", "upward", "weak"].includes(symbolLinkMode))
throw new Error("unknown value '" + symbolLinkMode + "' for cpp.symbolLinkMode");
+ }
+ var supportsLazyMode = Utilities.versionCompare(product.cpp.compilerVersion, "15.0.0") < 0;
+ if (isDarwin && symbolLinkMode && (symbolLinkMode !== "lazy" || supportsLazyMode)) {
if (FileInfo.isAbsolutePath(lib) || lib.startsWith('@'))
escapableLinkerFlags.push("-" + symbolLinkMode + "_library", lib);
else if (dep.framework)