2014-09-23 12:12:26 +01:00
|
|
|
{ stdenv, fetchurl, cmake, libcxxabi }:
|
2012-10-08 07:32:09 +01:00
|
|
|
|
2014-09-24 12:15:46 +01:00
|
|
|
let version = "3.4.2"; in
|
2012-10-08 07:32:09 +01:00
|
|
|
|
2014-09-24 12:15:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
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 10:23:17 +00:00
|
|
|
name = "libc++-${version}";
|
2012-10-08 07:32:09 +01:00
|
|
|
|
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 10:23:17 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://llvm.org/releases/${version}/libcxx-${version}.src.tar.gz";
|
2014-06-19 23:22:38 +01:00
|
|
|
sha256 = "0z3jdvgcq995khkpis5c5vaxhbmvbqjlalbhn09k6pgb5zp46rc2";
|
2013-09-07 10:03:26 +01:00
|
|
|
};
|
|
|
|
|
2014-09-23 12:12:26 +01:00
|
|
|
buildInputs = [ cmake libcxxabi ];
|
2013-09-07 10:03:26 +01:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release"
|
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 10:23:17 +00:00
|
|
|
"-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
|
2013-09-07 10:03:26 +01:00
|
|
|
"-DLIBCXX_CXX_ABI=libcxxabi" ];
|
2012-10-08 07:32:09 +01:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
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 10:23:17 +00:00
|
|
|
passthru.abi = libcxxabi;
|
|
|
|
|
2014-09-24 12:15:46 +01:00
|
|
|
# Remove a Makefile that causes many retained dependencies.
|
|
|
|
postInstall = "rm $out/include/c++/v1/Makefile";
|
|
|
|
|
2012-10-08 07:32:09 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://libcxx.llvm.org/;
|
|
|
|
description = "A new implementation of the C++ standard library, targeting C++11";
|
|
|
|
license = "BSD";
|
2014-09-13 12:51:39 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.shlevy ];
|
2014-08-22 00:15:31 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2012-10-08 07:32:09 +01:00
|
|
|
};
|
|
|
|
}
|