File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed
Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ macro(swift_swap_compiler_if_needed target)
104104 endif ()
105105 set (CMAKE_C_COMPILER_ID Clang)
106106 set (CMAKE_CXX_COMPILER_ID Clang)
107+ set (SOURCEKIT_SWIFT_SWAP_COMPILER TRUE )
107108 message (STATUS "C/C++ compiler for ${target} is set to: ${CMAKE_C_COMPILER} " )
108109 else ()
109110 message (SEND_ERROR "${target} requires a clang based compiler. Please set SWIFT_CLANG_LOCATION." )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
88 message (SEND_ERROR "SourceKit cannot be built standalone" )
99endif ()
1010
11+ set (SOURCEKIT_SWIFT_SWAP_COMPILER FALSE )
1112include (SwiftWindowsSupport)
1213swift_swap_compiler_if_needed("SourceKit" )
1314
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ macro(add_sourcekit_library name)
235235 set (libkind)
236236 endif ()
237237 add_library (${name} ${libkind} ${srcs} )
238- if (NOT SWIFT_BUILT_STANDALONE AND NOT CMAKE_C_COMPILER_ID MATCHES Clang )
238+ if (NOT SWIFT_BUILT_STANDALONE AND SOURCEKIT_SWIFT_SWAP_COMPILER )
239239 add_dependencies (${name} clang)
240240 endif ()
241241 llvm_update_compile_flags(${name} )
@@ -325,7 +325,7 @@ macro(add_sourcekit_executable name)
325325 "${SOURCEKIT_EXECUTABLE_multiple_parameter_options} " ${ARGN} )
326326
327327 add_executable (${name} ${SOURCEKITEXE_UNPARSED_ARGUMENTS} )
328- if (NOT SWIFT_BUILT_STANDALONE AND NOT CMAKE_C_COMPILER_ID MATCHES Clang )
328+ if (NOT SWIFT_BUILT_STANDALONE AND SOURCEKIT_SWIFT_SWAP_COMPILER )
329329 add_dependencies (${name} clang)
330330 endif ()
331331 llvm_update_compile_flags(${name} )
You can’t perform that action at this time.
0 commit comments