File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
clang/lib/Driver/ToolChains Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -243,8 +243,15 @@ RocmInstallationDetector::getInstallationPathCandidates() {
243243
244244 // Some versions of the rocm llvm package install to /opt/rocm/llvm/bin
245245 // Some versions of the aomp package install to /opt/rocm/aomp/bin
246- if (ParentName == " llvm" || ParentName.starts_with (" aomp" ))
246+ if (ParentName == " llvm" || ParentName.starts_with (" aomp" )) {
247247 ParentDir = llvm::sys::path::parent_path (ParentDir);
248+ ParentName = llvm::sys::path::filename (ParentDir);
249+
250+ // Some versions of the rocm llvm package install to
251+ // /opt/rocm/lib/llvm/bin, so also back up if within the lib dir still
252+ if (ParentName == " lib" )
253+ ParentDir = llvm::sys::path::parent_path (ParentDir);
254+ }
248255
249256 return Candidate (ParentDir.str (), /* StrictChecking=*/ true );
250257 };
You can’t perform that action at this time.
0 commit comments