diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/7/llvm.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/7/llvm.nix | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/pkgs/development/compilers/llvm/7/llvm.nix b/pkgs/development/compilers/llvm/7/llvm.nix index 34f8a5478d1b..c288fd3e2a5c 100644 --- a/pkgs/development/compilers/llvm/7/llvm.nix +++ b/pkgs/development/compilers/llvm/7/llvm.nix @@ -22,12 +22,13 @@ let inherit (stdenv.lib) optional optionals optionalString; - src = fetch "llvm" "16s196wqzdw4pmri15hadzqgdi926zln3an2viwyq0kini6zr3d3"; - polly_src = fetch "polly" "0wgvayfilgb530bq51l7szxfb13l24nnrmyji2f6ncq95a24dw8v"; + src = fetch "llvm" "0r1p5didv4rkgxyvbkyz671xddg6i3dxvbpsi1xxipkla0l9pk0v"; + polly_src = fetch "polly" "16qkns4ab4x0azrvhy4j7cncbyb2rrbdrqj87zphvqxm5pvm8m1h"; - # Used when creating a version-suffixed symlink of libLLVM.dylib - shortVersion = with stdenv.lib; - concatStringsSep "." (take 1 (splitString "." release_version)); + # Used when creating a versioned symlinks of libLLVM.dylib + versionSuffixes = with stdenv.lib; + let parts = splitString "." release_version; in + imap (i: _: concatStringsSep "." (take i parts)) parts; in stdenv.mkDerivation (rec { name = "llvm-${version}"; @@ -53,12 +54,6 @@ in stdenv.mkDerivation (rec { propagatedBuildInputs = [ ncurses zlib ]; patches = [ - # https://bugs.llvm.org/show_bug.cgi?id=39427 - # https://github.com/NixOS/nixpkgs/issues/54370 - (fetchpatch { - url = "https://github.com/llvm-mirror/llvm/commit/57567def148f387153a8149fb590bd39b1b006a1.patch"; - sha256 = "1w1xg5pxpc6cals1nf5j5k4p6qi8lcrpvn0paxc86m415i79xmcg"; - }) # backport, fix building rust crates with lto (fetchpatch { url = "https://github.com/llvm-mirror/llvm/commit/da1fb72bb305d6bc1f3899d541414146934bf80f.patch"; @@ -148,8 +143,9 @@ in stdenv.mkDerivation (rec { + optionalString (stdenv.isDarwin && enableSharedLibraries) '' substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib - ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib + ${stdenv.lib.concatMapStringsSep "\n" (v: '' + ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib + '') versionSuffixes} ''; doCheck = stdenv.isLinux && (!stdenv.isx86_32); |