Skip to content

Commit

Permalink
Merge pull request swiftlang#10337 from CodaFi/winner-of-the-tool-raffle
Browse files Browse the repository at this point in the history
[Shepherd] build: create and use a wrapper for add_llvm_tool_symlink
  • Loading branch information
CodaFi authored Jun 17, 2017
2 parents 29f080f + 3c4c910 commit 6607ff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 4 additions & 0 deletions tools/driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6607ff7

Please sign in to comment.