File: use-system-clang-resource-directory.patch

package info (click to toggle)
hipify 7.0.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 10,336 kB
  • sloc: cpp: 31,275; perl: 17,300; sh: 167; ruby: 23; python: 10; makefile: 9; ansic: 4
file content (24 lines) | stat: -rw-r--r-- 694 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
From: Cordell Bloor <cgmb@debian.org>
Date: Wed, 10 Sep 2025 19:03:48 -0600
Subject: use system clang resource directory

Forwarded: no
---
 src/main.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/src/main.cpp
+++ b/src/main.cpp
@@ -162,6 +162,12 @@
     std::string sRes = "-resource-dir=" + clang_res_path;
     Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(sRes.c_str(), ct::ArgumentInsertPosition::BEGIN));
   }
+  // 4. Check for system clang
+  if (!bExist) {
+    clang_res_path = "/usr/lib/llvm-" + clang_ver + "/lib/clang/" + clang_ver;
+    clang_inc_path = clang_res_path + "/" + include_dir;
+    bExist = checkLLVM(clang_inc_path);
+  }
   return bExist;
 }