2011-10-20 12:15:54 +02:00
|
|
|
{ stdenv, fetchurl, perl, groff, darwinSwVersUtility }:
|
2008-03-17 12:18:21 +01:00
|
|
|
|
2011-12-04 00:47:59 +01:00
|
|
|
let version = "3.0"; 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 {
|
2011-12-04 00:47:59 +01:00
|
|
|
url = "http://llvm.org/releases/${version}/llvm-${version}.tar.gz";
|
|
|
|
sha256 = "0xq4gi7lflv8ilfckslhfvnja5693xjii1yvzz39kklr6hfv37ji";
|
2008-03-17 12:18:21 +01:00
|
|
|
};
|
|
|
|
|
2011-10-20 12:15:54 +02:00
|
|
|
buildInputs = [ perl groff ] ++
|
|
|
|
stdenv.lib.optional stdenv.isDarwin darwinSwVersUtility;
|
2010-06-12 22:54:35 +02:00
|
|
|
|
2011-10-20 01:49:22 +02:00
|
|
|
configureFlags = [ "--enable-optimized" "--enable-shared" "--disable-static" ]
|
|
|
|
++ stdenv.lib.optionals (stdenv.gcc ? clang) [
|
|
|
|
"--with-built-clang=yes"
|
|
|
|
"CXX=clang++"
|
|
|
|
];
|
2010-06-12 23:52:39 +02:00
|
|
|
|
2011-12-04 00:47:59 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2010-06-12 22:54:35 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://llvm.org/;
|
|
|
|
description = "Collection of modular and reusable compiler and toolchain technologies";
|
2010-06-13 00:30:09 +02:00
|
|
|
license = "BSD";
|
2011-10-18 18:37:28 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric shlevy];
|
2010-06-12 22:54:35 +02:00
|
|
|
platforms = with stdenv.lib.platforms; all;
|
|
|
|
};
|
2008-03-17 12:18:21 +01:00
|
|
|
}
|
2010-06-13 00:14:43 +02:00
|
|
|
|