diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-09-11 13:18:25 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-09-12 02:47:24 +0200 |
commit | c00b17de6620c9339be39ca35fea98e19951e72f (patch) | |
tree | 9ce784e7dafd7dc58816dacfdbd0b3d30e8fc0c2 | |
parent | 3cb3c1d9a8e5cfe262be8d6e9800f604d4d48c97 (diff) |
cmake: Don't pass -undefined,error to Apple linker
Error is the default for this option in ld64, and with the new linker
in Xcode 15 the option was deprecated, causing a warning, so let's just
skip adding it and assume undefined symbols results in errors.
Fixes: QTBUG-116732
Pick-to: 6.6 6.5
Change-Id: I736a891ae102fe1dfb2cdf869f42c665e231adba
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | cmake/QtFlagHandlingHelpers.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index 04fb855269..bc393655bb 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -83,6 +83,11 @@ function(qt_internal_add_link_flags_no_undefined target) if (NOT QT_BUILD_SHARED_LIBS OR WASM) return() endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") + # ld64 defaults to -undefined,error, and in Xcode 15 + # passing this option is deprecated, causing a warning. + return() + endif() if ((GCC OR CLANG) AND NOT MSVC) if(CLANG AND QT_FEATURE_sanitizer) return() |