Skip to content

Commit b861bcc

Browse files
committed
build: check the compiler against the correct variable
We were checking the compiler ID against the name of the compiler binary. This happened to pass incorrectly on Windows, which hid the bug.
1 parent 8c1bfbe commit b861bcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1991,7 +1991,7 @@ function(add_swift_target_library name)
19911991
DEPLOYMENT_VERSION_WATCHOS "${SWIFTLIB_DEPLOYMENT_VERSION_WATCHOS}"
19921992
GYB_SOURCES ${SWIFTLIB_GYB_SOURCES}
19931993
)
1994-
if(NOT SWIFT_BUILT_STANDALONE AND NOT CMAKE_C_COMPILER MATCHES Clang)
1994+
if(NOT SWIFT_BUILT_STANDALONE AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
19951995
add_dependencies(${VARIANT_NAME} clang)
19961996
endif()
19971997

0 commit comments

Comments
 (0)