[flang-commits] [clang] [flang] [Flang][AMDGPU] Add rocm-path flag (PR #88190)
Dominik Adamski via flang-commits
flang-commits at lists.llvm.org
Wed Apr 10 05:26:09 PDT 2024
================
@@ -345,7 +345,13 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args,
// Check ROCm path if specified
const ToolChain &TC = getToolChain();
- TC.getDeviceLibs(Args);
+ std::string HIPVersion;
+ llvm::raw_string_ostream HIPInfo(HIPVersion);
+ TC.printVerboseInfo(HIPInfo);
+ llvm::StringRef HIPInfoStrRef(HIPInfo.str());
+ if (!HIPInfoStrRef.contains("Found HIP installation") &&
----------------
DominikAdamski wrote:
Note: I can extract the `Found HIP installation` string into a separate constant so that it can be used by both clang and flang.
https://github.com/llvm/llvm-project/pull/88190
More information about the flang-commits
mailing list