diff options
author | Naveen Saini <naveen.kumar.saini@intel.com> | 2020-04-16 16:22:38 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2020-04-17 08:06:37 +0800 |
commit | 52dc0273759daaf167bf38656bab5cb2da27028f (patch) | |
tree | 85c795ce568d6b6b4393271be7f9acff310791c6 /dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-make-sure-only-static-libraries-linked-for-native-bu.patch | |
parent | ee6810244211e6226cde0d2433e79461ae89b750 (diff) | |
download | meta-intel-52dc0273759daaf167bf38656bab5cb2da27028f.tar.gz |
opencl-clang: fix runtime error
Error log:
clang (LLVM option parsing): Unknown command line argument '-pgo-warn-misexpect'.
Try: 'clang (LLVM option parsing) --help'
Force opencl-clang to link with shared clang-cpp for target builds and
explicitly link with spirv library because of a change in behaviour in llvm 10.
Use the patch to link with all static libs only for native cases where meta-clang
default to building static libs only by default.
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-make-sure-only-static-libraries-linked-for-native-bu.patch')
-rw-r--r-- | dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-make-sure-only-static-libraries-linked-for-native-bu.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-make-sure-only-static-libraries-linked-for-native-bu.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-make-sure-only-static-libraries-linked-for-native-bu.patch new file mode 100644 index 00000000..473f4d24 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-make-sure-only-static-libraries-linked-for-native-bu.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From b29e00e6fe428a031cf577dfb703cf13eff837f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Wed, 15 Apr 2020 18:05:14 +0800 | ||
4 | Subject: [PATCH 2/2] make sure only static libraries linked for native build | ||
5 | |||
6 | LINK_COMPONENTS=all isn't working for static libs for out of tree builds. Use | ||
7 | LLVM_AVAILABLE_LIBS instead. Reported: | ||
8 | |||
9 | https://github.com/intel/opencl-clang/issues/114 | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
14 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
15 | --- | ||
16 | CMakeLists.txt | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
20 | index 8707487..ad2dbda 100644 | ||
21 | --- a/CMakeLists.txt | ||
22 | +++ b/CMakeLists.txt | ||
23 | @@ -218,7 +218,7 @@ add_subdirectory(cl_headers) | ||
24 | |||
25 | set(LLVM_REQUIRES_EH ON) | ||
26 | |||
27 | -if(USE_PREBUILT_LLVM OR CLANG_LINK_CLANG_DYLIB) | ||
28 | +if(false) | ||
29 | list(APPEND OPENCL_CLANG_LINK_LIBS clang-cpp) | ||
30 | else() | ||
31 | list(APPEND OPENCL_CLANG_LINK_LIBS | ||
32 | @@ -266,6 +266,7 @@ add_llvm_library(${TARGET_NAME} SHARED | ||
33 | all | ||
34 | LINK_LIBS | ||
35 | ${OPENCL_CLANG_LINK_LIBS} | ||
36 | + ${LLVM_AVAILABLE_LIBS} | ||
37 | ) | ||
38 | |||
39 | # Configure resource file on Windows | ||
40 | -- | ||
41 | 2.17.1 | ||
42 | |||