[clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 14:05:49 PDT 2024


================
@@ -342,6 +342,10 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
     StringRef Val = A->getValue();
     CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val));
   }
+
+  // Check ROCm path if specified
+  const ToolChain &TC = getToolChain();
+  TC.getDeviceLibs(Args);
----------------
jhuber6 wrote:

Doing `clang -v` will show you something like
```
Found HIP installation: /opt/rocm, version 6.0.32831
```
Can we not check that way?

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


More information about the cfe-commits mailing list