Skip to content

Commit fa6a8ec

Browse files
committed
[test] Fix line-directive on Windows
1 parent e9650cf commit fa6a8ec

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,12 @@ function(_compile_swift_files
640640
endif()
641641

642642
set(line_directive_tool "${SWIFT_SOURCE_DIR}/utils/line-directive")
643-
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc")
643+
# line-directive needs full path on Windows.
644+
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
645+
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc.exe")
646+
else()
647+
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc")
648+
endif()
644649
set(swift_compiler_tool_dep)
645650
if(SWIFT_INCLUDE_TOOLS)
646651
# Depend on the binary itself, in addition to the symlink.

0 commit comments

Comments
 (0)