From 946be0ed9943c31071e84f657f1515ae63389d23 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 16 Jan 2019 10:19:47 -0600 Subject: [PATCH] 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 --- pkgs/development/compilers/llvm/7/llvm.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/compilers/llvm/7/llvm.nix b/pkgs/development/compilers/llvm/7/llvm.nix index 50643f233225..0eb946a0a837 100644 --- a/pkgs/development/compilers/llvm/7/llvm.nix +++ b/pkgs/development/compilers/llvm/7/llvm.nix @@ -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)" \