Skip to content

Commit f5a75dc

Browse files
committed
build: simplify macOS path (NFC)
It does not make sense to use the `cl` frontend to clang to build for macOS. Remove the unnecessary condition and always perform the operation.
1 parent 42457b9 commit f5a75dc

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,14 +546,10 @@ function(add_swift_host_library name)
546546
"LINKER:-current_version,${SWIFT_COMPILER_VERSION}")
547547
endif()
548548

549-
set(DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
550-
# MSVC, clang-cl, gcc don't understand -target.
551-
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT SWIFT_COMPILER_IS_MSVC_LIKE)
552-
get_target_triple(target target_variant "${SWIFT_HOST_VARIANT_SDK}" "${SWIFT_HOST_VARIANT_ARCH}"
553-
MACCATALYST_BUILD_FLAVOR ""
554-
DEPLOYMENT_VERSION "${DEPLOYMENT_VERSION}")
555-
target_link_options(${name} PRIVATE -target;${target})
556-
endif()
549+
get_target_triple(target target_variant "${SWIFT_HOST_VARIANT_SDK}" "${SWIFT_HOST_VARIANT_ARCH}"
550+
MACCATALYST_BUILD_FLAVOR ""
551+
DEPLOYMENT_VERSION "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_DEPLOYMENT_VERSION}")
552+
target_link_options(${name} PRIVATE -target;${target})
557553
endif()
558554

559555
add_dependencies(dev ${name})

0 commit comments

Comments
 (0)