From: Cordell Bloor Date: Tue, 9 May 2023 13:46:48 +0000 (-0400) Subject: [PATCH] [HIP] Detect HIP for Ubuntu, Mint, Gentoo, etc. X-Git-Tag: archive/raspbian/1%16.0.6-15_deb12u1+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=50865e38d47a9f104467a224a5ded8f118703911;p=llvm-toolchain-16.git [PATCH] [HIP] Detect HIP for Ubuntu, Mint, Gentoo, etc. HIP may be installed into /usr or /usr/local on a variety of Linux operating systems. It may become unwieldy to list them all. Reviewed by: Siu Chi Chan, Yaxun Liu Differential Revision: https://reviews.llvm.org/D149110 Gbp-Pq: Name HIP-search-path-fix.patch --- diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp index 5849e9cfdb..514624735a 100644 --- a/clang/lib/Driver/ToolChains/AMDGPU.cpp +++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp @@ -11,7 +11,6 @@ #include "clang/Basic/TargetID.h" #include "clang/Config/config.h" #include "clang/Driver/Compilation.h" -#include "clang/Driver/Distro.h" #include "clang/Driver/DriverDiagnostic.h" #include "clang/Driver/InputInfo.h" #include "clang/Driver/Options.h" @@ -309,13 +308,10 @@ RocmInstallationDetector::getInstallationPathCandidates() { ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm, /*StrictChecking=*/true); - Distro Dist(D.getVFS(), llvm::Triple(llvm::sys::getProcessTriple())); - if (Dist.IsDebian() || Dist.IsRedhat()) { - ROCmSearchDirs.emplace_back(D.SysRoot + "/usr/local", - /*StrictChecking=*/true); - ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", - /*StrictChecking=*/true); - } + ROCmSearchDirs.emplace_back(D.SysRoot + "/usr/local", + /*StrictChecking=*/true); + ROCmSearchDirs.emplace_back(D.SysRoot + "/usr", + /*StrictChecking=*/true); DoPrintROCmSearchDirs(); return ROCmSearchDirs;