nixpkgs/pkgs/development/libraries/libc++/default.nix
Shea Levy 55e6303d6a Add full llvm build, update libc++ and dragonegg
Some packages in the llvm suite (e.g. compiler-rt) cannot be built
separate from the build of llvm, and while some others (e.g. clang) can
the combined build is much better tested (we've had to work around
annoying issues before). So this puts llvm, clang, clang-tools-extra,
compiler-rt, lld, lldb, and polly all into one big build (llvmFull).
This build includes a static llvm, as dynamic is similarly less tested
and has known failures.

This also updates libc++ and dragonegg. libc++ now builds against
libc++abi as a separate package rather than building it during the
libc++ build.

The clang purity patch is gone. Instead, we simply set --sysroot to
/var/empty for pure builds, as all impure paths are either looked up in
the gcc prefix (which we hard-code at compile time) or in the sysroot.
This also means that if NIX_ENFORCE_PURITY is 0 then clang will look in
the normal Linux paths by default, which is the proper behavior IMO.

polly required an updated isl. When stdenv-updates is merged, perhaps we
can update the isl used by gcc and avoid having two versions.

Since llvm on its own is now separate from the llvm used by clang, I've
removed myself as maintainer from llvm and will leave maintenance of
that to those who are interested in llvm separate from clang.

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-20 05:42:38 -05:00

32 lines
834 B
Nix

{ stdenv, fetchurl, fetchsvn, cmake, libcxxabi }:
let
version = "3.4";
in stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetchurl {
url = "http://llvm.org/releases/${version}/libcxx-${version}.src.tar.gz";
sha256 = "1sqd5qhqj7qnn9zjxx9bv7ky4f7xgmh9sbgd53y1kszhg41217xx";
};
buildInputs = [ cmake libcxxabi ];
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release"
"-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
"-DLIBCXX_CXX_ABI=libcxxabi" ];
enableParallelBuilding = true;
passthru.abi = libcxxabi;
meta = {
homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11";
license = "BSD";
maintainers = stdenv.lib.maintainers.shlevy;
platforms = stdenv.lib.platforms.all;
};
}