3
0
Fork 0
forked from mirrors/nixpkgs

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
, shortVersion, isRelease
, forceBundledLLVM ? false
, srcSha, srcRev ? ""
, snapshotHashLinux686, snapshotHashLinux64
, snapshotHashDarwin686, snapshotHashDarwin64
@ -76,7 +77,7 @@ let version = if isRelease then
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
in
stdenv.mkDerivation {
with stdenv.lib; stdenv.mkDerivation {
inherit name;
inherit version;
inherit meta;
@ -106,7 +107,7 @@ stdenv.mkDerivation {
installPhase = ''
mkdir -p "$out"
cp -r bin "$out/bin"
'' + stdenv.lib.optionalString stdenv.isLinux ''
'' + optionalString stdenv.isLinux ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc"
@ -115,9 +116,10 @@ stdenv.mkDerivation {
configureFlags = configureFlags
++ [ "--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" ]
++ 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;
@ -132,7 +134,7 @@ stdenv.mkDerivation {
--replace "\$\$(subst /,//," "\$\$(subst /,/,"
# 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
sed -i configure \
@ -155,8 +157,9 @@ stdenv.mkDerivation {
# Procps is needed for one of the test cases
nativeBuildInputs = [ file python2 ]
++ stdenv.lib.optionals stdenv.isLinux [ procps ];
buildInputs = [ llvmPackages_37.llvm ncurses ];
++ optionals stdenv.isLinux [ procps ];
buildInputs = [ ncurses ]
++ optional (!forceBundledLLVM) llvmPackages_37.llvm;
enableParallelBuilding = true;

View file

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