Skip to content

Commit 6607ff7

Browse files
authored
Merge pull request #10337 from CodaFi/winner-of-the-tool-raffle
[Shepherd] build: create and use a wrapper for add_llvm_tool_symlink
2 parents 29f080f + 3c4c910 commit 6607ff7

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,3 +2124,8 @@ function(add_swift_host_tool executable)
21242124
endif()
21252125
endif()
21262126
endfunction()
2127+
2128+
macro(add_swift_tool_symlink name dest component)
2129+
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
2130+
llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE COMPONENT ${component})
2131+
endmacro()

tools/driver/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ swift_create_post_build_symlink(swift
3131
DESTINATION "swift-autolink-extract${CMAKE_EXECUTABLE_SUFFIX}"
3232
WORKING_DIRECTORY "${SWIFT_RUNTIME_OUTPUT_INTDIR}")
3333

34+
add_swift_tool_symlink(swiftc swift compiler)
35+
add_swift_tool_symlink(swift-autolink-extract swift autolink-driver)
36+
add_swift_tool_symlink(swift-format swift editor-integration)
37+
3438
# If building as part of clang, make sure the headers are installed.
3539
if(NOT SWIFT_BUILT_STANDALONE)
3640
add_dependencies(swift clang-headers)

0 commit comments

Comments
 (0)