2013-06-01 23:36:38 +02:00
|
|
|
{ stdenv, fetchurl, perl, groff, cmake, python, libffi }:
|
2008-03-17 12:18:21 +01:00
|
|
|
|
2013-01-22 20:33:55 +01:00
|
|
|
let version = "3.2"; in
|
2011-10-18 18:37:28 +02:00
|
|
|
|
2011-10-19 22:57:18 +02:00
|
|
|
stdenv.mkDerivation {
|
2011-10-18 18:37:28 +02:00
|
|
|
name = "llvm-${version}";
|
|
|
|
|
2008-03-17 12:18:21 +01:00
|
|
|
src = fetchurl {
|
2012-10-08 05:25:11 +02:00
|
|
|
url = "http://llvm.org/releases/${version}/llvm-${version}.src.tar.gz";
|
2013-01-22 20:33:55 +01:00
|
|
|
sha256 = "0hv30v5l4fkgyijs56sr1pbrlzgd674pg143x7az2h37sb290l0j";
|
2008-03-17 12:18:21 +01:00
|
|
|
};
|
|
|
|
|
2013-05-16 17:16:02 +02:00
|
|
|
patches = [ ./set_soname.patch ]; # http://llvm.org/bugs/show_bug.cgi?id=12334
|
|
|
|
patchFlags = "-p0";
|
|
|
|
|
2013-06-01 23:36:38 +02:00
|
|
|
preConfigure = "patchShebangs .";
|
|
|
|
|
2013-05-16 17:16:02 +02:00
|
|
|
propagatedBuildInputs = [ libffi ];
|
2013-06-01 23:36:38 +02:00
|
|
|
buildInputs = [ perl groff cmake python ]; # ToDo: polly, libc++; enable cxx11?
|
|
|
|
|
2013-07-04 00:48:55 +02:00
|
|
|
# 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" );
|
2013-06-01 23:36:38 +02:00
|
|
|
|
2013-07-04 00:48:55 +02:00
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]
|
|
|
|
++ stdenv.lib.optional (!stdenv.isDarwin) [ "-DBUILD_SHARED_LIBS=ON" ];
|
2010-06-12 23:52:39 +02:00
|
|
|
|
2011-12-04 00:47:59 +01:00
|
|
|
enableParallelBuilding = true;
|
2013-07-04 11:02:40 +02:00
|
|
|
# doCheck = true; # tests are broken, don't know why
|
2011-12-04 00:47:59 +01:00
|
|
|
|
2013-07-04 00:48:55 +02:00
|
|
|
meta = with stdenv.lib; {
|
2010-06-12 22:54:35 +02:00
|
|
|
description = "Collection of modular and reusable compiler and toolchain technologies";
|
2013-07-04 00:48:55 +02:00
|
|
|
homepage = http://llvm.org/;
|
2013-07-04 17:47:02 +02:00
|
|
|
license = licenses.bsd3;
|
2013-07-04 00:48:55 +02:00
|
|
|
maintainers = with maintainers; [ lovek323 raskin shlevy viric ];
|
|
|
|
platforms = platforms.all;
|
2010-06-12 22:54:35 +02:00
|
|
|
};
|
2008-03-17 12:18:21 +01:00
|
|
|
}
|