Skip to content

Commit 7f6152a

Browse files
committed
Install host-built 'swift-driver' and 'swift-help' when installing the 'compiler' component
1 parent f85b180 commit 7f6152a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tools/driver/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ swift_create_early_driver_copies(swift-frontend)
7979

8080
# If a `swift-driver` executable adjacent to the `swift-frontend` executable exists
8181
# then the `swift` and `swiftc` symlinks should point to it by-default
82-
if(EXISTS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-driver" AND EXISTS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-help")
82+
if(EXISTS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-driver${CMAKE_EXECUTABLE_SUFFIX}" AND EXISTS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-help${CMAKE_EXECUTABLE_SUFFIX}")
8383
message(STATUS "Pointing 'swift' and 'swiftc' symlinks at 'swift-driver'.")
8484
swift_create_post_build_symlink(swift-frontend
8585
SOURCE "swift-driver${CMAKE_EXECUTABLE_SUFFIX}"
@@ -200,4 +200,11 @@ add_dependencies(editor-integration swift-frontend)
200200
swift_install_in_component(FILES "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-indent${CMAKE_EXECUTABLE_SUFFIX}"
201201
DESTINATION "bin"
202202
COMPONENT editor-integration)
203-
203+
if(EXISTS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-driver${CMAKE_EXECUTABLE_SUFFIX}" AND EXISTS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-help${CMAKE_EXECUTABLE_SUFFIX}")
204+
swift_install_in_component(PROGRAMS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-driver${CMAKE_EXECUTABLE_SUFFIX}"
205+
DESTINATION "bin"
206+
COMPONENT compiler)
207+
swift_install_in_component(PROGRAMS "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-help${CMAKE_EXECUTABLE_SUFFIX}"
208+
DESTINATION "bin"
209+
COMPONENT compiler)
210+
endif()

0 commit comments

Comments
 (0)