meta-intel/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch
Yogesh Tyagi cea3080350 intel-graphics-compiler : upgrade 1.0.16510.2 -> 1.0.16900.23
Refresh patches

Release Notes:
https://github.com/intel/intel-graphics-compiler/releases/tag/igc-1.0.16900.23

Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2024-07-30 09:25:49 +08:00

34 lines
1.5 KiB
Diff

From ca136c04d4ac60e3febc8ea2b9c4d4736365a424 Mon Sep 17 00:00:00 2001
From: Lee Chee Yang <chee.yang.lee@intel.com>
Date: Wed, 2 Sep 2020 08:28:35 +0800
Subject: [PATCH] Improve Reproducibility for src package
Improve reproducibility for intel-graphics-compiler-src package.
needs to pass build path as environment variable to the build.
this only works on bison 3.7 onward, hence check for bison version
before adding the flags.
Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream]
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
---
visa/CMakeLists.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt
index 1b01b3389..8d608163d 100644
--- a/visa/CMakeLists.txt
+++ b/visa/CMakeLists.txt
@@ -133,8 +133,11 @@ endif()
set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp)
set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp)
-BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-vt -p CISA")
-FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}")
+if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.0")
+ set(BISON_EXTRA_FLAGS " --file-prefix-map=$ENV{B}=/igc/ ")
+endif()
+BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ")
+FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ")
ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser)
set(CISAScanner_dependencies)