[clang] [HIP] Remove dots in HIP runtime path (PR #143792)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 19 07:03:07 PDT 2025


================
@@ -743,9 +743,11 @@ void Linux::AddHIPRuntimeLibArgs(const ArgList &Args,
       Args.MakeArgString(StringRef("-L") + RocmInstallation->getLibPath()));
 
   if (Args.hasFlag(options::OPT_frtlib_add_rpath,
-                   options::OPT_fno_rtlib_add_rpath, false))
-    CmdArgs.append(
-        {"-rpath", Args.MakeArgString(RocmInstallation->getLibPath())});
+                   options::OPT_fno_rtlib_add_rpath, false)) {
+    SmallString<0> p = RocmInstallation->getLibPath();
+    llvm::sys::path::remove_dots(p, true);
----------------
yxsamliu wrote:

so far the preferred style is like `remove_dots(p, /*remove_dot_dot=*/ true);`

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


More information about the cfe-commits mailing list