[PATCH] D42029: [Solaris] Make RHEL devtoolsets handling Linux-specific
Rainer Orth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 13 06:51:12 PST 2018
ro created this revision.
ro added reviewers: fedor.sergeev, tstellar, jyknight.
This patch is meant to address the last outstanding review comment on the already approved
(but not yet commited) https://reviews.llvm.org/D35755, namely making the handling of the RHEL
devtoolsets Linux-specific.
Don't know if it's best integrated into the former or applied subsequently.
Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
Repository:
rC Clang
https://reviews.llvm.org/D42029
Files:
lib/Driver/ToolChains/Gnu.cpp
Index: lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- lib/Driver/ToolChains/Gnu.cpp
+++ 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.129762.patch
Type: text/x-patch
Size: 969 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180113/4742f726/attachment.bin>
More information about the cfe-commits
mailing list