Skip to content

Commit 6362415

Browse files
committed
libswift: properly generate the path to the executable
This uses a generator expression to get the location and adds the host dependent suffix to generate the proper tool location. This aids in getting the correct command on Windows.
1 parent 8612cd0 commit 6362415

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libswift/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ else()
6060
# Bootstrapping - stage 1, using the compiler from level 0
6161

6262
add_libswift(libswift-bootstrapping1
63-
SWIFT_EXEC "${CMAKE_BINARY_DIR}/bootstrapping0/bin/swiftc"
63+
SWIFT_EXEC $<TARGET_FILE_DIR:swift-frontend-bootstrapping0>/swiftc${CMAKE_EXECUTABLE_SUFFIX}
6464
DEPENDS ${b0_deps}
6565
BOOTSTRAPPING 1)
6666

6767
# The final build, using the compiler from stage 1
6868

6969
add_libswift(libswift
70-
SWIFT_EXEC "${CMAKE_BINARY_DIR}/bootstrapping1/bin/swiftc"
70+
SWIFT_EXEC $<TARGET_FILE_DIR:swift-frontend-bootstrapping1>/swiftc${CMAKE_EXECUTABLE_SUFFIX}
7171
DEPENDS ${b1_deps})
7272

7373
if(LIBSWIFT_BUILD_MODE STREQUAL "BOOTSTRAPPING-WITH-HOSTLIBS")

0 commit comments

Comments
 (0)