File: specify-clang-version.patch

package info (click to toggle)
rocm-llvm 7.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,652 kB
  • sloc: lisp: 30,221; ansic: 11,104; cpp: 10,721; sh: 179; python: 47; makefile: 37
file content (71 lines) | stat: -rw-r--r-- 2,466 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
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
63
64
65
66
67
68
69
70
71
From: Cordell Bloor <cgmb@debian.org>
Date: Mon, 22 Sep 2025 14:45:13 -0600
Subject: specify clang version

---
 amd/hipcc/src/hipBin_amd.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/amd/hipcc/src/hipBin_amd.h
+++ b/amd/hipcc/src/hipBin_amd.h
@@ -153,7 +153,7 @@
   string hipLdFlags;
   const string& hipClangPath = getCompilerPath();
   // If $HIPCC clang++ is not compiled, use clang instead
-  string hipCC = "\"" + hipClangPath + "/clang++";
+  string hipCC = "\"" + hipClangPath + "/clang++-21";
   if (!fs::exists(hipCC)) {
     hipLdFlags = "--driver-mode=g++";
   }
@@ -227,10 +227,10 @@
   const string& hipClangPath = getCompilerPath();
   const string& hipPath = getHipPath();
   if (isWindows()) {
-    string cmd = hipClangPath + "/clang++ --version";
+    string cmd = hipClangPath + "/clang++-21 --version";
     system(cmd.c_str());  // hipclang version
     cout << "llc-version :" << endl;
-    cmd = hipClangPath + "/llc --version";
+    cmd = hipClangPath + "/llc-21 --version";
     system(cmd.c_str());  // llc version
     cout << "hip-clang-cxxflags :" << endl;
     cmd = hipPath + "/bin/hipcc  --cxxflags";
@@ -240,9 +240,9 @@
     system(cmd.c_str());  // ld flags
     cout << endl;
   } else {
-    string cmd = hipClangPath + "/clang++ --version";
+    string cmd = hipClangPath + "/clang++-21 --version";
     system(cmd.c_str());  // hipclang version
-    cmd = hipClangPath + "/llc --version";
+    cmd = hipClangPath + "/llc-21 --version";
     system(cmd.c_str());  // llc version
     cout << "hip-clang-cxxflags :" << endl;
     cmd = hipPath + "/bin/hipcc --cxxflags";
@@ -258,7 +258,7 @@
   string out, compilerVersion;
   const string& hipClangPath = getCompilerPath();
   fs::path cmdAmd = hipClangPath;
-  cmdAmd /= "clang++";
+  cmdAmd /= "clang++-21";
   if (canRunCompiler(cmdAmd.string(), out) || canRunCompiler("amdclang++", out)) {
     regex regexp("([0-9.]+)");
     smatch m;
@@ -340,7 +340,7 @@
   constructCompilerPath();
   const string& hipClangPath = getCompilerPath();
   fs::path cmdAmd = hipClangPath;
-  cmdAmd /= "clang++";
+  cmdAmd /= "clang++-21";
   const EnvVariables& var = getEnvVariables();
   bool detected = false;
   if (var.hipPlatformEnv_.empty()) {
@@ -386,7 +386,7 @@
   if (isWindows())
     compiler /= "clang.exe";
   else
-    compiler /= "clang++";
+    compiler /= "clang++-21";
 
   if (!fs::exists(compiler)) {
     fs::path compiler = hipClangPath;