diff options
author | Joe Hermaszewski <git@monoid.al> | 2017-04-26 14:01:35 +0000 |
---|---|---|
committer | Joe Hermaszewski <git@monoid.al> | 2017-04-29 11:18:15 +0000 |
commit | 7b7ffc4999ba4b38f8090aab48a78ace0eb3424a (patch) | |
tree | eb1a135984677233476772ce5422b5eb61d622b1 /pkgs/development/compilers/llvm | |
parent | bad5ca052553aefb724e32bed1ea547b911cbb4b (diff) | |
download | nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.tar nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.tar.gz nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.tar.bz2 nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.tar.lz nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.tar.xz nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.tar.zst nixlib-7b7ffc4999ba4b38f8090aab48a78ace0eb3424a.zip |
LLVM-3.9: disable shared libraries in cross builds
The current cc-wrapper script seems to have trouble setting the rpath correctly. Hopefully #25047 will fix this.
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r-- | pkgs/development/compilers/llvm/3.9/llvm.nix | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index 380abc0b9b47..96efc97323c6 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -15,13 +15,15 @@ , compiler-rt_src , libcxxabi , debugVersion ? false -, enableSharedLibraries ? true +, enableSharedLibraries ? (buildPlatform == hostPlatform) , darwin , buildPackages , buildPlatform , hostPlatform }: +assert (hostPlatform != buildPlatform) -> !enableSharedLibraries; + let src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z"; shlib = if stdenv.isDarwin then "dylib" else "so"; @@ -84,12 +86,6 @@ in stdenv.mkDerivation rec { preBuild = '' mkdir -p $out/ ln -sv $PWD/lib $out - '' - + # This is a good candidate for using the `placeholder` primitive when it's released - # This should hopefully be unnecessary once - # https://github.com/NixOS/nixpkgs/pull/25047 is merged - stdenv.lib.optionalString (buildPlatform != hostPlatform && enableSharedLibraries) '' - export NIX_CROSS_LDFLAGS="-rpath $lib/lib -rpath $lib/lib64 $NIX_CROSS_LDFLAGS" ''; cmakeFlags = with stdenv; [ |