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>
This commit is contained in:
Shea Levy 2014-01-20 05:23:17 -05:00
parent 86808f2c46
commit 55e6303d6a
16 changed files with 191 additions and 276 deletions

View File

@ -1,4 +1,4 @@
{ clangStdenv, fetchgit, llvm, clangUnwrapped }:
{ clangStdenv, fetchgit, llvmFull }:
clangStdenv.mkDerivation {
name = "emacs-clang-complete-async-20130218";
@ -8,7 +8,7 @@ clangStdenv.mkDerivation {
sha256 = "1c8zqi6axbsb951azz9iqx3j52j30nd9ypv396hvids3g02cirrf";
};
buildInputs = [ llvm clangUnwrapped ];
buildInputs = [ llvmFull ];
installPhase = ''
mkdir -p $out/bin

View File

@ -59,13 +59,16 @@ doSubstitute() {
local src=$1
local dst=$2
local uselibcxx=
local uselibcxxabi=
if test -n "$libcxx" && echo $dst | fgrep ++; then uselibcxx=$libcxx; fi
if test -n "$libcxxabi" && echo $dst | fgrep ++; then uselibcxxabi=$libcxxabi; fi
# Can't use substitute() here, because replace may not have been
# built yet (in the bootstrap).
sed \
-e "s^@out@^$out^g" \
-e "s^@shell@^$shell^g" \
-e "s^@libcxx@^$uselibcxx^g" \
-e "s^@libcxxabi@^$uselibcxxabi^g" \
-e "s^@clang@^$clang^g" \
-e "s^@clangProg@^$clangProg^g" \
-e "s^@binutils@^$binutils^g" \

View File

@ -76,11 +76,12 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
n=$((n + 1))
done
params=("${rest[@]}")
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE --sysroot=/var/empty"
fi
if test -n "@libcxx@"; then
NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem@libcxx@/include/c++/v1 -stdlib=libc++"
NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++ -lc++abi"
NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++ -L@libcxxabi@/lib -lc++abi"
fi
# Add the flags for the C compiler proper.
@ -137,13 +138,6 @@ if test -n "$NIX_CLANG_WRAPPER_EXEC_HOOK"; then
source "$NIX_CLANG_WRAPPER_EXEC_HOOK"
fi
# We nuke LD_LIBRARY_PATH here, because clang dynamically links to LLVM.
# Unfortunately, when such clang is used to build LLVM again, it can get in
# trouble temporarily binding to the build-directory versions of the libraries
# (the buildsystem sets LD_LIBRARY_PATH). That is very undesirable and can
# cause mysterious failures.
LD_LIBRARY_PATH=
# Call the real `clang'. Filter out warnings from stderr about unused
# `-B' flags, since they confuse some programs. Deep bash magic to
# apply grep to stderr (by swapping stdin/stderr twice).

View File

@ -34,6 +34,9 @@ stdenv.mkDerivation {
addFlags = ./add-flags;
inherit nativeTools nativeLibc nativePrefix clang clangVersion libcxx;
libcxxabi = libcxx.abi or null;
gcc = clang.gcc;
libc = if nativeLibc then null else libc;
binutils = if nativeTools then null else binutils;

View File

@ -32,6 +32,9 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE" \
# We cannot skip this; barf.
echo "impure path \`$p' used in link" >&2
exit 1
elif test "${p:0:9}" = "--sysroot"; then
# Our ld is not built with sysroot support (Can we fix that?)
:
else
rest=("${rest[@]}" "$p")
fi

View File

@ -1,162 +0,0 @@
diff -Naur cfe-3.3.src-orig/lib/Driver/ToolChains.cpp cfe-3.3.src/lib/Driver/ToolChains.cpp
--- cfe-3.3.src-orig/lib/Driver/ToolChains.cpp 2013-05-06 12:26:41.000000000 -0400
+++ cfe-3.3.src/lib/Driver/ToolChains.cpp 2013-06-21 19:28:12.120364372 -0400
@@ -2318,17 +2318,6 @@
Paths);
}
}
- addPathIfExists(SysRoot + "/lib/" + MultiarchTriple, Paths);
- addPathIfExists(SysRoot + "/lib/../" + Multilib, Paths);
- addPathIfExists(SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
- addPathIfExists(SysRoot + "/usr/lib/../" + Multilib, Paths);
-
- // Try walking via the GCC triple path in case of multiarch GCC
- // installations with strange symlinks.
- if (GCCInstallation.isValid())
- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
- "/../../" + Multilib, Paths);
-
// Add the non-multilib suffixed paths (if potentially different).
if (GCCInstallation.isValid()) {
const std::string &LibPath = GCCInstallation.getParentLibPath();
@@ -2341,8 +2330,6 @@
addPathIfExists(LibPath, Paths);
}
}
- addPathIfExists(SysRoot + "/lib", Paths);
- addPathIfExists(SysRoot + "/usr/lib", Paths);
IsPIEDefault = SanitizerArgs(*this, Args).hasZeroBaseShadow();
}
@@ -2395,9 +2382,6 @@
if (DriverArgs.hasArg(options::OPT_nostdinc))
return;
- if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
- addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/local/include");
-
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
llvm::sys::Path P(D.ResourceDir);
P.appendComponent("include");
@@ -2479,26 +2463,6 @@
"/usr/include/powerpc64-linux-gnu"
};
ArrayRef<StringRef> MultiarchIncludeDirs;
- if (getTriple().getArch() == llvm::Triple::x86_64) {
- MultiarchIncludeDirs = X86_64MultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::x86) {
- MultiarchIncludeDirs = X86MultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::aarch64) {
- MultiarchIncludeDirs = AArch64MultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::arm) {
- if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
- MultiarchIncludeDirs = ARMHFMultiarchIncludeDirs;
- else
- MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::mips) {
- MultiarchIncludeDirs = MIPSMultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::mipsel) {
- MultiarchIncludeDirs = MIPSELMultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::ppc) {
- MultiarchIncludeDirs = PPCMultiarchIncludeDirs;
- } else if (getTriple().getArch() == llvm::Triple::ppc64) {
- MultiarchIncludeDirs = PPC64MultiarchIncludeDirs;
- }
for (ArrayRef<StringRef>::iterator I = MultiarchIncludeDirs.begin(),
E = MultiarchIncludeDirs.end();
I != E; ++I) {
@@ -2510,13 +2474,6 @@
if (getTriple().getOS() == llvm::Triple::RTEMS)
return;
-
- // Add an include of '/include' directly. This isn't provided by default by
- // system GCCs, but is often used with cross-compiling GCCs, and harmless to
- // add even when Clang is acting as-if it were a system compiler.
- addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/include");
-
- addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include");
}
/// \brief Helper to add the three variant paths for a libstdc++ installation.
diff -Naur cfe-3.3.src-orig/lib/Driver/Tools.cpp cfe-3.3.src/lib/Driver/Tools.cpp
--- cfe-3.3.src-orig/lib/Driver/Tools.cpp 2013-05-30 14:01:30.000000000 -0400
+++ cfe-3.3.src/lib/Driver/Tools.cpp 2013-06-21 19:30:51.604726574 -0400
@@ -5976,43 +5976,6 @@
}
}
- if (ToolChain.getArch() == llvm::Triple::arm ||
- ToolChain.getArch() == llvm::Triple::thumb ||
- (!Args.hasArg(options::OPT_static) &&
- !Args.hasArg(options::OPT_shared))) {
- CmdArgs.push_back("-dynamic-linker");
- if (isAndroid)
- CmdArgs.push_back("/system/bin/linker");
- else if (ToolChain.getArch() == llvm::Triple::x86)
- CmdArgs.push_back("/lib/ld-linux.so.2");
- else if (ToolChain.getArch() == llvm::Triple::aarch64)
- CmdArgs.push_back("/lib/ld-linux-aarch64.so.1");
- else if (ToolChain.getArch() == llvm::Triple::arm ||
- ToolChain.getArch() == llvm::Triple::thumb) {
- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
- CmdArgs.push_back("/lib/ld-linux-armhf.so.3");
- else
- CmdArgs.push_back("/lib/ld-linux.so.3");
- }
- else if (ToolChain.getArch() == llvm::Triple::mips ||
- ToolChain.getArch() == llvm::Triple::mipsel)
- CmdArgs.push_back("/lib/ld.so.1");
- else if (ToolChain.getArch() == llvm::Triple::mips64 ||
- ToolChain.getArch() == llvm::Triple::mips64el) {
- if (hasMipsN32ABIArg(Args))
- CmdArgs.push_back("/lib32/ld.so.1");
- else
- CmdArgs.push_back("/lib64/ld.so.1");
- }
- else if (ToolChain.getArch() == llvm::Triple::ppc)
- CmdArgs.push_back("/lib/ld.so.1");
- else if (ToolChain.getArch() == llvm::Triple::ppc64 ||
- ToolChain.getArch() == llvm::Triple::systemz)
- CmdArgs.push_back("/lib64/ld64.so.1");
- else
- CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2");
- }
-
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
diff -Naur cfe-3.3.src-orig/lib/Frontend/InitHeaderSearch.cpp cfe-3.3.src/lib/Frontend/InitHeaderSearch.cpp
--- cfe-3.3.src-orig/lib/Frontend/InitHeaderSearch.cpp 2013-04-29 21:21:43.000000000 -0400
+++ cfe-3.3.src/lib/Frontend/InitHeaderSearch.cpp 2013-06-21 19:32:47.627016565 -0400
@@ -225,20 +225,6 @@
const HeaderSearchOptions &HSOpts) {
llvm::Triple::OSType os = triple.getOS();
- if (HSOpts.UseStandardSystemIncludes) {
- switch (os) {
- case llvm::Triple::FreeBSD:
- case llvm::Triple::NetBSD:
- case llvm::Triple::OpenBSD:
- case llvm::Triple::Bitrig:
- break;
- default:
- // FIXME: temporary hack: hard-coded paths.
- AddPath("/usr/local/include", System, false);
- break;
- }
- }
-
// Builtin includes use #include_next directives and should be positioned
// just prior C include dirs.
if (HSOpts.UseBuiltinIncludes) {
@@ -332,9 +318,6 @@
default:
break;
}
-
- if ( os != llvm::Triple::RTEMS )
- AddPath("/usr/include", ExternCSystem, false);
}
void InitHeaderSearch::

