2013-06-01 22:36:38 +01:00
|
|
|
{ stdenv, fetchurl, perl, groff, cmake, python, libffi }:
|
2008-03-17 11:18:21 +00:00
|
|
|
|
2013-06-22 00:18:52 +01:00
|
|
|
let version = "3.3"; in
|
2011-10-18 17:37:28 +01:00
|
|
|
|
2011-10-19 21:57:18 +01:00
|
|
|
stdenv.mkDerivation {
|
2011-10-18 17:37:28 +01:00
|
|
|
name = "llvm-${version}";
|
|
|
|
|
2008-03-17 11:18:21 +00:00
|
|
|
src = fetchurl {
|
2012-10-08 04:25:11 +01:00
|
|
|
url = "http://llvm.org/releases/${version}/llvm-${version}.src.tar.gz";
|
2013-06-22 00:18:52 +01:00
|
|
|
sha256 = "0y3mfbb5qzcpw3v5qncn69x1hdrrrfirgs82ypi2annhf0g6nxk8";
|
2008-03-17 11:18:21 +00:00
|
|
|
};
|
|
|
|
|
2013-06-22 00:18:52 +01:00
|
|
|
# The default rlimits are too low for shared libraries.
|
|
|
|
patches = [ ./more-memory-for-bugpoint.patch ];
|
2013-05-16 16:16:02 +01:00
|
|
|
|
2013-06-22 00:18:52 +01:00
|
|
|
# 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?
|
2013-06-01 22:36:38 +01:00
|
|
|
|
2013-08-02 17:28:29 +01:00
|
|
|
# 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";
|
2013-06-01 22:36:38 +01:00
|
|
|
|
2013-08-02 17:28:29 +01:00
|
|
|
cmakeFlags = with stdenv; [ "-DCMAKE_BUILD_TYPE=Release" "-DLLVM_ENABLE_FFI=ON" ]
|
|
|
|
++ lib.optional (!isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ];
|
2010-06-12 22:52:39 +01:00
|
|
|
|
2011-12-03 23:47:59 +00:00
|
|
|
enableParallelBuilding = true;
|
2013-06-22 00:18:52 +01:00
|
|
|
|
|
|
|
doCheck = true;
|
2011-12-03 23:47:59 +00:00
|
|
|
|
2013-07-03 23:48:55 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-06-12 21:54:35 +01:00
|
|
|
description = "Collection of modular and reusable compiler and toolchain technologies";
|
2013-07-03 23:48:55 +01:00
|
|
|
homepage = http://llvm.org/;
|
2013-07-04 16:47:02 +01:00
|
|
|
license = licenses.bsd3;
|
2013-07-03 23:48:55 +01:00
|
|
|
maintainers = with maintainers; [ lovek323 raskin shlevy viric ];
|
|
|
|
platforms = platforms.all;
|
2010-06-12 21:54:35 +01:00
|
|
|
};
|
2008-03-17 11:18:21 +00:00
|
|
|
}
|