summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch
new file mode 100644
index 00000000..732589f2
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-Fix-standalone-build-415.patch
@@ -0,0 +1,32 @@
1From 3a281f634be5e56d5fb49d07da85fe24e5971dd0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= <Zatloukal.Frantisek@gmail.com>
3Date: Fri, 21 Apr 2023 04:07:21 +0200
4Subject: [PATCH] Fix standalone build (#415)
5
6Fixes https://github.com/intel/opencl-clang/issues/406
7Fixes https://github.com/intel/opencl-clang/issues/374
8
9Upstream-Status: Backport [https://github.com/intel/opencl-clang/commit/529a9188114bcbd8ed753d2276942384fa50d7a1]
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 cl_headers/CMakeLists.txt | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt
16index 69cf11e..a258b62 100644
17--- a/cl_headers/CMakeLists.txt
18+++ b/cl_headers/CMakeLists.txt
19@@ -1,5 +1,9 @@
20 set(CL_HEADERS_LIB cl_headers)
21-set(CLANG_COMMAND $<TARGET_FILE:clang> )
22+if(USE_PREBUILT_LLVM)
23+ find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR})
24+else()
25+ set(CLANG_COMMAND $<TARGET_FILE:clang>)
26+endif()
27 if(LLVM_USE_HOST_TOOLS AND NOT OPENCL_CLANG_BUILD_EXTERNAL)
28 build_native_tool(clang CLANG_COMMAND)
29 endif()
30--
312.34.1
32