@@ -49,7 +49,7 @@ function(_add_target_variant_c_compile_link_flags)
4949
5050 set (result ${${CFLAGS_RESULT_VAR_NAME} })
5151
52- if ("${CFLAGS_SDK} " IN_LIST SWIFT_APPLE_PLATFORMS )
52+ if ("${CFLAGS_SDK} " IN_LIST SWIFT_DARWIN_PLATFORMS )
5353 # Check if there's a specific OS deployment version needed for this invocation
5454 if ("${CFLAGS_SDK} " STREQUAL "OSX" )
5555 if (DEFINED maccatalyst_build_flavor)
@@ -102,7 +102,7 @@ function(_add_target_variant_c_compile_link_flags)
102102 endif ()
103103 endif ()
104104
105- if ("${CFLAGS_SDK} " IN_LIST SWIFT_APPLE_PLATFORMS )
105+ if ("${CFLAGS_SDK} " IN_LIST SWIFT_DARWIN_PLATFORMS )
106106 # We collate -F with the framework path to avoid unwanted deduplication
107107 # of options by target_compile_options -- this way no undesired
108108 # side effects are introduced should a new search path be added.
@@ -827,7 +827,7 @@ function(_add_swift_target_library_single target name)
827827 endif ()
828828
829829 # Only build the modules for any arch listed in the *_MODULE_ARCHITECTURES.
830- if (SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS
830+ if (SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_DARWIN_PLATFORMS
831831 AND SWIFTLIB_SINGLE_ARCHITECTURE IN_LIST SWIFT_SDK_${SWIFTLIB_SINGLE_SDK} _MODULE_ARCHITECTURES)
832832 # Create dummy target to hook up the module target dependency.
833833 add_custom_target ("${target} "
@@ -959,7 +959,7 @@ function(_add_swift_target_library_single target name)
959959 endforeach ()
960960 endif ()
961961
962- if (SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS )
962+ if (SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_DARWIN_PLATFORMS )
963963 set (install_name_dir "@rpath" )
964964
965965 if (SWIFTLIB_SINGLE_IS_STDLIB)
@@ -1194,7 +1194,7 @@ function(_add_swift_target_library_single target name)
11941194
11951195 # Configure plist creation for OS X.
11961196 set (PLIST_INFO_PLIST "Info.plist" CACHE STRING "Plist name" )
1197- if ("${SWIFTLIB_SINGLE_SDK} " IN_LIST SWIFT_APPLE_PLATFORMS AND SWIFTLIB_SINGLE_IS_STDLIB)
1197+ if ("${SWIFTLIB_SINGLE_SDK} " IN_LIST SWIFT_DARWIN_PLATFORMS AND SWIFTLIB_SINGLE_IS_STDLIB)
11981198 set (PLIST_INFO_NAME ${name} )
11991199 set (PLIST_INFO_UTI "com.apple.dt.runtime.${name} " )
12001200 set (PLIST_INFO_VERSION "${SWIFT_VERSION} " )
@@ -1251,7 +1251,7 @@ function(_add_swift_target_library_single target name)
12511251 ${c_compile_flags} )
12521252 target_link_options (${target} PRIVATE
12531253 ${link_flags} )
1254- if (${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
1254+ if (${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS )
12551255 target_link_options (${target} PRIVATE
12561256 "LINKER:-compatibility_version,1" )
12571257 if (SWIFT_COMPILER_VERSION)
@@ -1614,7 +1614,7 @@ function(add_swift_target_library name)
16141614 if ("${SWIFTLIB_TARGET_SDKS} " STREQUAL "" )
16151615 set (SWIFTLIB_TARGET_SDKS ${SWIFT_SDKS} )
16161616 endif ()
1617- list_replace(SWIFTLIB_TARGET_SDKS ALL_APPLE_PLATFORMS "${SWIFT_APPLE_PLATFORMS } " )
1617+ list_replace(SWIFTLIB_TARGET_SDKS ALL_APPLE_PLATFORMS "${SWIFT_DARWIN_PLATFORMS } " )
16181618
16191619 # All Swift code depends on the standard library, except for the standard
16201620 # library itself.
@@ -1832,7 +1832,7 @@ function(add_swift_target_library name)
18321832 list (APPEND swiftlib_link_flags_all "-Wl,-z,defs" )
18331833 endif ()
18341834 # Setting back linker flags which are not supported when making Android build on macOS cross-compile host.
1835- if (SWIFTLIB_SHARED AND sdk IN_LIST SWIFT_APPLE_PLATFORMS )
1835+ if (SWIFTLIB_SHARED AND sdk IN_LIST SWIFT_DARWIN_PLATFORMS )
18361836 list (APPEND swiftlib_link_flags_all "-dynamiclib -Wl,-headerpad_max_install_names" )
18371837 endif ()
18381838
@@ -1952,7 +1952,7 @@ function(add_swift_target_library name)
19521952 list (APPEND swiftlib_link_flags_all "-F${ios_support_frameworks_path} " )
19531953 endif ()
19541954
1955- if (sdk IN_LIST SWIFT_APPLE_PLATFORMS AND SWIFTLIB_IS_SDK_OVERLAY)
1955+ if (sdk IN_LIST SWIFT_DARWIN_PLATFORMS AND SWIFTLIB_IS_SDK_OVERLAY)
19561956 set (swiftlib_swift_compile_private_frameworks_flag "-Fsystem" "${SWIFT_SDK_${sdk} _ARCH_${arch} _PATH}/System/Library/PrivateFrameworks/" )
19571957 foreach (tbd_lib ${SWIFTLIB_SWIFT_MODULE_DEPENDS_FROM_SDK} )
19581958 list (APPEND swiftlib_link_flags_all "${SWIFT_SDK_${sdk} _ARCH_${arch} _PATH}/usr/lib/swift/libswift${tbd_lib} .tbd" )
@@ -2066,8 +2066,7 @@ function(add_swift_target_library name)
20662066 endif ()
20672067 endif ()
20682068
2069- if ((sdk IN_LIST SWIFT_APPLE_PLATFORMS)
2070- OR (sdk STREQUAL "FREESTANDING" ))
2069+ if (sdk IN_LIST SWIFT_APPLE_PLATFORMS)
20712070 # In the past, we relied on unsetting globally
20722071 # CMAKE_OSX_ARCHITECTURES to ensure that CMake would
20732072 # not add the -arch flag
@@ -2174,7 +2173,7 @@ function(add_swift_target_library name)
21742173 endif ()
21752174
21762175 set (optional_arg)
2177- if (sdk IN_LIST SWIFT_APPLE_PLATFORMS )
2176+ if (sdk IN_LIST SWIFT_DARWIN_PLATFORMS )
21782177 # Allow installation of stdlib without building all variants on Darwin.
21792178 set (optional_arg "OPTIONAL" )
21802179 endif ()
@@ -2434,7 +2433,7 @@ function(_add_swift_target_executable_single name)
24342433 if (SWIFT_PARALLEL_LINK_JOBS)
24352434 set_property (TARGET ${name} PROPERTY JOB_POOL_LINK swift_link_job_pool)
24362435 endif ()
2437- if (${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS )
2436+ if (${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS )
24382437 set_target_properties (${name} PROPERTIES
24392438 BUILD_WITH_INSTALL_RPATH YES
24402439 INSTALL_RPATH "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK} _LIB_SUBDIR}" )
@@ -2516,8 +2515,7 @@ function(add_swift_target_executable name)
25162515 EXCLUDE_FROM_ALL TRUE )
25172516 endif ()
25182517
2519- if ((${sdk} IN_LIST SWIFT_APPLE_PLATFORMS)
2520- OR (sdk STREQUAL "FREESTANDING" ))
2518+ if (${sdk} IN_LIST SWIFT_APPLE_PLATFORMS)
25212519 # In the past, we relied on unsetting globally
25222520 # CMAKE_OSX_ARCHITECTURES to ensure that CMake would
25232521 # not add the -arch flag
0 commit comments