git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commit29572c28a39b6c1aec15fccf324cbb6d75228988 authorAnthony Cowley <acowley@gmail.com> dateWed 17 Aug 2016, 07:43 (10 years ago) parent75bffa1
1 file changed+6−1
pkgs/development/compilers/llvm/3.8/llvm.nix+6−1
pkgs/development/compilers/llvm/3.8/llvm.nix+6−1
@@ -14,7 +14,7 @@
1414, compiler-rt_src
1515, libcxxabi
1616, debugVersion ? false
17−, enableSharedLibraries ? !stdenv.isDarwin
17+, enableSharedLibraries ? true
1818}:
1919
2020let
@@ -69,6 +69,11 @@ in stdenv.mkDerivation rec {
6969 paxmark m bin/{lli,llvm-rtdyld}
7070 '';
7171
72+ postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
73+ install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib
74+ ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib
75+ '';
76+
7277 enableParallelBuilding = true;
7378
7479 passthru.src = src;