[LinkerWrapper] Switch to add_clang_tool() macro
authorEvangelos Foutras <https://foutrelis.com/>
Mon, 13 Mar 2023 17:40:26 +0000 (12:40 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 13 Mar 2023 17:43:12 +0000 (12:43 -0500)
Summary:
This creates install-clang-linker-wrapper{,-stripped} targets which are
useful for Linux distro builds when using LLVM_DISTRIBUTION_COMPONENTS.

Fixes: https://bugs.archlinux.org/task/77814

Differential Revision: https://reviews.llvm.org/D145862

clang/tools/clang-linker-wrapper/CMakeLists.txt

index b5f1c0d..198dbff 100644 (file)
@@ -1,5 +1,3 @@
-include(GNUInstallDirs)
-
 set(LLVM_LINK_COMPONENTS
   ${LLVM_TARGETS_TO_BUILD}
   BitWriter
@@ -27,7 +25,7 @@ if(NOT CLANG_BUILT_STANDALONE)
   set(tablegen_deps intrinsics_gen LinkerWrapperOpts)
 endif()
 
-add_clang_executable(clang-linker-wrapper
+add_clang_tool(clang-linker-wrapper
   ClangLinkerWrapper.cpp
   OffloadWrapper.cpp
 
@@ -43,5 +41,3 @@ target_link_libraries(clang-linker-wrapper
   PRIVATE
   ${CLANG_LINKER_WRAPPER_LIB_DEPS}
   )
-
-install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")