================
@@ -457,6 +457,16 @@ void RocmInstallationDetector::detectHIPRuntime() {
llvm::sys::path::append(IncludePath, "include");
LibPath = InstallPath;
llvm::sys::path::append(LibPath, "lib");
+ // Debian multiarch: prefer <lib>/<triple> when libamdhip64.so lives
+ // there, so both the absolute path emitted by Linux::addOffloadRTLibs
+ // and the -L flag resolve to a real file. Guarded by FS.exists() so
+ // non-multiarch layouts (Fedora, Arch, /opt/rocm, etc.) fall through
+ // unchanged.
+ SmallString<0> MultiArchProbe = LibPath;
+ llvm::sys::path::append(MultiArchProbe, D.getTargetTriple(),
----------------
lamb-j wrote:
Should we refactor things to use getMultiarchTriple() instead of the raw triple?
https://github.com/llvm/llvm-project/pull/207624
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits