summarylogtreecommitdiffstats
path: root/clang15-linker-wrapper-tool-r1.patch
blob: d780708f63016e5ec9941e0c14bd875c17b5a02e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From c2aabcfc8395ba30884dd3c1ecc2b192ae85a78d Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <https://foutrelis.com/>
Date: Mon, 13 Mar 2023 12:40:26 -0500
Subject: [PATCH] [LinkerWrapper] Switch to add_clang_tool() macro

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 | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/clang/tools/clang-linker-wrapper/CMakeLists.txt b/clang/tools/clang-linker-wrapper/CMakeLists.txt
index b5f1c0dd0e7d33..198dbff8cf83c6 100644
--- a/clang/tools/clang-linker-wrapper/CMakeLists.txt
+++ b/clang/tools/clang-linker-wrapper/CMakeLists.txt
@@ -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}")