summaryrefslogtreecommitdiff
path: root/dev-libs/rocm-device-libs/files/rocm-device-libs-5.5.0-test-bitcode-dir.patch
blob: 2a307786edd5274d3792a88036d73a8f95b629a6 (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
`--rocm-device-lib-path` is needed to execute the tests because they are not
installed to system yet
===================================================================
--- ROCm-Device-Libs-rocm-6.0.0.orig/test/compile/CMakeLists.txt
+++ ROCm-Device-Libs-rocm-6.0.0/test/compile/CMakeLists.txt
@@ -30,6 +30,7 @@ function(add_compile_test test_name func
      -DFILECHECK_BIN=${FILECHECK_BIN}
      -DOUTPUT_FILE=output.${name}.${test_cpu}.s
      -DINPUT_FILE=${CMAKE_CURRENT_SOURCE_DIR}/${func_name}.cl
+     -DAMDGCN_BITCODES=${PROJECT_BINARY_DIR}/lib/amdgcn/bitcode
      -DTEST_CPU=${test_cpu}
      -DEXTRA_CHECK_PREFIX=${extra_check_prefixes}
      -P ${script})
Index: ROCm-Device-Libs-rocm-6.0.0/test/compile/RunConstantFoldTest.cmake
===================================================================
--- ROCm-Device-Libs-rocm-6.0.0.orig/test/compile/RunConstantFoldTest.cmake
+++ ROCm-Device-Libs-rocm-6.0.0/test/compile/RunConstantFoldTest.cmake
@@ -16,6 +16,7 @@ execute_process(COMMAND
   -target amdgcn-amd-amdhsa -mcpu=${TEST_CPU}
   -Xclang -finclude-default-header
   --rocm-path=${BINARY_DIR}
+  --rocm-device-lib-path=${AMDGCN_BITCODES}
   -mllvm -amdgpu-simplify-libcall=0
   -o ${OUTPUT_FILE} ${INPUT_FILE}
   RESULT_VARIABLE CLANG_RESULT
Index: ROCm-Device-Libs-rocm-6.0.0/test/compile/RunCompileTest.cmake
===================================================================
--- ROCm-Device-Libs-rocm-6.0.0.orig/test/compile/RunCompileTest.cmake
+++ ROCm-Device-Libs-rocm-6.0.0/test/compile/RunCompileTest.cmake
@@ -16,6 +16,7 @@ execute_process(COMMAND
   -target amdgcn-amd-amdhsa -mcpu=${TEST_CPU}
   -Xclang -finclude-default-header
   --rocm-path=${BINARY_DIR}
+  --rocm-device-lib-path=${AMDGCN_BITCODES}
   -mllvm -amdgpu-simplify-libcall=0
   -o ${OUTPUT_FILE} ${INPUT_FILE}
   RESULT_VARIABLE CLANG_RESULT