Restructure rustc derivations for ease of updating.

Update racerRust to use new rustcMaster and upgrade cargoSnapshot so racer builds.
This commit is contained in:
Jordan Woehr 2015-03-01 12:31:57 -07:00
parent b7b54b0539
commit 5821e91bd1
16 changed files with 289 additions and 294 deletions

View File

@ -1,90 +1,17 @@
{stdenv, fetchurl, which, file, perl, curl, python27, makeWrapper
, tzdata, git, valgrind, procps, coreutils
}:
assert !stdenv.isFreeBSD;
/* Rust's build process has a few quirks :
- It requires some patched in llvm that haven't landed upstream, so it
compiles its own llvm. This might change in the future, so at some
point we may be able to switch to nix's llvm.
- The Rust compiler is written is Rust, so it requires a bootstrap
compiler, which is downloaded during the build. To make the build
pure, we download it ourself before and put it where it is
expected. Once the language is stable (1.0) , we might want to
switch it to use nix's packaged rust compiler.
*/
with ((import ./common.nix) {inherit stdenv; version = "1.0.0-alpha"; });
let snapshotHash = if stdenv.system == "i686-linux"
then "d8b73fc9aa3ad72ce1408a41e35d78dba10eb4d4"
else if stdenv.system == "x86_64-linux"
then "697880d3640e981bbbf23284363e8e9a158b588d"
else if stdenv.system == "i686-darwin"
then "a73b1fc03e8cac747aab0aa186292bb4332a7a98"
else if stdenv.system == "x86_64-darwin"
then "e4ae2670ea4ba5c2e5b4245409c9cab45c9eeb5b"
else abort "no-snapshot for platform ${stdenv.system}";
{ stdenv, callPackage }:
callPackage ./makeRustcDerivation.nix {
shortVersion = "1.0.0-alpha";
isRelease = true;
srcSha = "0p62gx3s087n09d2v3l9iyfx5cmsa1x91n4ysixcb7w3drr8a8is";
snapshotHashLinux686 = "d8b73fc9aa3ad72ce1408a41e35d78dba10eb4d4";
snapshotHashLinux64 = "697880d3640e981bbbf23284363e8e9a158b588d";
snapshotHashDarwin686 = "a73b1fc03e8cac747aab0aa186292bb4332a7a98";
snapshotHashDarwin64 = "e4ae2670ea4ba5c2e5b4245409c9cab45c9eeb5b";
snapshotDate = "2015-01-07";
snapshotRev = "9e4e524";
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
in stdenv.mkDerivation {
inherit name;
inherit version;
inherit meta;
src = fetchurl {
url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
sha256 = "0p62gx3s087n09d2v3l9iyfx5cmsa1x91n4ysixcb7w3drr8a8is";
};
# We need rust to build rust. If we don't provide it, configure will try to download it.
snapshot = stdenv.mkDerivation {
name = "rust-stage0";
src = fetchurl {
url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
sha1 = snapshotHash;
};
dontStrip = true;
installPhase = ''
mkdir -p "$out"
cp -r bin "$out/bin"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc"
'' else "");
};
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
# The compiler requires cc, so we patch the source to tell it where to find it
patches = [ ./hardcode_paths.patch ./local_stage0.patch ]
++ stdenv.lib.optional stdenv.needsPax ./grsec.patch;
postPatch = ''
substituteInPlace src/librustc_trans/back/link.rs \
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
substituteInPlace src/librustc_back/archive.rs \
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
substituteInPlace src/rust-installer/gen-install-script.sh \
--replace /bin/echo "${coreutils}/bin/echo"
substituteInPlace src/rust-installer/gen-installer.sh \
--replace /bin/echo "${coreutils}/bin/echo"
'';
buildInputs = [ which file perl curl python27 makeWrapper git valgrind procps ];
enableParallelBuilding = false; # disabled due to rust-lang/rust#16305
preCheck = "export TZDIR=${tzdata}/share/zoneinfo";
doCheck = true;
patches = [
./patches/hardcode_paths.alpha.patch
./patches/local_stage0.alpha.patch
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
}

View File

@ -0,0 +1,16 @@
{ stdenv, callPackage }:
callPackage ./makeRustcDerivation.nix {
shortVersion = "1.0.0-alpha.2";
isRelease = true;
srcSha = "1j2n34w0hdz7jrl100c9q9hl80l8nsc3xwnzizv9sh4gx52vjcd9";
snapshotHashLinux686 = "191ed5ec4f17e32d36abeade55a1c6085e51245c";
snapshotHashLinux64 = "acec86045632f4f3f085c072ba696f889906dffe";
snapshotHashDarwin686 = "9d9e622584bfa318f32bcb5b9ce6a365febff595";
snapshotHashDarwin64 = "e96c1e9860b186507cc75c186d1b96d44df12292";
snapshotDate = "2015-02-17";
snapshotRev = "f1bb6c2";
patches = [
./patches/alpha2.patch
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
}

View File

@ -1,35 +0,0 @@
{stdenv, version}:
{
inherit version;
platform = if stdenv.system == "i686-linux"
then "linux-i386"
else if stdenv.system == "x86_64-linux"
then "linux-x86_64"
else if stdenv.system == "i686-darwin"
then "macos-i386"
else if stdenv.system == "x86_64-darwin"
then "macos-x86_64"
else abort "no snapshot to bootstrap for this platform (missing platform url suffix)";
target = if stdenv.system == "i686-linux"
then "i686-unknown-linux-gnu"
else if stdenv.system == "x86_64-linux"
then "x86_64-unknown-linux-gnu"
else if stdenv.system == "i686-darwin"
then "i686-apple-darwin"
else if stdenv.system == "x86_64-darwin"
then "x86_64-apple-darwin"
else abort "no snapshot to bootstrap for this platform (missing target triple)";
meta = with stdenv.lib; {
homepage = http://www.rust-lang.org/;
description = "A safe, concurrent, practical language";
maintainers = with maintainers; [ madjar cstrahan wizeman ];
license = map (builtins.getAttr "shortName") [ licenses.mit licenses.asl20 ];
platforms = platforms.linux;
};
name = "rustc-${version}";
}

View File

@ -1,16 +0,0 @@
diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make/relocation-model/Makefile
index 2fcdd32..2d9ddb0 100644
--- a/src/test/run-make/relocation-model/Makefile
+++ b/src/test/run-make/relocation-model/Makefile
@@ -5,9 +5,11 @@ all:
$(call RUN,foo)
$(RUSTC) -C relocation-model=default foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=static foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=default --crate-type=dylib foo.rs

View File

@ -1,28 +0,0 @@
diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs
index 7ea192b..cd5d01b 100644
--- a/src/librustc_back/archive.rs
+++ b/src/librustc_back/archive.rs
@@ -54,7 +54,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option<String>,
paths: &[&Path]) -> ProcessOutput {
let ar = match *maybe_ar_prog {
Some(ref ar) => &ar[],
- None => "ar"
+ None => "@arPath@"
};
let mut cmd = Command::new(ar);
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index dacf620..815ce60 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -348,8 +348,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri
pub fn get_cc_prog(sess: &Session) -> String {
match sess.opts.cg.linker {
- Some(ref linker) => return linker.to_string(),
- None => sess.target.target.options.linker.clone(),
+ Some(ref linker) => linker.to_string(),
+ None => "@ccPath@".to_string(),
}
}

View File

@ -1,101 +1,18 @@
{ stdenv, fetchurl, fetchgit, which, file, perl, curl, python27, makeWrapper
, tzdata, git, valgrind, procps, coreutils
}:
assert !stdenv.isFreeBSD;
/* Rust's build process has a few quirks :
- It requires some patched in llvm that haven't landed upstream, so it
compiles its own llvm. This might change in the future, so at some
point we may be able to switch to nix's llvm.
- The Rust compiler is written is Rust, so it requires a bootstrap
compiler, which is downloaded during the build. To make the build
pure, we download it ourself before and put it where it is
expected. Once the language is stable (1.0) , we might want to
switch it to use nix's packaged rust compiler.
NOTE : some derivation depend on rust. When updating this, please make
sure those derivations still compile. (racer, for example).
*/
let shortVersion = "1.0.0-dev";
rev = "a833337943300db1c310a4cf9c84b7b4ef4e9468";
revShort = builtins.substring 0 7 rev;
in
with ((import ./common.nix) {inherit stdenv; version = "${shortVersion}-g${revShort}"; });
let snapshotHash = if stdenv.system == "i686-linux"
then "0197ad7179d74eba06a8b46432548caf226aa03d"
else if stdenv.system == "x86_64-linux"
then "03459f8b216e96ed8b9abe25a42a75859195103d"
else if stdenv.system == "i686-darwin"
then "b5c004883ddff84159f11a3329cde682e0b7f75b"
else if stdenv.system == "x86_64-darwin"
then "b69ea42e1c995682adf0390ed4ef8a762c001a4e"
else abort "no snapshot for platform ${stdenv.system}";
snapshotDate = "2015-01-15";
snapshotRev = "9ade482";
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
in
stdenv.mkDerivation {
inherit name;
inherit version;
inherit meta;
src = fetchgit {
url = https://github.com/rust-lang/rust;
inherit rev;
sha256 = "1b9rnx3j37ckxa3vf20g8amsbffzvk2m9lzv5x1m04ci54w85f56";
};
# We need rust to build rust. If we don't provide it, configure will try to download it.
snapshot = stdenv.mkDerivation {
name = "rust-stage0";
src = fetchurl {
url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
sha1 = snapshotHash;
};
dontStrip = true;
installPhase = ''
mkdir -p "$out"
cp -r bin "$out/bin"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc"
'' else "");
};
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
# The compiler requires cc, so we patch the source to tell it where to find it
patches = [ ./hardcode_paths.HEAD.patch ./local_stage0.HEAD.patch ]
++ stdenv.lib.optional stdenv.needsPax ./grsec.HEAD.patch;
postPatch = ''
substituteInPlace src/librustc_trans/back/link.rs \
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
substituteInPlace src/librustc_back/archive.rs \
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
substituteInPlace src/rust-installer/gen-install-script.sh \
--replace /bin/echo "${coreutils}/bin/echo"
substituteInPlace src/rust-installer/gen-installer.sh \
--replace /bin/echo "${coreutils}/bin/echo"
'';
buildInputs = [ which file perl curl python27 makeWrapper git valgrind procps ];
enableParallelBuilding = false; # disabled due to rust-lang/rust#16305
preCheck = "export TZDIR=${tzdata}/share/zoneinfo";
doCheck = true;
{ stdenv, callPackage }:
callPackage ./makeRustcDerivation.nix {
shortVersion = "1.0.0-dev";
isRelease = false;
# src rev for master on 2015/03/01
srcRev = "157614249594f187f421cd97f928e64c5ab5c1fa";
srcSha = "06d6fwl1dg6wfnwa002ak89hnjplpf2sjhg78yjg4ki0ca7b0b74";
snapshotHashLinux686 = "3278ebbce8cb269acc0614dac5ddac07eab6a99c";
snapshotHashLinux64 = "72287d0d88de3e5a53bae78ac0d958e1a7637d73";
snapshotHashDarwin686 = "33b366b5287427a340a0aa6ed886d5ff4edf6a76";
snapshotHashDarwin64 = "914bf9baa32081a9d5633f1d06f4d382cd71504e";
snapshotDate = "2015-02-25";
snapshotRev = "880fb89";
patches = [
./patches/head.patch
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
}

View File

@ -1,16 +0,0 @@
diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh
index e78f231..6b6773b 100755
--- a/src/etc/local_stage0.sh
+++ b/src/etc/local_stage0.sh
@@ -53,11 +53,6 @@
fi
cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
-cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
# do not fail if one of the above fails, as all we need is a working rustc!
exit 0

View File

@ -0,0 +1,140 @@
{ stdenv, fetchurl, fetchgit, which, file, perl, curl, python27, makeWrapper
, tzdata, git, valgrind, procps, coreutils
, shortVersion, isRelease
, srcSha, srcRev ? ""
, snapshotHashLinux686, snapshotHashLinux64
, snapshotHashDarwin686, snapshotHashDarwin64
, snapshotDate, snapshotRev
, patches
}:
assert !stdenv.isFreeBSD;
/* Rust's build process has a few quirks :
- It requires some patched in llvm that haven't landed upstream, so it
compiles its own llvm. This might change in the future, so at some
point we may be able to switch to nix's llvm.
- The Rust compiler is written is Rust, so it requires a bootstrap
compiler, which is downloaded during the build. To make the build
pure, we download it ourself before and put it where it is
expected. Once the language is stable (1.0) , we might want to
switch it to use nix's packaged rust compiler.
NOTE : some derivation depend on rust. When updating this, please make
sure those derivations still compile. (racer, for example).
*/
assert (if isRelease then srcRev == "" else srcRev != "");
let version = if isRelease then
"${shortVersion}"
else
"${shortVersion}-g${builtins.substring 0 7 srcRev}";
name = "rustc-${version}";
platform = if stdenv.system == "i686-linux"
then "linux-i386"
else if stdenv.system == "x86_64-linux"
then "linux-x86_64"
else if stdenv.system == "i686-darwin"
then "macos-i386"
else if stdenv.system == "x86_64-darwin"
then "macos-x86_64"
else abort "no snapshot to bootstrap for this platform (missing platform url suffix)";
target = if stdenv.system == "i686-linux"
then "i686-unknown-linux-gnu"
else if stdenv.system == "x86_64-linux"
then "x86_64-unknown-linux-gnu"
else if stdenv.system == "i686-darwin"
then "i686-apple-darwin"
else if stdenv.system == "x86_64-darwin"
then "x86_64-apple-darwin"
else abort "no snapshot to bootstrap for this platform (missing target triple)";
meta = with stdenv.lib; {
homepage = http://www.rust-lang.org/;
description = "A safe, concurrent, practical language";
maintainers = with maintainers; [ madjar cstrahan wizeman ];
license = map (builtins.getAttr "shortName") [ licenses.mit licenses.asl20 ];
platforms = platforms.linux;
};
snapshotHash = if stdenv.system == "i686-linux"
then snapshotHashLinux686
else if stdenv.system == "x86_64-linux"
then snapshotHashLinux64
else if stdenv.system == "i686-darwin"
then snapshotHashDarwin686
else if stdenv.system == "x86_64-darwin"
then snapshotHashDarwin64
else abort "no snapshot for platform ${stdenv.system}";
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshotHash}.tar.bz2";
in
stdenv.mkDerivation {
inherit name;
inherit version;
inherit meta;
src = if isRelease then
fetchurl {
url = "http://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
sha256 = srcSha;
}
else
fetchgit {
url = https://github.com/rust-lang/rust;
rev = srcRev;
sha256 = srcSha;
};
# We need rust to build rust. If we don't provide it, configure will try to download it.
snapshot = stdenv.mkDerivation {
name = "rust-stage0";
src = fetchurl {
url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
sha1 = snapshotHash;
};
dontStrip = true;
installPhase = ''
mkdir -p "$out"
cp -r bin "$out/bin"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc"
'' else "");
};
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
inherit patches;
postPatch = ''
substituteInPlace src/librustc_trans/back/link.rs \
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
substituteInPlace src/librustc_back/archive.rs \
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
substituteInPlace src/rust-installer/gen-install-script.sh \
--replace /bin/echo "${coreutils}/bin/echo"
substituteInPlace src/rust-installer/gen-installer.sh \
--replace /bin/echo "${coreutils}/bin/echo"
'';
buildInputs = [ which file perl curl python27 makeWrapper git valgrind procps ];
enableParallelBuilding = false; # disabled due to rust-lang/rust#16305
preCheck = "export TZDIR=${tzdata}/share/zoneinfo";
doCheck = true;
}

View File

@ -0,0 +1,44 @@
diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh
index b506aff..b4b346b 100755
--- a/src/etc/local_stage0.sh
+++ b/src/etc/local_stage0.sh
@@ -50,11 +50,6 @@ if [ -z $TARG_DIR ]; then
fi
cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
-cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
# do not fail if one of the above fails, as all we need is a working rustc!
exit 0
diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs
index c45ee25..0f91672 100644
--- a/src/librustc_back/archive.rs
+++ b/src/librustc_back/archive.rs
@@ -54,7 +54,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option<String>,
paths: &[&Path]) -> ProcessOutput {
let ar = match *maybe_ar_prog {
Some(ref ar) => &ar[..],
- None => "ar"
+ None => "@arPath@"
};
let mut cmd = Command::new(ar);
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index ef849bb..e090b99 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -350,8 +350,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri
pub fn get_cc_prog(sess: &Session) -> String {
match sess.opts.cg.linker {
- Some(ref linker) => return linker.to_string(),
- None => sess.target.target.options.linker.clone(),
+ Some(ref linker) => linker.to_string(),
+ None => "@ccPath@".to_string(),
}
}

View File

@ -0,0 +1,44 @@
diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh
index ca59b1c..65ee7bf 100755
--- a/src/etc/local_stage0.sh
+++ b/src/etc/local_stage0.sh
@@ -50,11 +50,6 @@ if [ -z $TARG_DIR ]; then
fi
cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
-cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
-cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
# do not fail if one of the above fails, as all we need is a working rustc!
exit 0
diff --git a/src/librustc_back/archive.rs b/src/librustc_back/archive.rs
index 6bf7453..319f9af 100644
--- a/src/librustc_back/archive.rs
+++ b/src/librustc_back/archive.rs
@@ -54,7 +54,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option<String>,
paths: &[&Path]) -> ProcessOutput {
let ar = match *maybe_ar_prog {
Some(ref ar) => &ar[..],
- None => "ar"
+ None => "@arPath@"
};
let mut cmd = Command::new(ar);
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index ea5001a..911445c 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -350,8 +350,8 @@ pub fn mangle_internal_name_by_path_and_seq(path: PathElems, flav: &str) -> Stri
pub fn get_cc_prog(sess: &Session) -> String {
match sess.opts.cg.linker {
- Some(ref linker) => return linker.to_string(),
- None => sess.target.target.options.linker.clone(),
+ Some(ref linker) => linker.to_string(),
+ None => "@ccPath@".to_string(),
}
}

View File

@ -2,19 +2,19 @@
/* Cargo binary snapshot */
let snapshotDate = "2015-01-24";
let snapshotDate = "2015-02-26";
in
with ((import ./common.nix) { inherit stdenv; version = "snapshot-${snapshotDate}"; });
let snapshotHash = if stdenv.system == "i686-linux"
then "96213038f850569f1c4fa6a0d146c6155c0d566b"
then "2a28b604d09b4a76a54a05d91f7f158692427b3a"
else if stdenv.system == "x86_64-linux"
then "4d87486493c2881edced7b1d2f8beaac32aaa5b5"
then "7367f4aca86d38e209ef7236b00175df036c03e2"
else if stdenv.system == "i686-darwin"
then "17b9fc782e86bffe170abb83a01e0cb7c90a0daa"
then "e5cabb0a4a2b4e47f7b1ae9b802e2b5d0b14eac5"
else if stdenv.system == "x86_64-darwin"
then "18887bdbd3e6d2a127aa34216fa06e9877b0fbc6"
then "3026c60ddd46d2bcf1cb178fc801095dbfba5286"
else throw "no snapshot for platform ${stdenv.system}";
snapshotName = "cargo-nightly-${platform}.tar.gz";
in
@ -34,7 +34,7 @@ stdenv.mkDerivation {
installPhase = ''
mkdir -p "$out"
cp -r bin "$out/bin"
cp -r cargo/bin "$out/bin"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib}/lib" \

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
#TODO add emacs support
name = "racer-git-2015-01-20";
name = "racer-git-2015-02-28";
src = fetchgit {
url = https://github.com/phildawes/racer;
rev = "599aa524ea949ec5f9f0be0375dbb1df9cb852ae";
sha256 = "1kasm7vffn176wr072m1dmqg1rb3wqai9yisxf8mia62548pdx88";
rev = "2e1d718fae21431de4493c238196466e9d4996bc";
sha256 = "0lvp494kg2hlbbdrwxmmxkyhjw53y9wjdml9z817pwj3fwmrjsx0";
};
buildInputs = [ rustc cargo makeWrapper ];

View File

@ -4141,8 +4141,10 @@ let
ocaml = ocaml_3_08_0;
};
rustc = callPackage ../development/compilers/rustc/1.0.0-alpha.nix {};
rustcAlpha = callPackage ../development/compilers/rustc/1.0.0-alpha.nix {};
rustcAlpha2 = callPackage ../development/compilers/rustc/1.0.0-alpha2.nix {};
rustcMaster = callPackage ../development/compilers/rustc/head.nix {};
rustc = rustcAlpha2;
sbclBootstrap = callPackage ../development/compilers/sbcl/bootstrap.nix {};