summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2022-06-17 03:52:58 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2022-06-17 08:30:06 (GMT)
commit2f913cdb3671a32f0fbcf84e40e8640689deae33 (patch)
tree65efd4904b29163d87c26f38763a0bcc69ba8111
parenta499bad106e1d1e6b15c64d44fae6fa7fa111e9e (diff)
downloadmeta-intel-2f913cdb3671a32f0fbcf84e40e8640689deae33.tar.gz
intel-graphics-compiler: upgrade 1.0.11279 -> 1.0.11378
Remove the backported patch. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/991fd3d661efcb4fb6df63b76310d6e634b05c39.patch447
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11378.bb (renamed from dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11279.bb)3
2 files changed, 1 insertions, 449 deletions
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/991fd3d661efcb4fb6df63b76310d6e634b05c39.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/991fd3d661efcb4fb6df63b76310d6e634b05c39.patch
deleted file mode 100644
index bcf31fd..0000000
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/files/991fd3d661efcb4fb6df63b76310d6e634b05c39.patch
+++ /dev/null
@@ -1,447 +0,0 @@
1From 991fd3d661efcb4fb6df63b76310d6e634b05c39 Mon Sep 17 00:00:00 2001
2From: "Grzywacz, Maciej" <maciej.grzywacz@intel.com>
3Date: Tue, 10 May 2022 09:44:09 +0000
4Subject: [PATCH] Fix IGC OS linux buildbreak
5
6Fix finding lldelf and SpirvLLVMTranslator
7
8Upstream-Status: Backport
9Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
10---
11 IGC/cmake/igc_find_liblldELF.cmake | 128 +++++----
12 .../modules/FindSPIRVLLVMTranslator.cmake | 271 +++++++++++-------
13 2 files changed, 252 insertions(+), 147 deletions(-)
14
15diff --git a/IGC/cmake/igc_find_liblldELF.cmake b/IGC/cmake/igc_find_liblldELF.cmake
16index b014910d2e9..c6d5765d5df 100644
17--- a/IGC/cmake/igc_find_liblldELF.cmake
18+++ b/IGC/cmake/igc_find_liblldELF.cmake
19@@ -10,61 +10,89 @@
20 # IGC_OPTION__LLDELF_H_DIR - Specify additional directories for searching lldELF headers
21
22 function(add_lld_library LIB_NAME)
23- find_library(${LIB_NAME}_PATH_RELEASE
24- ${LIB_NAME}
25- PATHS "${IGC_OPTION__LLD_DIR}/Release/lib"
26- PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/lib")
27-
28- if("${${LIB_NAME}_PATH_RELEASE}" STREQUAL "${LIB_NAME}_PATH_RELEASE-NOTFOUND")
29- message(FATAL_ERROR
30- "Cannot find ${LIB_NAME} library in Release version in ${IGC_OPTION__LLD_DIR}")
31- endif()
32-
33- find_library(${LIB_NAME}_PATH_DEBUG
34- ${LIB_NAME}
35- PATHS "${IGC_OPTION__LLD_DIR}/Debug/lib"
36- PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/lib")
37-
38- if("${${LIB_NAME}_PATH_DEBUG}" STREQUAL "${LIB_NAME}_PATH_DEBUG-NOTFOUND")
39- message(FATAL_ERROR
40- "Cannot find ${LIB_NAME} library in Debug version in ${IGC_OPTION__LLD_DIR}")
41+ if(WIN32)
42+ find_library(${LIB_NAME}_PATH_RELEASE
43+ ${LIB_NAME}
44+ PATHS "${IGC_OPTION__LLD_DIR}/Release/lib"
45+ PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/lib")
46+
47+ if("${${LIB_NAME}_PATH_RELEASE}" STREQUAL "${LIB_NAME}_PATH_RELEASE-NOTFOUND")
48+ message(FATAL_ERROR
49+ "Cannot find ${LIB_NAME} library in Release version in ${IGC_OPTION__LLD_DIR}")
50+ endif()
51+
52+ find_library(${LIB_NAME}_PATH_DEBUG
53+ ${LIB_NAME}
54+ PATHS "${IGC_OPTION__LLD_DIR}/Debug/lib"
55+ PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/lib")
56+
57+ if("${${LIB_NAME}_PATH_DEBUG}" STREQUAL "${LIB_NAME}_PATH_DEBUG-NOTFOUND")
58+ message(FATAL_ERROR
59+ "Cannot find ${LIB_NAME} library in Debug version in ${IGC_OPTION__LLD_DIR}")
60+ endif()
61+
62+ add_library(${LIB_NAME} UNKNOWN IMPORTED GLOBAL)
63+ set_target_properties(${LIB_NAME} PROPERTIES
64+ IMPORTED_LOCATION_RELEASE "${${LIB_NAME}_PATH_RELEASE}"
65+ IMPORTED_LOCATION_RELEASEINTERNAL "${${LIB_NAME}_PATH_RELEASE}"
66+ IMPORTED_LOCATION_DEBUG "${${LIB_NAME}_PATH_DEBUG}"
67+ )
68+ else()
69+ find_library(${LIB_NAME}_PATH
70+ ${LIB_NAME}
71+ PATHS "${IGC_OPTION__LLDELF_LIB_DIR}"
72+ PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/lib")
73+
74+ if(${LIB_NAME}_PATH-NOTFOUND)
75+ message(FATAL_ERROR
76+ "Cannot find ${LIB_NAME} library, please install missing library or provide the path by IGC_OPTION__LLDELF_LIB_DIR")
77+ endif()
78+ add_library(${LIB_NAME} UNKNOWN IMPORTED GLOBAL)
79+ set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION ${${LIB_NAME}_PATH})
80 endif()
81-
82- add_library(${LIB_NAME} UNKNOWN IMPORTED GLOBAL)
83- set_target_properties(${LIB_NAME} PROPERTIES
84- IMPORTED_LOCATION_RELEASE "${${LIB_NAME}_PATH_RELEASE}"
85- IMPORTED_LOCATION_RELEASEINTERNAL "${${LIB_NAME}_PATH_RELEASE}"
86- IMPORTED_LOCATION_DEBUG "${${LIB_NAME}_PATH_DEBUG}"
87- )
88 endfunction()
89
90 function(add_lld_executable EXE_NAME)
91- find_program(${EXE_NAME}_PATH_RELEASE
92- ${EXE_NAME}
93- PATHS "${IGC_OPTION__LLD_DIR}/Release/bin"
94- PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/bin")
95-
96- if("${${EXE_NAME}_PATH_RELEASE}" STREQUAL "${EXE_NAME}_PATH_RELEASE-NOTFOUND")
97- message(FATAL_ERROR
98- "Cannot find ${EXE_NAME} executable in Release version in ${IGC_OPTION__LLD_DIR}")
99+ if(WIN32)
100+ find_program(${EXE_NAME}_PATH_RELEASE
101+ ${EXE_NAME}
102+ PATHS "${IGC_OPTION__LLD_DIR}/Release/bin"
103+ PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/bin")
104+
105+ if("${${EXE_NAME}_PATH_RELEASE}" STREQUAL "${EXE_NAME}_PATH_RELEASE-NOTFOUND")
106+ message(FATAL_ERROR
107+ "Cannot find ${EXE_NAME} executable in Release version in ${IGC_OPTION__LLD_DIR}")
108+ endif()
109+
110+ find_program(${EXE_NAME}_PATH_DEBUG
111+ ${EXE_NAME}
112+ PATHS "${IGC_OPTION__LLD_DIR}/Debug/bin"
113+ PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/bin")
114+
115+ if("${${EXE_NAME}_PATH_DEBUG}" STREQUAL "${EXE_NAME}_PATH_DEBUG-NOTFOUND")
116+ message(FATAL_ERROR
117+ "Cannot find ${EXE_NAME} executable in Debug version in ${IGC_OPTION__LLD_DIR}")
118+ endif()
119+
120+ add_executable(${EXE_NAME} IMPORTED GLOBAL)
121+ set_target_properties(${EXE_NAME} PROPERTIES
122+ IMPORTED_LOCATION_RELEASE "${${EXE_NAME}_PATH_RELEASE}"
123+ IMPORTED_LOCATION_RELEASEINTERNAL "${${EXE_NAME}_PATH_RELEASE}"
124+ IMPORTED_LOCATION_DEBUG "${${EXE_NAME}_PATH_DEBUG}"
125+ )
126+ else()
127+ find_program(${EXE_NAME}_PATH
128+ ${EXE_NAME}
129+ PATHS "${IGC_OPTION__LLD_BIN_DIR}"
130+ PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/bin")
131+
132+ if(${EXE_NAME}_PATH-NOTFOUND)
133+ message(FATAL_ERROR "Cannot find ${EXE_NAME} executable, please install missing executable or provide the path by IGC_OPTION__LLD_BIN_DIR")
134+ endif()
135+
136+ add_executable(${EXE_NAME} IMPORTED GLOBAL)
137+ set_target_properties(${EXE_NAME} PROPERTIES IMPORTED_LOCATION ${${EXE_NAME}_PATH})
138 endif()
139-
140- find_program(${EXE_NAME}_PATH_DEBUG
141- ${EXE_NAME}
142- PATHS "${IGC_OPTION__LLD_DIR}/Debug/bin"
143- PATH_SUFFIXES "llvm-${LLVM_VERSION_MAJOR}/bin")
144-
145- if("${${EXE_NAME}_PATH_DEBUG}" STREQUAL "${EXE_NAME}_PATH_DEBUG-NOTFOUND")
146- message(FATAL_ERROR
147- "Cannot find ${EXE_NAME} executable in Debug version in ${IGC_OPTION__LLD_DIR}")
148- endif()
149-
150- add_executable(${EXE_NAME} IMPORTED GLOBAL)
151- set_target_properties(${EXE_NAME} PROPERTIES
152- IMPORTED_LOCATION_RELEASE "${${EXE_NAME}_PATH_RELEASE}"
153- IMPORTED_LOCATION_RELEASEINTERNAL "${${EXE_NAME}_PATH_RELEASE}"
154- IMPORTED_LOCATION_DEBUG "${${EXE_NAME}_PATH_DEBUG}"
155- )
156 endfunction()
157
158 if(IGC_BUILD__LLVM_SOURCES)
159diff --git a/IGC/cmake/modules/FindSPIRVLLVMTranslator.cmake b/IGC/cmake/modules/FindSPIRVLLVMTranslator.cmake
160index de2ff5baad1..0d8d00b4a5d 100644
161--- a/IGC/cmake/modules/FindSPIRVLLVMTranslator.cmake
162+++ b/IGC/cmake/modules/FindSPIRVLLVMTranslator.cmake
163@@ -15,109 +15,186 @@
164 # Optionally, llvm-spirv tool will be checked and LLVMSPIRVTranslator_Tool_FOUND
165 # will be set to true and llvm-spirv executable target will be defined.
166
167-find_library(SPIRVLLVMTranslator_Library_Release LLVMSPIRVLib PATHS "${LLVM_DIR}/Release/lib")
168-find_library(SPIRVLLVMTranslator_Library_Debug LLVMSPIRVLib PATHS "${LLVM_DIR}/Debug/lib")
169-
170-find_path(SPIRVLLVMTranslator_INCLUDE_DIR "LLVMSPIRVLib.h"
171- PATH_SUFFIXES LLVMSPIRVLib
172- PATHS "${IGC_OPTION__SPIRV_TRANSLATOR_SOURCE_DIR}/include"
173- )
174-
175-# Try to find version and llvm-spirv.
176-if(SPIRVLLVMTranslator_Library_Release AND SPIRVLLVMTranslator_Library_Debug)
177- set(SPIRVLLVMTranslator_Library_FOUND YES)
178-
179- get_filename_component(_libdir_Release ${SPIRVLLVMTranslator_Library_Release} DIRECTORY)
180- get_filename_component(_libdir_Debug ${SPIRVLLVMTranslator_Library_Debug} DIRECTORY)
181-
182- # Get library version. Manual parsing is used because it is quite easy and
183- # will work for both linux and windows (which is lacking pkg-config).
184- file(STRINGS "${_libdir_Release}/pkgconfig/LLVMSPIRVLib.pc" _version_file_release
185- REGEX "Version: .*")
186- file(STRINGS "${_libdir_Debug}/pkgconfig/LLVMSPIRVLib.pc" _version_file_debug
187- REGEX "Version: .*")
188-
189- if(NOT _version_file_release OR NOT _version_file_debug)
190- message(AUTHOR_WARNING "LLVMSPIRVLib is found, but LLVMSPIRVLib.pc is missing!")
191+if(WIN32)
192+ find_library(SPIRVLLVMTranslator_Library_Release LLVMSPIRVLib PATHS "${LLVM_DIR}/Release/lib")
193+ find_library(SPIRVLLVMTranslator_Library_Debug LLVMSPIRVLib PATHS "${LLVM_DIR}/Debug/lib")
194+
195+ find_path(SPIRVLLVMTranslator_INCLUDE_DIR "LLVMSPIRVLib.h"
196+ PATH_SUFFIXES LLVMSPIRVLib
197+ PATHS "${IGC_OPTION__SPIRV_TRANSLATOR_SOURCE_DIR}/include"
198+ )
199+
200+ # Try to find version and llvm-spirv.
201+ if(SPIRVLLVMTranslator_Library_Release AND SPIRVLLVMTranslator_Library_Debug)
202+ set(SPIRVLLVMTranslator_Library_FOUND YES)
203+
204+ get_filename_component(_libdir_Release ${SPIRVLLVMTranslator_Library_Release} DIRECTORY)
205+ get_filename_component(_libdir_Debug ${SPIRVLLVMTranslator_Library_Debug} DIRECTORY)
206+
207+ # Get library version. Manual parsing is used because it is quite easy and
208+ # will work for both linux and windows (which is lacking pkg-config).
209+ file(STRINGS "${_libdir_Release}/pkgconfig/LLVMSPIRVLib.pc" _version_file_release
210+ REGEX "Version: .*")
211+ file(STRINGS "${_libdir_Debug}/pkgconfig/LLVMSPIRVLib.pc" _version_file_debug
212+ REGEX "Version: .*")
213+
214+ if(NOT _version_file_release OR NOT _version_file_debug)
215+ message(AUTHOR_WARNING "LLVMSPIRVLib is found, but LLVMSPIRVLib.pc is missing!")
216+ endif()
217+ string(REPLACE "Version: " "" SPIRVLLVMTranslator_VERSION_Release "${_version_file_release}")
218+ string(REPLACE "Version: " "" SPIRVLLVMTranslator_VERSION_Debug "${_version_file_debug}")
219+ set(SPIRVLLVMTranslator_VERSION_Release ${SPIRVLLVMTranslator_VERSION_Release} CACHE STRING "SPIRVLLVMTranslator release version")
220+ set(SPIRVLLVMTranslator_VERSION_Debug ${SPIRVLLVMTranslator_VERSION_Debug} CACHE STRING "SPIRVLLVMTranslator debug version")
221+
222+ # Try to find llvm-spirv.
223+ find_program(SPIRVLLVMTranslator_Tool_Release llvm-spirv
224+ PATHS ${_libdir_Release}/../bin
225+ NO_DEFAULT_PATH
226+ )
227+ find_program(SPIRVLLVMTranslator_Tool_Debug llvm-spirv
228+ PATHS ${_libdir_Debug}/../bin
229+ NO_DEFAULT_PATH
230+ )
231+
232+ if(SPIRVLLVMTranslator_Tool_Release AND SPIRVLLVMTranslator_Tool_Debug)
233+ set(SPIRVLLVMTranslator_Tool_FOUND YES)
234+ endif()
235+
236+ unset(_libdir)
237 endif()
238- string(REPLACE "Version: " "" SPIRVLLVMTranslator_VERSION_Release "${_version_file_release}")
239- string(REPLACE "Version: " "" SPIRVLLVMTranslator_VERSION_Debug "${_version_file_debug}")
240- set(SPIRVLLVMTranslator_VERSION_Release ${SPIRVLLVMTranslator_VERSION_Release} CACHE STRING "SPIRVLLVMTranslator release version")
241- set(SPIRVLLVMTranslator_VERSION_Debug ${SPIRVLLVMTranslator_VERSION_Debug} CACHE STRING "SPIRVLLVMTranslator debug version")
242-
243- # Try to find llvm-spirv.
244- find_program(SPIRVLLVMTranslator_Tool_Release llvm-spirv
245- PATHS ${_libdir_Release}/../bin
246- NO_DEFAULT_PATH
247+
248+ include(FindPackageHandleStandardArgs)
249+ find_package_handle_standard_args(SPIRVLLVMTranslator_Release
250+ REQUIRED_VARS SPIRVLLVMTranslator_Library_Release SPIRVLLVMTranslator_INCLUDE_DIR
251+ VERSION_VAR SPIRVLLVMTranslator_VERSION_Release
252+ HANDLE_COMPONENTS
253 )
254- find_program(SPIRVLLVMTranslator_Tool_Debug llvm-spirv
255- PATHS ${_libdir_Debug}/../bin
256- NO_DEFAULT_PATH
257+ find_package_handle_standard_args(SPIRVLLVMTranslator_Debug
258+ REQUIRED_VARS SPIRVLLVMTranslator_Library_Debug SPIRVLLVMTranslator_INCLUDE_DIR
259+ VERSION_VAR SPIRVLLVMTranslator_VERSION_Debug
260+ HANDLE_COMPONENTS
261 )
262
263- if(SPIRVLLVMTranslator_Tool_Release AND SPIRVLLVMTranslator_Tool_Debug)
264- set(SPIRVLLVMTranslator_Tool_FOUND YES)
265+ # Mark all cached variables as advanced.
266+ if(SPIRVLLVMTranslator_Release_FOUND)
267+ mark_as_advanced(SPIRVLLVMTranslator_Library_Release)
268+ mark_as_advanced(SPIRVLLVMTranslator_INCLUDE_DIR)
269+ mark_as_advanced(SPIRVLLVMTranslator_VERSION_Release)
270 endif()
271
272- unset(_libdir)
273-endif()
274-
275-include(FindPackageHandleStandardArgs)
276-find_package_handle_standard_args(SPIRVLLVMTranslator_Release
277- REQUIRED_VARS SPIRVLLVMTranslator_Library_Release SPIRVLLVMTranslator_INCLUDE_DIR
278- VERSION_VAR SPIRVLLVMTranslator_VERSION_Release
279- HANDLE_COMPONENTS
280- )
281-find_package_handle_standard_args(SPIRVLLVMTranslator_Debug
282- REQUIRED_VARS SPIRVLLVMTranslator_Library_Debug SPIRVLLVMTranslator_INCLUDE_DIR
283- VERSION_VAR SPIRVLLVMTranslator_VERSION_Debug
284- HANDLE_COMPONENTS
285- )
286-
287-# Mark all cached variables as advanced.
288-if(SPIRVLLVMTranslator_Release_FOUND)
289- mark_as_advanced(SPIRVLLVMTranslator_Library_Release)
290- mark_as_advanced(SPIRVLLVMTranslator_INCLUDE_DIR)
291- mark_as_advanced(SPIRVLLVMTranslator_VERSION_Release)
292-endif()
293-
294-if(SPIRVLLVMTranslator_Debug_FOUND)
295- mark_as_advanced(SPIRVLLVMTranslator_Library_Debug)
296- mark_as_advanced(SPIRVLLVMTranslator_INCLUDE_DIR)
297- mark_as_advanced(SPIRVLLVMTranslator_VERSION_Debug)
298-endif()
299-
300-if(SPIRVLLVMTranslator_Tool_Release_FOUND)
301- mark_as_advanced(SPIRVLLVMTranslator_Tool_Release)
302-endif()
303-
304-if(SPIRVLLVMTranslator_Tool_Debug_FOUND)
305-mark_as_advanced(SPIRVLLVMTranslator_Tool_Debug)
306-endif()
307-
308-# Add interface target for library.
309-if(SPIRVLLVMTranslator_FOUND AND NOT TARGET LLVMSPIRVLib)
310- add_library(LLVMSPIRVLib IMPORTED UNKNOWN)
311- set_target_properties(LLVMSPIRVLib PROPERTIES
312- IMPORTED_LOCATION_RELEASE "${SPIRVLLVMTranslator_Library_Release}"
313- IMPORTED_LOCATION_RELEASEINTERNAL "${SPIRVLLVMTranslator_Library_Release}"
314- IMPORTED_LOCATION_DEBUG "${SPIRVLLVMTranslator_Library_Debug}"
315- INTERFACE_INCLUDE_DIRECTORIES ${SPIRVLLVMTranslator_INCLUDE_DIR}
316- )
317-endif()
318+ if(SPIRVLLVMTranslator_Debug_FOUND)
319+ mark_as_advanced(SPIRVLLVMTranslator_Library_Debug)
320+ mark_as_advanced(SPIRVLLVMTranslator_INCLUDE_DIR)
321+ mark_as_advanced(SPIRVLLVMTranslator_VERSION_Debug)
322+ endif()
323+
324+ if(SPIRVLLVMTranslator_Tool_Release_FOUND)
325+ mark_as_advanced(SPIRVLLVMTranslator_Tool_Release)
326+ endif()
327+
328+ if(SPIRVLLVMTranslator_Tool_Debug_FOUND)
329+ mark_as_advanced(SPIRVLLVMTranslator_Tool_Debug)
330+ endif()
331+
332+ # Add interface target for library.
333+ if(SPIRVLLVMTranslator_FOUND AND NOT TARGET LLVMSPIRVLib)
334+ add_library(LLVMSPIRVLib IMPORTED UNKNOWN)
335+ set_target_properties(LLVMSPIRVLib PROPERTIES
336+ IMPORTED_LOCATION_RELEASE "${SPIRVLLVMTranslator_Library_Release}"
337+ IMPORTED_LOCATION_RELEASEINTERNAL "${SPIRVLLVMTranslator_Library_Release}"
338+ IMPORTED_LOCATION_DEBUG "${SPIRVLLVMTranslator_Library_Debug}"
339+ INTERFACE_INCLUDE_DIRECTORIES ${SPIRVLLVMTranslator_INCLUDE_DIR}
340+ )
341+ endif()
342+
343+ if (NOT IGC_BUILD__SPIRV_TRANSLATOR_SOURCES)
344+ set_target_properties(LLVMSPIRVLib PROPERTIES
345+ INTERFACE_INCLUDE_DIRECTORIES ${SPIRVLLVMTranslator_INCLUDE_DIR}
346+ )
347+ endif()
348
349-if (NOT IGC_BUILD__SPIRV_TRANSLATOR_SOURCES)
350- set_target_properties(LLVMSPIRVLib PROPERTIES
351- INTERFACE_INCLUDE_DIRECTORIES ${SPIRVLLVMTranslator_INCLUDE_DIR}
352+ # Add interface target for llvm-spirv.
353+ if(SPIRVLLVMTranslator_Tool_FOUND AND NOT TARGET llvm-spirv)
354+ add_executable(llvm-spirv IMPORTED)
355+ set_target_properties(llvm-spirv PROPERTIES
356+ IMPORTED_LOCATION_RELEASE "${SPIRVLLVMTranslator_Tool_Release}"
357+ IMPORTED_LOCATION_RELEASEINTERNAL "${SPIRVLLVMTranslator_Tool_Release}"
358+ IMPORTED_LOCATION_DEBUG "${SPIRVLLVMTranslator_Tool_Debug}"
359+ )
360+ endif()
361+else()
362+ find_library(SPIRVLLVMTranslator_Library LLVMSPIRVLib PATHS ${LLVM_LIB_DIR})
363+ find_path(SPIRVLLVMTranslator_INCLUDE_DIR "LLVMSPIRVLib.h"
364+ PATH_SUFFIXES LLVMSPIRVLib
365+ PATHS "${IGC_OPTION__SPIRV_TRANSLATOR_SOURCE_DIR}/include"
366 )
367-endif()
368-
369-# Add interface target for llvm-spirv.
370-if(SPIRVLLVMTranslator_Tool_FOUND AND NOT TARGET llvm-spirv)
371- add_executable(llvm-spirv IMPORTED)
372- set_target_properties(llvm-spirv PROPERTIES
373- IMPORTED_LOCATION_RELEASE "${SPIRVLLVMTranslator_Tool_Release}"
374- IMPORTED_LOCATION_RELEASEINTERNAL "${SPIRVLLVMTranslator_Tool_Release}"
375- IMPORTED_LOCATION_DEBUG "${SPIRVLLVMTranslator_Tool_Debug}"
376+
377+ # Try to find version and llvm-spirv.
378+ if(SPIRVLLVMTranslator_Library)
379+ set(SPIRVLLVMTranslator_Library_FOUND YES)
380+
381+ get_filename_component(_libdir ${SPIRVLLVMTranslator_Library} DIRECTORY)
382+
383+ # Get library version. Manual parsing is used because it is quite easy and
384+ # will work for both linux and windows (which is lacking pkg-config).
385+ file(STRINGS "${_libdir}/pkgconfig/LLVMSPIRVLib.pc" _version_file
386+ REGEX "Version: .*")
387+ if(NOT _version_file)
388+ message(AUTHOR_WARNING "LLVMSPIRVLib is found, but LLVMSPIRVLib.pc is missing!")
389+ endif()
390+ string(REPLACE "Version: " "" SPIRVLLVMTranslator_VERSION "${_version_file}")
391+ set(SPIRVLLVMTranslator_VERSION ${SPIRVLLVMTranslator_VERSION} CACHE STRING "SPIRVLLVMTranslator version")
392+
393+ # Try to find llvm-spirv.
394+ find_program(SPIRVLLVMTranslator_Tool llvm-spirv
395+ PATHS ${_libdir}/../bin
396+ NO_DEFAULT_PATH
397+ )
398+ if(SPIRVLLVMTranslator_Tool)
399+ set(SPIRVLLVMTranslator_Tool_FOUND YES)
400+ endif()
401+
402+ unset(_libdir)
403+ endif()
404+
405+ include(FindPackageHandleStandardArgs)
406+ find_package_handle_standard_args(SPIRVLLVMTranslator
407+ REQUIRED_VARS SPIRVLLVMTranslator_Library SPIRVLLVMTranslator_INCLUDE_DIR
408+ VERSION_VAR SPIRVLLVMTranslator_VERSION
409+ HANDLE_COMPONENTS
410 )
411-endif()
412+
413+ # Mark all cached variables as advanced.
414+ if(SPIRVLLVMTranslator_FOUND)
415+ mark_as_advanced(SPIRVLLVMTranslator_Library)
416+ mark_as_advanced(SPIRVLLVMTranslator_INCLUDE_DIR)
417+ mark_as_advanced(SPIRVLLVMTranslator_VERSION)
418+ endif()
419+
420+ if(SPIRVLLVMTranslator_Tool_FOUND)
421+ mark_as_advanced(SPIRVLLVMTranslator_Tool)
422+ endif()
423+
424+ # Add interface target for library.
425+ if(SPIRVLLVMTranslator_FOUND AND NOT TARGET LLVMSPIRVLib)
426+ add_library(LLVMSPIRVLib IMPORTED UNKNOWN)
427+ set_target_properties(LLVMSPIRVLib PROPERTIES
428+ IMPORTED_LOCATION ${SPIRVLLVMTranslator_Library}
429+ INTERFACE_INCLUDE_DIRECTORIES ${SPIRVLLVMTranslator_INCLUDE_DIR}
430+ )
431+ endif()
432+
433+ if (NOT IGC_BUILD__SPIRV_TRANSLATOR_SOURCES)
434+ set_target_properties(LLVMSPIRVLib PROPERTIES
435+ INTERFACE_INCLUDE_DIRECTORIES ${SPIRVLLVMTranslator_INCLUDE_DIR}
436+ )
437+ endif()
438+
439+ # Add interface target for llvm-spirv.
440+ if(SPIRVLLVMTranslator_Tool_FOUND AND NOT TARGET llvm-spirv)
441+ add_executable(llvm-spirv IMPORTED)
442+ set_target_properties(llvm-spirv PROPERTIES
443+ IMPORTED_LOCATION ${SPIRVLLVMTranslator_Tool}
444+ )
445+ endif()
446+endif()
447\ No newline at end of file
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11279.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11378.bb
index aec820c..f9654d3 100644
--- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11279.bb
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.11378.bb
@@ -14,12 +14,11 @@ SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;nam
14 git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=SPIRV-Headers;name=spirv-headers;branch=master \ 14 git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=SPIRV-Headers;name=spirv-headers;branch=master \
15 file://0003-Improve-Reproducibility-for-src-package.patch \ 15 file://0003-Improve-Reproducibility-for-src-package.patch \
16 file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \ 16 file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \
17 file://991fd3d661efcb4fb6df63b76310d6e634b05c39.patch \
18 " 17 "
19 18
20SRC_URI:append:class-native = " file://0001-fix-tblgen.patch" 19SRC_URI:append:class-native = " file://0001-fix-tblgen.patch"
21 20
22SRCREV_igc = "b2c14d219dc4d3e384f217ef6bd2c2db1bd6b9ce" 21SRCREV_igc = "9a6528771ee9b41aa06bbaa0da90f50b94e170af"
23SRCREV_vc = "4ce354da51f219bbdfa9c4cd5d8f640e92e38511" 22SRCREV_vc = "4ce354da51f219bbdfa9c4cd5d8f640e92e38511"
24SRCREV_spirv-tools = "45dd184c790d6bfc78a5a74a10c37e888b1823fa" 23SRCREV_spirv-tools = "45dd184c790d6bfc78a5a74a10c37e888b1823fa"
25SRCREV_spirv-headers = "b42ba6d92faf6b4938e6f22ddd186dbdacc98d78" 24SRCREV_spirv-headers = "b42ba6d92faf6b4938e6f22ddd186dbdacc98d78"