diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch new file mode 100644 index 000000000000..9523943c4801 --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch @@ -0,0 +1,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 +@@ -565,7 +565,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) { |