From 29572c28a39b6c1aec15fccf324cbb6d75228988 Mon Sep 17 00:00:00 2001 From: Anthony Cowley Date: Wed, 17 Aug 2016 07:43:57 -0400 Subject: [PATCH] llvm-3.8: build shared library on darwin (#17671) - Enable the shared library build on darwin by default to match other platforms. - Fix the dylib file's name in the store - Symlink a versioned name as some tooling expects this. --- pkgs/development/compilers/llvm/3.8/llvm.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix index fb8266480326..fc29d00a5245 100644 --- a/pkgs/development/compilers/llvm/3.8/llvm.nix +++ b/pkgs/development/compilers/llvm/3.8/llvm.nix @@ -14,7 +14,7 @@ , compiler-rt_src , libcxxabi , debugVersion ? false -, enableSharedLibraries ? !stdenv.isDarwin +, enableSharedLibraries ? true }: let @@ -69,6 +69,11 @@ in stdenv.mkDerivation rec { paxmark m bin/{lli,llvm-rtdyld} ''; + postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) '' + install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib + ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib + ''; + enableParallelBuilding = true; passthru.src = src;