From 636d3a7a2fb782ec8e8ab5517c40b2121fe21d1a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 14 Nov 2024 11:04:11 -0500 Subject: Apple: Backport "Enable linking during iOS toolchain inspection" to 3.31 Backport commit 79a83ddb08 (Apple: Enable linking during iOS/tvOS/visionOS/watchOS toolchain inspection, 2024-11-14, v4.0.0-rc1~471^2) to 3.31. Since commit 11da882a12 (Apple: Introduce separate system name for iOS, tvOS, and watchOS, 2018-01-15, v3.14.0-rc1~14^2~1) our toolchain inspection steps, like ABI detection, tell `try_compile` to use a `STATIC_LIBRARY` instead of an `EXECUTABLE`. This was needed at the time to avoid codesign requirements. However, commit d3a64c4e3f (Xcode: Explicitly turn off signing in try_compile projects, 2020-07-16, v3.19.0-rc1~483^2) introduced a more general solution to that problem. Restore linking during toolchain inspection so that we can detect and identify the linker. Suggested-by: Marc Chevrier Fixes: #26443 --- Modules/Platform/iOS-Initialize.cmake | 2 -- Modules/Platform/tvOS-Initialize.cmake | 2 -- Modules/Platform/visionOS-Initialize.cmake | 2 -- Modules/Platform/watchOS-Initialize.cmake | 2 -- 4 files changed, 8 deletions(-) diff --git a/Modules/Platform/iOS-Initialize.cmake b/Modules/Platform/iOS-Initialize.cmake index 91e3898..2a38bc1 100644 --- a/Modules/Platform/iOS-Initialize.cmake +++ b/Modules/Platform/iOS-Initialize.cmake @@ -5,5 +5,3 @@ if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/(iPhoneOS|iPhoneSimulator|MacOSX)") endif() set(IOS 1) - -set(_CMAKE_FEATURE_DETECTION_TARGET_TYPE STATIC_LIBRARY) diff --git a/Modules/Platform/tvOS-Initialize.cmake b/Modules/Platform/tvOS-Initialize.cmake index 6834c80..f265946 100644 --- a/Modules/Platform/tvOS-Initialize.cmake +++ b/Modules/Platform/tvOS-Initialize.cmake @@ -3,5 +3,3 @@ include(Platform/Darwin-Initialize) if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/AppleTV(OS|Simulator)") message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an tvOS SDK") endif() - -set(_CMAKE_FEATURE_DETECTION_TARGET_TYPE STATIC_LIBRARY) diff --git a/Modules/Platform/visionOS-Initialize.cmake b/Modules/Platform/visionOS-Initialize.cmake index e8431bc..fee7bf3 100644 --- a/Modules/Platform/visionOS-Initialize.cmake +++ b/Modules/Platform/visionOS-Initialize.cmake @@ -3,5 +3,3 @@ include(Platform/Darwin-Initialize) if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/XR(OS|Simulator)") message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an visionOS SDK") endif() - -set(_CMAKE_FEATURE_DETECTION_TARGET_TYPE STATIC_LIBRARY) diff --git a/Modules/Platform/watchOS-Initialize.cmake b/Modules/Platform/watchOS-Initialize.cmake index 2f396d3..e9705ca 100644 --- a/Modules/Platform/watchOS-Initialize.cmake +++ b/Modules/Platform/watchOS-Initialize.cmake @@ -3,5 +3,3 @@ include(Platform/Darwin-Initialize) if(NOT _CMAKE_OSX_SYSROOT_PATH MATCHES "/Watch(OS|Simulator)") message(FATAL_ERROR "${CMAKE_OSX_SYSROOT} is not an watchOS SDK") endif() - -set(_CMAKE_FEATURE_DETECTION_TARGET_TYPE STATIC_LIBRARY) -- cgit v0.12