llvm7: patch to fix PR39427

See linked issue for discussion,
but key bits:

* rustc breaks without this
* fix changes ABI, may become 7.1.0
This commit is contained in:
Will Dietz 2019-01-16 10:19:47 -06:00
parent cabe7d6506
commit 946be0ed99

@ -1,5 +1,6 @@
{ stdenv
, fetch
, fetchpatch
, cmake
, python
, libffi
@ -46,6 +47,14 @@ in stdenv.mkDerivation (rec {
propagatedBuildInputs = [ ncurses zlib ];
patches = [
# https://bugs.llvm.org/show_bug.cgi?id=39427
(fetchpatch {
url = "https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/raw/5a7d283d4e00bc4822c7b0226e593c344c8f6050/debian/patches/pr39427-misscompile.diff";
sha256 = "03mpydsaw0xvcp7kb4sgjzcl5v22620r5z78kv3mz5wp7sn76fg5";
})
];
postPatch = optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \