File: 0007-restrict-hiprtc-cmake-search-to-clang-21.patch

package info (click to toggle)
rocm-hipamd 6.4.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,040 kB
  • sloc: cpp: 211,057; ansic: 35,860; sh: 755; python: 623; perl: 275; asm: 166; makefile: 27
file content (27 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
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
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Tue, 27 Jun 2023 13:06:53 -0600
Subject: restrict hiprtc cmake search to clang-21

Restrict the LLVM find_package search to clang-21 and ensure that the
search for clang prefers the same package found for LLVM. This is not
a problem for the upstream project, as it only ships one version of
clang.

Forwarded: not-needed
---
 hipamd/src/hiprtc/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/hipamd/src/hiprtc/CMakeLists.txt
+++ b/hipamd/src/hiprtc/CMakeLists.txt
@@ -133,8 +133,8 @@
 # Enable preprocessed hiprtc-builtins library
 include(HIPRTC RESULT_VARIABLE HIPRTC_CMAKE)
 # Requires clang and llvm-mc to create this library.
-find_program(clang clang HINTS ${ROCM_PATH}/llvm/bin ${ROCM_PATH})
-find_program(llvm-mc llvm-mc HINTS ${ROCM_PATH}/llvm/bin ${ROCM_PATH})
+find_program(clang clang clang-21 HINTS ${ROCM_PATH}/llvm/bin ${ROCM_PATH})
+find_program(llvm-mc llvm-mc llvm-mc-21 HINTS ${ROCM_PATH}/llvm/bin ${ROCM_PATH})
 set(HIPRTC_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/hip_rtc_gen")
 set(HIPRTC_GEN_HEADER "${HIPRTC_GEN_DIR}/hipRTC_header.h")
 set(HIPRTC_GEN_MCIN "${HIPRTC_GEN_DIR}/hipRTC_header.mcin")