depot/third_party/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch
Default email 619d6dcc77 Project import generated by Copybara.
GitOrigin-RevId: 870959c7fb3a42af1863bed9e1756086a74eb649
2021-08-22 09:53:02 +02:00

13 lines
476 B
Diff

Use the Nix include dirs and gcc runtime dir, when no sysroot is configured.
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
@@ -574,7 +574,7 @@
// Check for configure-time C include directories.
StringRef CIncludeDirs(C_INCLUDE_DIRS);
- if (CIncludeDirs != "") {
+ if (CIncludeDirs != "" && (SysRoot.empty() || SysRoot == "/")) {
SmallVector<StringRef, 5> dirs;
CIncludeDirs.split(dirs, ":");
for (StringRef dir : dirs) {