about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/swift/patches/0005-clang-toolchain-dir.patch
blob: 40d7728cf78849f80cf669d3ab81f793b3809220 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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) {