summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/clang-layer/recipes-opencl/igc/files/link-to-LLVMGenXIntrinsics.patch
blob: 89a280973628e090ddb125739da74c5d2edcfcd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From 483154871f72590b81c036b000be09627376b5a9 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Thu, 27 Aug 2020 12:17:12 +0800
Subject: [PATCH] IGC/VectorCompiler/CMakeLists.txt: link to external
 LLVMGenXIntrinsics

By default LLVMGenXIntrinsics is to be build In-tree, but we want to
link externally.

Fix llvm-tblgen path.

Upstream-Status: Inappropriate [configuration specific]

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
 IGC/VectorCompiler/CMakeLists.txt | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/IGC/VectorCompiler/CMakeLists.txt b/IGC/VectorCompiler/CMakeLists.txt
index 3592e0b4..ae754b8b 100644
--- a/IGC/VectorCompiler/CMakeLists.txt
+++ b/IGC/VectorCompiler/CMakeLists.txt
@@ -50,10 +50,7 @@ if(IGC_BUILD__USING_SYSTEM_LLVM OR (WIN32 AND LLVM_USE_PREBUILT))
   message(STATUS "[VC] Using system llvm")
 
   # Need to search for llvm-tblgen
-  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen"
-    ${LLVM_TOOLS_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
+  find_program(LLVM_TABLEGEN_EXE "llvm-tblgen")
   if(LLVM_TABLEGEN_EXE-NOTFOUND)
     message(FATAL_ERROR "[VC] llvm-tblgen is not found")
   endif()
@@ -131,23 +128,7 @@ if(LLVM_ON_WIN32)
   add_compile_options(/wd4624)
 endif()
 
-if(DEFINED VC_INTRINSICS_SRC)
-  set(INTRSRC "${VC_INTRINSICS_SRC}/GenXIntrinsics")
-endif()
-
-if(NOT DEFINED INTRSRC)
-  set(INTRSRC "${CMAKE_CURRENT_SOURCE_DIR}/../../../vc-intrinsics/GenXIntrinsics")
-endif()
-
-message(STATUS "[VC] Using vc-intrinsics source from: ${INTRSRC}")
-
-# We are using prebuilt SPIRV and building intrinsics.
-set(INTRBUILD "${CMAKE_CURRENT_BINARY_DIR}/intrbuild")
-
-
-# Do not copy anything from prebuilts. libSPIRVDLL.so will be dynamically loaded at runtime.
-add_subdirectory(${INTRSRC} ${INTRBUILD})
-include_directories(${INTRSRC}/include ${INTRBUILD}/include)
+find_package(LLVMGenXIntrinsics REQUIRED)
 
 include(cmake/spirv.cmake)
 include(${IGC_SOURCE_DIR}/cmake/utils.cmake)
-- 
2.17.1