mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-24 17:34:47 +00:00
19 lines
711 B
Diff
19 lines
711 B
Diff
--- a/tools/clang/lib/Driver/ToolChains.cpp
|
|
+++ b/tools/clang/lib/Driver/ToolChains.cpp
|
|
@@ -1223,6 +1223,18 @@
|
|
// And finally in /usr.
|
|
if (D.SysRoot.empty())
|
|
Prefixes.push_back("/usr");
|
|
+
|
|
+ // RedHat Developer Toolset support
|
|
+ if (const char *software_collections = getenv("CLANG_DTS_LIST")) {
|
|
+ SmallVector<StringRef, 4> Scls;
|
|
+ StringRef(software_collections).split(Scls, StringRef(" "), -1, false);
|
|
+ for (const auto &Scl : Scls) {
|
|
+ if (!Scl.startswith(StringRef("devtoolset-")))
|
|
+ continue;
|
|
+ const std::string SclPath = std::string("/opt/rh/") + Scl.str() + std::string("/root/usr");
|
|
+ Prefixes.push_back(SclPath);
|
|
+ }
|
|
+ }
|
|
}
|