[PATCH] D42029: [Solaris] Make RHEL devtoolsets handling Linux-specific

Fedor Sergeev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 23 04:25:34 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323194: [Solaris] Make RHEL devtoolsets handling Linux-specific (authored by fedor.sergeev, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D42029?vs=129762&id=131044#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42029

Files:
  cfe/trunk/lib/Driver/ToolChains/Gnu.cpp


Index: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
+++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp
@@ -1788,17 +1788,14 @@
   }
 
   // Non-Solaris is much simpler - most systems just go with "/usr".
-  if (SysRoot.empty()) {
-    // Yet, still look for RHEL devtoolsets
-    // (should it be done Linux-only??)
+  if (SysRoot.empty() && TargetTriple.getOS() == llvm::Triple::Linux) {
+    // Yet, still look for RHEL devtoolsets.
     Prefixes.push_back("/opt/rh/devtoolset-6/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-4/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-3/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-2/root/usr");
-    Prefixes.push_back("/usr");
-  } else {
-    Prefixes.push_back(SysRoot.str() + "/usr");
   }
+  Prefixes.push_back(SysRoot.str() + "/usr");
 }
 
 /*static*/ void Generic_GCC::GCCInstallationDetector::CollectLibDirsAndTriples(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42029.131044.patch
Type: text/x-patch
Size: 999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180123/7603ae53/attachment.bin>


More information about the cfe-commits mailing list