View File

@ -1,9 +0,0 @@
--- a/utils/TableGen/CMakeLists.txt (revision 190146)
+++ b/utils/TableGen/CMakeLists.txt (working copy)
@@ -1,4 +1,5 @@
set(LLVM_LINK_COMPONENTS Support)
+set(LLVM_TOOLS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
add_tablegen(clang-tblgen CLANG
ClangASTNodesEmitter.cpp

View File

@ -1,41 +0,0 @@
{ stdenv, fetchurl, perl, groff, llvm, cmake, libxml2, python }:
let
version = "3.3";
gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
in
stdenv.mkDerivation {
name = "clang-${version}";
buildInputs = [ perl llvm groff cmake libxml2 python ];
patches = [ ./clang-tablegen-dir.patch ] ++
stdenv.lib.optional (stdenv.gcc.libc != null) ./clang-purity.patch;
cmakeFlags = [
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_TARGETS_TO_BUILD=all"
"-DGCC_INSTALL_PREFIX=${gccReal}"
] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [
"-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
];
enableParallelBuilding = true;
src = fetchurl {
url = "http://llvm.org/releases/${version}/cfe-${version}.src.tar.gz";
sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi";
};
passthru = { gcc = stdenv.gcc.gcc; };
meta = {
homepage = http://clang.llvm.org/;
description = "A C language family frontend for LLVM";
license = "BSD";
maintainers = with stdenv.lib.maintainers; [viric shlevy];
platforms = with stdenv.lib.platforms; all;
};
}

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = licenses.bsd3;
maintainers = with maintainers; [ lovek323 raskin shlevy viric ];
maintainers = with maintainers; [ lovek323 raskin viric ];
platforms = platforms.all;
};
}

