summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2019-03-26 14:08:36 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2019-05-17 19:33:24 +0800
commita12a2f03466cdc1d639f3d10a94fc22e0609c67c (patch)
tree8feaa49cb005541af143a602ba40bd153e6bf6c2 /dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch
parent613bc1ffc315ac940dc99071bcf13565cd9a40ce (diff)
downloadmeta-intel-a12a2f03466cdc1d639f3d10a94fc22e0609c67c.tar.gz
clang: build Intel common-clang and spirv
Common clang is a thin wrapper library around clang. Common clang has OpenCL-oriented API and is capable to compile OpenCL C kernels to SPIR-V modules. This adds a bbappend to clang recipe from meta-clang to build the necessary components and moves it to dynamic layers so it's built only when clang-layer is included. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
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.patch66
1 files changed, 66 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..9d25bbad
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-devtools/clang/files/0001-dont-export-targets-for-binaries.patch
@@ -0,0 +1,66 @@
1From 7bbd0058362ac3bb5edd7a82d43e1785810776b3 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Fri, 29 Mar 2019 08:56:53 +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>
13---
14 llvm/cmake/modules/AddLLVM.cmake | 9 ---------
15 llvm/cmake/modules/TableGen.cmake | 6 ------
16 2 files changed, 15 deletions(-)
17
18diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
19index 0df6845..b79f4fa 100644
20--- a/llvm/cmake/modules/AddLLVM.cmake
21+++ b/llvm/cmake/modules/AddLLVM.cmake
22@@ -866,12 +866,6 @@ macro(add_llvm_tool name)
23
24 if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
25 if( LLVM_BUILD_TOOLS )
26- if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
27- NOT LLVM_DISTRIBUTION_COMPONENTS)
28- set(export_to_llvmexports EXPORT LLVMExports)
29- set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
30- endif()
31-
32 install(TARGETS ${name}
33 ${export_to_llvmexports}
34 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR}
35@@ -884,9 +878,6 @@ macro(add_llvm_tool name)
36 endif()
37 endif()
38 endif()
39- if( LLVM_BUILD_TOOLS )
40- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
41- endif()
42 set_target_properties(${name} PROPERTIES FOLDER "Tools")
43 endmacro(add_llvm_tool name)
44
45diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
46index 3c84ae7..141219f 100644
47--- a/llvm/cmake/modules/TableGen.cmake
48+++ b/llvm/cmake/modules/TableGen.cmake
49@@ -164,14 +164,8 @@ macro(add_tablegen target project)
50 endif()
51
52 if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
53- if(${target} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
54- NOT LLVM_DISTRIBUTION_COMPONENTS)
55- set(export_to_llvmexports EXPORT LLVMExports)
56- endif()
57-
58 install(TARGETS ${target}
59 ${export_to_llvmexports}
60 RUNTIME DESTINATION ${LLVM_TOOLS_INSTALL_DIR})
61 endif()
62- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${target})
63 endmacro()
64--
652.7.4
66