summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm/8/clang/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-04-11 22:52:30 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-04-12 13:19:48 -0400
commit6794b0165846373f07d5254354a1b86709e66daf (patch)
tree37317d7be38f2281f766fa5e15908598185a9146 /pkgs/development/compilers/llvm/8/clang/default.nix
parentd453273fbf86ff1526094a84b01ef8fb9fad98e3 (diff)
downloadnixpkgs-6794b0165846373f07d5254354a1b86709e66daf.tar
nixpkgs-6794b0165846373f07d5254354a1b86709e66daf.tar.gz
nixpkgs-6794b0165846373f07d5254354a1b86709e66daf.tar.bz2
nixpkgs-6794b0165846373f07d5254354a1b86709e66daf.tar.lz
nixpkgs-6794b0165846373f07d5254354a1b86709e66daf.tar.xz
nixpkgs-6794b0165846373f07d5254354a1b86709e66daf.tar.zst
nixpkgs-6794b0165846373f07d5254354a1b86709e66daf.zip
clang 8, lldClangStdenv: Get LLVM's unwind working properly
Backport the `--unwindlib` flag, so it don't try to use libgcc on Linux
for hysterical reasons. The alternative of passing `-lunwind` always
would mess up C.
Diffstat (limited to 'pkgs/development/compilers/llvm/8/clang/default.nix')
-rw-r--r--pkgs/development/compilers/llvm/8/clang/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix
index 353e113ddb9..8709e47dd3a 100644
--- a/pkgs/development/compilers/llvm/8/clang/default.nix
+++ b/pkgs/development/compilers/llvm/8/clang/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python
+{ stdenv, fetch, fetchpatch, cmake, libxml2, llvm, version, clang-tools-extra_src, python
 , fixDarwinDylibNames
 , enableManpages ? false
 , enablePolly ? false # TODO: get this info from llvm (passthru?)
@@ -39,6 +39,12 @@ let
     patches = [
       ./purity.patch
       ./clang-xpc.patch
+      # Backport for -static-pie, which the latter touches, and which is nice in
+      # its own right.
+      ./static-pie.patch
+      # Backport for the `--unwindlib=[libgcc|complier-rt]` flag, which is
+      # needed for our bootstrapping to not interfere with C.
+      ./unwindlib.patch
     ];
 
     postPatch = ''