summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch')
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch
new file mode 100644
index 00000000..89a28097
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch
@@ -0,0 +1,62 @@
1From 483154871f72590b81c036b000be09627376b5a9 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Thu, 27 Aug 2020 12:17:12 +0800
4Subject: [PATCH] IGC/VectorCompiler/CMakeLists.txt: link to external
5 LLVMGenXIntrinsics
6
7By default LLVMGenXIntrinsics is to be build In-tree, but we want to
8link externally.
9
10Fix llvm-tblgen path.
11
12Upstream-Status: Inappropriate [configuration specific]
13
14Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
15---
16 IGC/VectorCompiler/CMakeLists.txt | 23 ++---------------------
17 1 file changed, 2 insertions(+), 21 deletions(-)
18
19diff --git a/IGC/VectorCompiler/CMakeLists.txt b/IGC/VectorCompiler/CMakeLists.txt
20index 3592e0b4..ae754b8b 100644
21--- a/IGC/VectorCompiler/CMakeLists.txt
22+++ b/IGC/VectorCompiler/CMakeLists.txt
23@@ -50,10 +50,7 @@ if(IGC_BUILD__USING_SYSTEM_LLVM OR (WIN32 AND LLVM_USE_PREBUILT))
24 message(STATUS "[VC] Using system llvm")
25
26 # Need to search for llvm-tblgen
27- find_program(LLVM_TABLEGEN_EXE "llvm-tblgen"
28- ${LLVM_TOOLS_BINARY_DIR}
29- NO_DEFAULT_PATH
30- )
31+ find_program(LLVM_TABLEGEN_EXE "llvm-tblgen")
32 if(LLVM_TABLEGEN_EXE-NOTFOUND)
33 message(FATAL_ERROR "[VC] llvm-tblgen is not found")
34 endif()
35@@ -131,23 +128,7 @@ if(LLVM_ON_WIN32)
36 add_compile_options(/wd4624)
37 endif()
38
39-if(DEFINED VC_INTRINSICS_SRC)
40- set(INTRSRC "${VC_INTRINSICS_SRC}/GenXIntrinsics")
41-endif()
42-
43-if(NOT DEFINED INTRSRC)
44- set(INTRSRC "${CMAKE_CURRENT_SOURCE_DIR}/../../../vc-intrinsics/GenXIntrinsics")
45-endif()
46-
47-message(STATUS "[VC] Using vc-intrinsics source from: ${INTRSRC}")
48-
49-# We are using prebuilt SPIRV and building intrinsics.
50-set(INTRBUILD "${CMAKE_CURRENT_BINARY_DIR}/intrbuild")
51-
52-
53-# Do not copy anything from prebuilts. libSPIRVDLL.so will be dynamically loaded at runtime.
54-add_subdirectory(${INTRSRC} ${INTRBUILD})
55-include_directories(${INTRSRC}/include ${INTRBUILD}/include)
56+find_package(LLVMGenXIntrinsics REQUIRED)
57
58 include(cmake/spirv.cmake)
59 include(${IGC_SOURCE_DIR}/cmake/utils.cmake)
60--
612.17.1
62