diff options
author | Fedor Sergeev <fedor.sergeev@azul.com> | 2018-01-23 12:24:01 +0000 |
---|---|---|
committer | Fedor Sergeev <fedor.sergeev@azul.com> | 2018-01-23 12:24:01 +0000 |
commit | 78fdc9007d3fe6c58aa182e63386f5c17269188e (patch) | |
tree | 42a2ea6a687e7db859a08e4321e59366dff95e39 /clang/lib/Driver/ToolChains/Gnu.cpp | |
parent | faa0a82416d4569b4613ced7a3a3a4ff459f301d (diff) | |
download | bcm5719-llvm-78fdc9007d3fe6c58aa182e63386f5c17269188e.tar.gz bcm5719-llvm-78fdc9007d3fe6c58aa182e63386f5c17269188e.zip |
[Solaris] Make RHEL devtoolsets handling Linux-specific
Summary:
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.
Reviewers: fedor.sergeev, tstellar, jyknight
Reviewed By: fedor.sergeev
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D42029
llvm-svn: 323194
Diffstat (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/Gnu.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 367dc190006..68338eb77ee 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -1788,17 +1788,14 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( } // 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( |