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
624
624
endif ()
625
625
626
626
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 ()
628
632
set (swift_compiler_tool_dep )
629
633
if (SWIFT_INCLUDE_TOOLS )
630
634
# 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)
107
107
list (APPEND deps ${deps_binaries} )
108
108
else ()
109
109
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 ()
111
115
endforeach ()
112
116
endif ()
113
117
You can’t perform that action at this time.
0 commit comments