From 14f36162d26d52667d3717dd6dd2bb1e9ffdb166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 1 Jun 2013 23:36:38 +0200 Subject: [PATCH] llvm: switch back to cmake build, so now clang builds --- pkgs/development/compilers/llvm/default.nix | 31 +++++++-------------- pkgs/development/libraries/mesa/default.nix | 4 +-- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index 1e514884bb5..59e2bdc5509 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -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/; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index a72d5d36ada..468e27de6ab 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -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.)