View File

@ -1,18 +1,18 @@
{stdenv, fetchurl, llvm, gmp, mpfr, mpc}:
{stdenv, fetchurl, llvm, gmp, mpfr, mpc, ncurses, zlib}:
stdenv.mkDerivation rec {
version = "3.3";
version = "3.4";
name = "dragonegg-${version}";
src = fetchurl {
url = "http://llvm.org/releases/${version}/${name}.src.tar.gz";
sha256 = "1kfryjaz5hxh3q6m50qjrwnyjb3smg2zyh025lhz9km3x4kshlri";
sha256 = "1733czbvby1ww3xkwcwmm0km0bpwhfyxvf56wb0zv5gksp3kbgrl";
};
# The gcc the plugin will be built for (the same used building dragonegg)
GCC = "gcc";
buildInputs = [ llvm gmp mpfr mpc ];
buildInputs = [ llvm gmp mpfr mpc ncurses zlib ];
installPhase = ''
mkdir -p $out/lib $out/share/doc/${name}

View File

@ -0,0 +1,89 @@
{ stdenv
, fetchurl
, perl, groff
, cmake
, libxml2
, python
, libffi
, zlib
, ncurses
, isl
, gmp
, doxygen
, binutils_gold
, swig
, which
, libedit
, valgrind
}:
let
version = "3.4";
fetch = name: sha256: fetchurl {
url = "http://llvm.org/releases/${version}/${name}-${version}.src.tar.gz";
inherit sha256;
};
inherit (stdenv.lib) concatStrings mapAttrsToList;
in stdenv.mkDerivation {
name = "llvm-full-${version}";
unpackPhase = ''
unpackFile ${fetch "llvm" "0a169ba045r4apb9cv6ncrwl83l7yiajnzirkcdlhj1cd4nn3995"}
mv llvm-${version} llvm
sourceRoot=$PWD/llvm
${concatStrings (mapAttrsToList (name: { location, sha256 }: ''
unpackFile ${fetch name sha256}
mv ${name}-${version} $sourceRoot/${location}
'') {
clang = { location = "tools/clang"; sha256 = "06rb4j1ifbznl3gfhl98s7ilj0ns01p7y7zap4p7ynmqnc6pia92"; };
clang-tools-extra = { location = "tools/clang/tools/extra"; sha256 = "1d1822mwxxl9agmyacqjw800kzz5x8xr0sdmi8fgx5xfa5sii1ds"; };
compiler-rt = { location = "projects/compiler-rt"; sha256 = "0p5b6varxdqn7q3n77xym63hhq4qqxd2981pfpa65r1w72qqjz7k"; };
lld = { location = "tools/lld"; sha256 = "1sd4scqynryfrmcc4h0ljgwn2dgjmbbmf38z50ya6l0janpd2nxz"; };
lldb = { location = "tools/lldb"; sha256 = "0h8cmjrhjhigk7k2qll1pcf6jfgmbdzkzfz2i048pkfg851s0x4g"; };
polly = { location = "tools/polly"; sha256 = "1rqflmgzg1vzjm0r32c5ck8x3q0qm3g0hh8ggbjazh6x7nvmy6lz"; };
})}
sed -i 's|/usr/bin/env||' \
$sourceRoot/tools/lldb/scripts/Python/finish-swig-Python-LLDB.sh \
$sourceRoot/tools/lldb/scripts/Python/build-swig-Python.sh
'';
buildInputs = [ perl
groff
cmake
libxml2
python
libffi
zlib
ncurses
isl
gmp
doxygen
swig
which
libedit
valgrind
];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_ENABLE_FFI=ON"
"-DGCC_INSTALL_PREFIX=${stdenv.gcc.gcc}"
"-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
"-DLLVM_BINUTILS_INCDIR=${binutils_gold}/include"
"-DCMAKE_CXX_FLAGS=-std=c++11"
];
passthru.gcc = stdenv.gcc.gcc;
enableParallelBuilding = true;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.shlevy ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -0,0 +1,20 @@
{ stdenv, fetchurl, gmp }:
stdenv.mkDerivation rec {
name = "isl-0.12.2"; # CLooG 0.16.3 fails to build with ISL 0.08.
src = fetchurl {
url = "http://isl.gforge.inria.fr/${name}.tar.bz2";
sha256 = "1d0zs64yw6fzs6b7kxq6nh9kvas16h8b43agwh30118jjzpdpczl";
};
buildInputs = [ gmp ];
meta = {
homepage = http://www.kotnet.org/~skimo/isl/;
license = "LGPLv2.1";
description = "A library for manipulating sets and relations of integer points bounded by linear constraints";
maintainers = [ stdenv.lib.maintainers.shlevy ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -1,46 +1,26 @@
{ stdenv, fetchsvn, cmake, libunwind }:
{ stdenv, fetchurl, fetchsvn, cmake, libcxxabi }:
let rev = "190100"; in
let
version = "3.4";
stdenv.mkDerivation rec {
name = "libc++-pre${rev}";
in stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetchsvn {
url = "http://llvm.org/svn/llvm-project/libcxx/trunk";
inherit rev;
sha256 = "0hnfvzzrkj797kp9sk2yncvbmiyx0d72k8bys3z7l6i47d37xv03";
src = fetchurl {
url = "http://llvm.org/releases/${version}/libcxx-${version}.src.tar.gz";
sha256 = "1sqd5qhqj7qnn9zjxx9bv7ky4f7xgmh9sbgd53y1kszhg41217xx";
};
cxxabi = fetchsvn {
url = "http://llvm.org/svn/llvm-project/libcxxabi/trunk";
inherit rev;
sha256 = "1kdyvngwd229cgmcqpawaf0qizas8bqc0g8s08fmbgwsrh1qrryp";
};
buildInputs = [ cmake ];
preConfigure = ''
sed -i 's/;cxa_demangle.h//' CMakeLists.txt
cp -R ${cxxabi} cxxabi
chmod u+w -R cxxabi # umm
(export NIX_CFLAGS_COMPILE="-I${libunwind}/include -I$PWD/include";
export NIX_CFLAGS_LINK="-L${libunwind}/lib -lunwind";
cd cxxabi/lib
sed -e s,-lstdc++,, -i buildit # do not link to libstdc++!
./buildit
mkdir -p $out/lib && cp libc++abi.so.1.0 $out/lib
cd $out/lib
ln -s libc++abi.so.1.0 libc++abi.so
ln -s libc++abi.so.1.0 libc++abi.so.1)
'';
buildInputs = [ cmake libcxxabi ];
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release"
"-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${cxxabi}/include"
"-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
"-DLIBCXX_CXX_ABI=libcxxabi" ];
buildPhase = ''NIX_CFLAGS_LINK="-L$out/lib -lc++abi" make'';
enableParallelBuilding = true;
passthru.abi = libcxxabi;
meta = {
homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11";
@ -49,4 +29,3 @@ stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -0,0 +1,39 @@
{ stdenv, fetchsvn, libcxx, libunwind }:
let
rev = "199626";
in stdenv.mkDerivation {
name = "libcxxabi-pre-${rev}";
src = fetchsvn {
url = http://llvm.org/svn/llvm-project/libcxxabi/trunk;
rev = "199626";
sha256 = "0h1x1s40x5r65ar53rv34lmgcfil3zxaknqr64dka1mz29xhhrxy";
};
NIX_CFLAGS_LINK="-L${libunwind}/lib -lunwind";
postUnpack = ''
unpackFile ${libcxx.src}
export NIX_CFLAGS_COMPILE="-I${libunwind}/include -I$PWD/include -I$(readlink -f libcxx-*)/include"
'';
installPhase = ''
install -d -m 755 $out/include $out/lib
install -m 644 lib/libc++abi.so.1.0 $out/lib
install -m 644 include/cxxabi.h $out/include
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
'';
patchPhase = "sed -e s,-lstdc++,, -i lib/buildit";
buildPhase = "(cd lib; ./buildit)";
meta = {
homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library";
license = "BSD";
maintainers = stdenv.lib.maintainers.shlevy;
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -1193,6 +1193,7 @@ let
ised = callPackage ../tools/misc/ised {};
isl = callPackage ../development/libraries/isl { };
isl_0_12 = callPackage ../development/libraries/isl/0.12.2.nix { };
isync = callPackage ../tools/networking/isync { };
@ -2298,18 +2299,10 @@ let
ccl = builderDefsPackage ../development/compilers/ccl {};
clangUnwrapped = callPackage ../development/compilers/llvm/clang.nix {
stdenv = if stdenv.isDarwin
then stdenvAdapters.overrideGCC stdenv gccApple
else stdenvAdapters.overrideGCC stdenv gcc47;
};
clang = wrapClang llvmFull;
clang = wrapClang clangUnwrapped;
libcxxLLVM = callPackage ../development/compilers/llvm { stdenv = libcxxStdenv; version="3.3"; };
clangSelf = clangWrapSelf (callPackage ../development/compilers/llvm/clang.nix {
llvmFullSelf = clangWrapSelf (llvmFull.override {
stdenv = libcxxStdenv;
llvm = libcxxLLVM;
});
clangWrapSelf = build: (import ../build-support/clang-wrapper) {
@ -2325,7 +2318,7 @@ let
#Use this instead of stdenv to build with clang
clangStdenv = lowPrio (stdenvAdapters.overrideGCC stdenv clang);
libcxxStdenv = stdenvAdapters.overrideGCC stdenv (clangWrapSelf clangUnwrapped);
libcxxStdenv = stdenvAdapters.overrideGCC stdenv (clangWrapSelf llvmFull);
clean = callPackage ../development/compilers/clean { };
@ -2918,6 +2911,10 @@ let
else stdenv;
};
llvm_33 = llvm_34.override { version = "3.3"; };
llvmFull = callPackage ../development/compilers/llvm/full.nix {
stdenv = stdenvAdapters.overrideGCC stdenv gcc47;
isl = isl_0_12;
};
mentorToolchains = recurseIntoAttrs (
callPackage_i686 ../development/compilers/mentor {}
@ -3170,9 +3167,9 @@ let
};
wrapClangWith = clangWrapper: glibc: baseClang: clangWrapper {
nativeTools = stdenv ? gcc && stdenv.gcc.nativeTools;
nativeLibc = stdenv ? gcc && stdenv.gcc.nativeLibc;
nativePrefix = if stdenv ? gcc then stdenv.gcc.nativePrefix else "";
nativeTools = stdenv.gcc.nativeTools or false;
nativeLibc = stdenv.gcc.nativeLibc or false;
nativePrefix = stdenv.gcc.nativePrefix or "";
clang = baseClang;
libc = glibc;
shell = bash;
@ -3620,6 +3617,7 @@ let
csslint = callPackage ../development/web/csslint { };
libcxx = callPackage ../development/libraries/libc++ { stdenv = pkgs.clangStdenv; };
libcxxabi = callPackage ../development/libraries/libc++abi { stdenv = pkgs.clangStdenv; };
dejagnu = callPackage ../development/tools/misc/dejagnu { };
@ -4131,7 +4129,7 @@ let
dssi = callPackage ../development/libraries/dssi {};
dragonegg = callPackage ../development/compilers/llvm/dragonegg.nix { };
dragonegg = callPackage ../development/compilers/llvm/dragonegg.nix { llvm = llvmFull; stdenv = overrideGCC stdenv gcc47; };
dxflib = callPackage ../development/libraries/dxflib {};

View File

@ -153,7 +153,6 @@ let
cinepaint = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
ciopfs = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
clang = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
clangUnwrapped = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
clanlib = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
classpath = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
clearsilver = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };