summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch
new file mode 100644
index 00000000..da2475f9
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch
@@ -0,0 +1,68 @@
1From 559fb8f82295ec4dc64a132b6566939b85c1b6fe Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 15 Aug 2019 22:34:31 +0800
4Subject: [PATCH] dont export targets for binaries
5
6The projects using LLVM cmake modules look for target binaries in
7sysroot as a result which isn't desirable in this case and isn't needed
8either.
9
10Upstream-Status: Inappropriate [cross-compile specific]
11
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
14---
15 llvm/cmake/modules/AddLLVM.cmake | 9 ---------
16 llvm/cmake/modules/TableGen.cmake | 6 ------
17 2 files changed, 15 deletions(-)
18
19diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
20index 619e986b8aa..d2bc1a25dd9 100644
21--- a/llvm/cmake/modules/AddLLVM.cmake
22+++ b/llvm/cmake/modules/AddLLVM.cmake
23@@ -898,12 +898,6 @@ macro(add_llvm_tool name)
24
25 if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
26 if( LLVM_BUILD_TOOLS )
27- set(export_to_llvmexports)
28- if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
29- NOT LLVM_DISTRIBUTION_COMPONENTS)
30- set(export_to_llvmexports EXPORT LLVMExports)
31- set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
32- endif()
33
34 install(TARGETS ${name}
35 ${export_to_llvmexports}
36@@ -917,9 +911,6 @@ macro(add_llvm_tool name)
37 endif()
38 endif()
39 endif()
40- if( LLVM_BUILD_TOOLS )
41- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
42- endif()
43 set_target_properties(${name} PROPERTIES FOLDER "Tools")
44 endmacro(add_llvm_tool name)
45
46diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
47index 36c026b5c0f..537acd696d8 100644
48--- a/llvm/cmake/modules/TableGen.cmake
49+++ b/llvm/cmake/modules/TableGen.cmake
50@@ -148,15 +148,9 @@ macro(add_tablegen target project)
51 endif()
52
53 if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_UTILS)
54- set(export_to_llvmexports)
55- if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
56- NOT LLVM_DISTRIBUTION_COMPONENTS)
57- set(export_to_llvmexports EXPORT LLVMExports)
58- endif()
59
60 install(TARGETS ${target}
61 ${export_to_llvmexports}
62 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
63 endif()
64- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
65 endmacro()
66--
672.17.1
68