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.
This commit is contained in:
John Ericson
2019-04-12 13:19:48 -04:00
committed by Matthew Bauer
parent d453273fbf
commit 6794b01658
4 changed files with 538 additions and 1 deletions
@@ -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 = ''