llvm: fix build on darwin
* add DYLD_LIBRARY_PATH * don't build with shared libs
This commit is contained in:
parent
3e14bb6fdf
commit
67e5eb909b
@ -18,19 +18,23 @@ stdenv.mkDerivation {
|
|||||||
propagatedBuildInputs = [ libffi ];
|
propagatedBuildInputs = [ libffi ];
|
||||||
buildInputs = [ perl groff cmake python ]; # ToDo: polly, libc++; enable cxx11?
|
buildInputs = [ perl groff cmake python ]; # ToDo: polly, libc++; enable cxx11?
|
||||||
|
|
||||||
# created binaries need to be run before installation... I coudn't find a better way
|
# created binaries need to be run before installation... I coudn't find a
|
||||||
preBuild = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/lib'';
|
# better way
|
||||||
|
preBuild = ( if stdenv.isDarwin
|
||||||
|
then "export DYLD_LIBRARY_PATH='$DYLD_LIBRARY_PATH:'`pwd`/lib"
|
||||||
|
else "export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:'`pwd`/lib" );
|
||||||
|
|
||||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=ON" ];
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
|
||||||
|
++ stdenv.lib.optional (!stdenv.isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
#doCheck = true; # tests are broken, don't know why
|
doCheck = true; # tests are broken, don't know why
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://llvm.org/;
|
|
||||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||||
license = "BSD";
|
homepage = http://llvm.org/;
|
||||||
maintainers = with stdenv.lib.maintainers; [viric shlevy raskin];
|
license = licenses.bsd;
|
||||||
platforms = with stdenv.lib.platforms; all;
|
maintainers = with maintainers; [ lovek323 raskin shlevy viric ];
|
||||||
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user