Skip to content

Commit 474ecd5

Browse files
authored
Merge pull request swiftlang#19973 from compnerd/target
2 parents 23476e5 + 15355ab commit 474ecd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ function(_add_variant_c_compile_link_flags)
119119
endif()
120120
endif()
121121

122-
# MSVC and clang-cl don't understand -target.
123-
if (NOT SWIFT_COMPILER_IS_MSVC_LIKE)
122+
# MSVC, clang-cl, gcc don't understand -target.
123+
if(CMAKE_C_COMPILER_ID STREQUAL Clang AND NOT SWIFT_COMPILER_IS_MSVC_LIKE)
124124
list(APPEND result "-target" "${SWIFT_SDK_${CFLAGS_SDK}_ARCH_${CFLAGS_ARCH}_TRIPLE}${DEPLOYMENT_VERSION}")
125125
endif()
126126

0 commit comments

Comments
 (0)