diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 56b45e92b4b36..052213d35d908 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -2124,3 +2124,8 @@ function(add_swift_host_tool executable) endif() endif() endfunction() + +macro(add_swift_tool_symlink name dest component) + add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE) + llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE COMPONENT ${component}) +endmacro() diff --git a/tools/driver/CMakeLists.txt b/tools/driver/CMakeLists.txt index ef4fd1ce935f3..cd9f779ae9c4c 100644 --- a/tools/driver/CMakeLists.txt +++ b/tools/driver/CMakeLists.txt @@ -31,6 +31,10 @@ swift_create_post_build_symlink(swift DESTINATION "swift-autolink-extract${CMAKE_EXECUTABLE_SUFFIX}" WORKING_DIRECTORY "${SWIFT_RUNTIME_OUTPUT_INTDIR}") +add_swift_tool_symlink(swiftc swift compiler) +add_swift_tool_symlink(swift-autolink-extract swift autolink-driver) +add_swift_tool_symlink(swift-format swift editor-integration) + # If building as part of clang, make sure the headers are installed. if(NOT SWIFT_BUILT_STANDALONE) add_dependencies(swift clang-headers)