diff options
Diffstat (limited to 'pkgs/development/compilers/llvm/default.nix')
-rw-r--r-- | pkgs/development/compilers/llvm/default.nix | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index 1e53256a2405..abd3277d919e 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -1,34 +1,35 @@ -{ stdenv, fetchurl, perl, groff, cmake, python, libffi }: +{ stdenv, fetchurl, perl, groff, cmake, python, libffi, binutils_gold }: -let version = "3.2"; in +let version = "3.3"; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "llvm-${version}"; src = fetchurl { url = "http://llvm.org/releases/${version}/llvm-${version}.src.tar.gz"; - sha256 = "0hv30v5l4fkgyijs56sr1pbrlzgd674pg143x7az2h37sb290l0j"; + sha256 = "0y3mfbb5qzcpw3v5qncn69x1hdrrrfirgs82ypi2annhf0g6nxk8"; }; - patches = [ ./set_soname.patch ]; # http://llvm.org/bugs/show_bug.cgi?id=12334 - patchFlags = "-p0"; + # The default rlimits are too low for shared libraries. + patches = [ ./more-memory-for-bugpoint.patch ]; - preConfigure = "patchShebangs ."; + # libffi was propagated before, but it wasn't even being used, so + # unless something needs it just an input is fine. + buildInputs = [ perl groff cmake python libffi ]; # ToDo: polly, libc++; enable cxx11? - propagatedBuildInputs = [ libffi ]; - buildInputs = [ perl groff cmake python ]; # ToDo: polly, libc++; enable cxx11? + # hacky fix: created binaries need to be run before installation + preBuild = let LD = if stdenv.isDarwin then "DYLD" else "LD"; + in "export ${LD}_LIBRARY_PATH='$$${LD}_LIBRARY_PATH:'`pwd`/lib"; - # created binaries need to be run before installation... I coudn't find a - # 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" ] - ++ stdenv.lib.optional (!stdenv.isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ]; + cmakeFlags = with stdenv; [ + "-DCMAKE_BUILD_TYPE=Release" + "-DLLVM_ENABLE_FFI=ON" + "-DLLVM_BINUTILS_INCDIR=${binutils_gold}/include" + ] ++ lib.optional (!isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ]; enableParallelBuilding = true; - # doCheck = true; # tests are broken, don't know why + + doCheck = true; meta = with stdenv.lib; { description = "Collection of modular and reusable compiler and toolchain technologies"; |