llvm: switch back to cmake build, so now clang builds

This commit is contained in:
Vladimír Čunát 2013-06-01 23:36:38 +02:00
parent 787f8216d5
commit 14f36162d2
2 changed files with 12 additions and 23 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, groff, cmake, python, libffi, libcxx }:
{ stdenv, fetchurl, perl, groff, cmake, python, libffi }:
let version = "3.2"; in
@ -10,32 +10,21 @@ stdenv.mkDerivation {
sha256 = "0hv30v5l4fkgyijs56sr1pbrlzgd674pg143x7az2h37sb290l0j";
};
preConfigure = ''
patchShebangs .
export REQUIRES_RTTI=1
'';
# ToDo: polly, libc++; --enable-cxx11?
configureFlags = [
"--enable-shared" # saves half the size, and even more for e.g. mesa
"--disable-assertions" "--enable-optimized"
"--disable-timestamps" # embedding timestamps seems a danger to purity
"--enable-libffi"
#"--enable-experimental-targets=r600"
#"--enable-libcpp"
] ;
patches = [ ./set_soname.patch ]; # http://llvm.org/bugs/show_bug.cgi?id=12334
patchFlags = "-p0";
buildInputs = [ perl groff python ]
#++ [ libcxx ]
;
preConfigure = "patchShebangs .";
propagatedBuildInputs = [ libffi ];
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
preBuild = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/lib'';
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=ON" ];
enableParallelBuilding = true;
#ToDo: doCheck?
#doCheck = true; # tests are broken, don't know why
meta = {
homepage = http://llvm.org/;

View file

@ -13,10 +13,10 @@ else
/** Packaging design:
- The basic mesa ($out) contains headers and libraries (GLU is in mesa_glu now).
This or the mesa attribute (which also contains GLU) are small (~ 2.5 MB, mostly headers)
This or the mesa attribute (which also contains GLU) are small (~ 2.2 MB, mostly headers)
and are designed to be the buildInput of other packages.
- DRI and EGL drivers are compiled into $drivers output,
which is bigger (~13 MB) and depends on LLVM (~80 MB).
which is bigger (~13 MB) and depends on LLVM (~40 MB).
These should be searched at runtime in /run/current-system/sw/lib/*
and so are kind-of impure (given by NixOS).
(I suppose on non-NixOS one would create the appropriate symlinks from there.)