summary refs log tree commit diff
path: root/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
blob: 789c0be7e7a8b68cd7b7c8c1265ec360181188e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
Only use the Nix include dirs when no sysroot is configured.

--- clang/lib/Driver/ToolChains/Linux.cpp	2018-10-05 18:01:15.731109551 +0200
+++ clang/lib/Driver/ToolChains/Linux.cpp	2018-10-05 18:00:27.959509924 +0200
@@ -641,7 +641,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) {