File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -624,7 +624,11 @@ function(_compile_swift_files
624624 endif ()
625625
626626 set (line_directive_tool "${SWIFT_SOURCE_DIR} /utils/line-directive" )
627- set (swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /swiftc" )
627+ if (EXISTS "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /swiftc" )
628+ set (swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /swiftc" )
629+ elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL CMAKE_SYSTEM_NAME )
630+ set (swift_compiler_tool "${SWIFT_RUNTIME_OUTPUT_INTDIR} /swiftc" )
631+ endif ()
628632 set (swift_compiler_tool_dep)
629633 if (SWIFT_INCLUDE_TOOLS)
630634 # Depend on the binary itself, in addition to the symlink.
Original file line number Diff line number Diff line change @@ -107,7 +107,11 @@ function(get_test_dependencies SDK result_var_name)
107107 list (APPEND deps ${deps_binaries} )
108108 else ()
109109 foreach (binary ${deps_binaries} )
110- list (APPEND deps "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /${binary}${CMAKE_EXECUTABLE_SUFFIX} " )
110+ if (EXISTS "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /${binary}${CMAKE_EXECUTABLE_SUFFIX} " )
111+ list (APPEND deps "${SWIFT_NATIVE_SWIFT_TOOLS_PATH} /${binary}${CMAKE_EXECUTABLE_SUFFIX} " )
112+ elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL CMAKE_SYSTEM_NAME )
113+ list (APPEND deps "${SWIFT_RUNTIME_OUTPUT_INTDIR} /${binary}${CMAKE_EXECUTABLE_SUFFIX} " )
114+ endif ()
111115 endforeach ()
112116 endif ()
113117
You can’t perform that action at this time.
0 commit comments