[clang] [HIP][Driver] Use alternative `/lib64` or `/lib` depending on `amdhip64` library location (PR #211587)

Juan Manuel Martinez CaamaƱo via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 4 04:45:34 PDT 2026


================
@@ -456,8 +457,25 @@ void RocmInstallationDetector::detectHIPRuntime() {
     llvm::sys::path::append(BinPath, "bin");
     IncludePath = InstallPath;
     llvm::sys::path::append(IncludePath, "include");
-    LibPath = InstallPath;
-    llvm::sys::path::append(LibPath, "lib");
+
+    // ROCm's lib path is the place where the amdhsa64 library is located.
+    // Probe for it and fallback to /rocm/lib if we cannot find it.
+    StringRef LibAmdHip64 =
+        HostTriple.isOSMSVCRT() ? "amdhip64.lib" : "libamdhip64.so";
+    LibPath.clear();
+    for (StringRef LibPathSuffix : {"lib", "lib64"}) {
----------------
jmmartinez wrote:

@stellaraccident would it be possible to take a look at this patch?

https://github.com/llvm/llvm-project/pull/211587


More information about the cfe-commits mailing list