[PATCH] D149110: [HIP] Detect HIP for Ubuntu, Mint, Gentoo, etc.

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 08:32:59 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf8598357662d: [HIP] Detect HIP for Ubuntu, Mint, Gentoo, etc. (authored by cgmb, committed by yaxunl).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149110/new/

https://reviews.llvm.org/D149110

Files:
  clang/lib/Driver/ToolChains/AMDGPU.cpp


Index: clang/lib/Driver/ToolChains/AMDGPU.cpp
===================================================================
--- clang/lib/Driver/ToolChains/AMDGPU.cpp
+++ 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 @@
     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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149110.520711.patch
Type: text/x-patch
Size: 1257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230509/857b9bb3/attachment.bin>


More information about the cfe-commits mailing list