rustcMaster: 2015-09-23 -> 2015-10-17

The build was changed to compile with the bundled LLVM because compiling
against the system's LLVM now fails with compilation errors.
This commit is contained in:
Ricardo M. Correia 2015-10-17 18:39:50 +02:00
parent 302b640371
commit 3d5ba0d5d6
2 changed files with 14 additions and 10 deletions

View file

@ -2,6 +2,7 @@
, llvmPackages_37, jemalloc, ncurses , llvmPackages_37, jemalloc, ncurses
, shortVersion, isRelease , shortVersion, isRelease
, forceBundledLLVM ? false
, srcSha, srcRev ? "" , srcSha, srcRev ? ""
, snapshotHashLinux686, snapshotHashLinux64 , snapshotHashLinux686, snapshotHashLinux64
, snapshotHashDarwin686, snapshotHashDarwin64 , snapshotHashDarwin686, snapshotHashDarwin64
@ -76,7 +77,7 @@ let version = if isRelease then
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2"; snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
in in
stdenv.mkDerivation { with stdenv.lib; stdenv.mkDerivation {
inherit name; inherit name;
inherit version; inherit version;
inherit meta; inherit meta;
@ -106,7 +107,7 @@ stdenv.mkDerivation {
installPhase = '' installPhase = ''
mkdir -p "$out" mkdir -p "$out"
cp -r bin "$out/bin" cp -r bin "$out/bin"
'' + stdenv.lib.optionalString stdenv.isLinux '' '' + optionalString stdenv.isLinux ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \ --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc" "$out/bin/rustc"
@ -115,9 +116,10 @@ stdenv.mkDerivation {
configureFlags = configureFlags configureFlags = configureFlags
++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ] ++ [ "--enable-local-rust" "--local-rust-root=$snapshot" "--enable-rpath" ]
++ [ "--llvm-root=${llvmPackages_37.llvm}" ] #"--jemalloc-root=${jemalloc}/lib" ] # ++ [ "--jemalloc-root=${jemalloc}/lib"
++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${stdenv.cc.binutils}/bin/ar" ] ++ [ "--default-linker=${stdenv.cc}/bin/cc" "--default-ar=${stdenv.cc.binutils}/bin/ar" ]
++ stdenv.lib.optional (stdenv.cc.cc ? isClang) "--enable-clang"; ++ optional (stdenv.cc.cc ? isClang) "--enable-clang"
++ optional (!forceBundledLLVM) "--llvm-root=${llvmPackages_37.llvm}";
inherit patches; inherit patches;
@ -132,7 +134,7 @@ stdenv.mkDerivation {
--replace "\$\$(subst /,//," "\$\$(subst /,/," --replace "\$\$(subst /,//," "\$\$(subst /,/,"
# Fix dynamic linking against llvm # Fix dynamic linking against llvm
sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py ${optionalString (!forceBundledLLVM) ''sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py''}
# Fix the configure script to not require curl as we won't use it # Fix the configure script to not require curl as we won't use it
sed -i configure \ sed -i configure \
@ -155,8 +157,9 @@ stdenv.mkDerivation {
# Procps is needed for one of the test cases # Procps is needed for one of the test cases
nativeBuildInputs = [ file python2 ] nativeBuildInputs = [ file python2 ]
++ stdenv.lib.optionals stdenv.isLinux [ procps ]; ++ optionals stdenv.isLinux [ procps ];
buildInputs = [ llvmPackages_37.llvm ncurses ]; buildInputs = [ ncurses ]
++ optional (!forceBundledLLVM) llvmPackages_37.llvm;
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -2,10 +2,11 @@
{ stdenv, callPackage }: { stdenv, callPackage }:
callPackage ./generic.nix { callPackage ./generic.nix {
shortVersion = "2015-09-23"; shortVersion = "2015-10-17";
isRelease = false; isRelease = false;
srcRev = "b2f379cdc23aec5c5d0d62acfcc5a4a18ebf0e30"; forceBundledLLVM = true;
srcSha = "1z710f5vv9pbis1q96dc6kqvi0j7xgg95r5f5c3czbvndrxjwm03"; srcRev = "20a6938c0";
srcSha = "18dalmwmyw2csnm72qwkkh37ixxbrn2i5lmwp2q0x9plh5qj5627";
/* Rust is bootstrapped from an earlier built version. We need /* Rust is bootstrapped from an earlier built version. We need
to fetch these earlier versions, which vary per platform. to fetch these earlier versions, which vary per platform.