Skip to content

Commit 399b190

Browse files
authored
Merge pull request swiftlang#33908 from stevapple/check-windows
[test] Fix line-directive on Windows
2 parents b5416a9 + fa6a8ec commit 399b190

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
@@ -610,7 +610,12 @@ function(_compile_swift_files
610610
endif()
611611

612612
set(line_directive_tool "${SWIFT_SOURCE_DIR}/utils/line-directive")
613-
set(swift_compiler_tool "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/swiftc")
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")
618+
endif()
614619
set(swift_compiler_tool_dep)
615620
if(SWIFT_INCLUDE_TOOLS)
616621
# Depend on the binary itself, in addition to the symlink.

0 commit comments

Comments
 (0)