Skip to content

Commit 4eeeed7

Browse files
authored
Merge pull request #33966 from compnerd/extension
build: repair cross-compilation for Windows after #33908
2 parents 6216ccd + b0a13e7 commit 4eeeed7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,12 +610,12 @@ function(_compile_swift_files
610610
endif()
611611

612612
set(line_directive_tool "${SWIFT_SOURCE_DIR}/utils/line-directive")
613-
# line-directive needs full path on Windows.
614-
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
615-
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc.exe")
616-
else()
617-
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc")
613+
614+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
615+
set(HOST_EXECUTABLE_SUFFIX .exe)
618616
endif()
617+
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc${HOST_EXECUTABLE_SUFFIX}")
618+
619619
set(swift_compiler_tool_dep)
620620
if(SWIFT_INCLUDE_TOOLS)
621621
# Depend on the binary itself, in addition to the symlink.

0 commit comments

Comments
 (0)