summary refs log tree commit diff
path: root/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
diff options
context:
space:
mode:
authorMichael Roitzsch <reactorcontrol@icloud.com>2018-11-01 15:28:41 +0100
committerMichael Roitzsch <reactorcontrol@icloud.com>2018-11-01 17:53:04 +0100
commit4e89814fc6b721c849e0ce519f255ae1550f5511 (patch)
tree8dc5244857738442ffa1a0426bf64b3c768e474b /pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
parente4bfc708e5967d2050c08d3ade580b8bd0c0e4ce (diff)
downloadnixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.tar
nixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.tar.gz
nixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.tar.bz2
nixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.tar.lz
nixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.tar.xz
nixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.tar.zst
nixpkgs-4e89814fc6b721c849e0ce519f255ae1550f5511.zip
swift: 4.1.3 -> 4.2.1
* necessary tweaks and patches to get swift 4.2.1 to build
* disabled more tests because they would require additional patching
* delete empty directories from final build output
* some minor cleanup
Diffstat (limited to 'pkgs/development/compilers/swift/patches/llvm-include-dirs.patch')
-rw-r--r--pkgs/development/compilers/swift/patches/llvm-include-dirs.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch b/pkgs/development/compilers/swift/patches/llvm-include-dirs.patch
new file mode 100644
index 00000000000..9523943c480
--- /dev/null
+++ b/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) {