From 9f3c74bfab9b8fdc3dbbf6c3c8176574036cec44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 11 Sep 2023 13:18:25 +0200 Subject: 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.5 Change-Id: I736a891ae102fe1dfb2cdf869f42c665e231adba Reviewed-by: Alexandru Croitor (cherry picked from commit c00b17de6620c9339be39ca35fea98e19951e72f) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtFlagHandlingHelpers.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake index 6784232ca9..4ef1bd7869 100644 --- a/cmake/QtFlagHandlingHelpers.cmake +++ b/cmake/QtFlagHandlingHelpers.cmake @@ -80,6 +80,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() -- cgit v1.2.3