rustc: 1.1.0 -> 1.2.0

This commit is contained in:
Ricardo M. Correia 2015-08-07 23:46:13 +02:00
parent ad4adbdcb2
commit f49da34d82
3 changed files with 35 additions and 54 deletions

View File

@ -1,8 +1,8 @@
{ stdenv, callPackage }:
callPackage ./generic.nix {
shortVersion = "1.1.0";
shortVersion = "1.2.0";
isRelease = true;
srcSha = "0lsfrclj5imxy6129ggya7rb2h04cgqq53f75z2jv40y5xk25sy8";
srcSha = "1zq2nhgaxkv1ghi3z2qgff6cylqirn33nphvkjiczlkjfi0pyw16";
/* Rust is bootstrapped from an earlier built version. We need
to fetch these earlier versions, which vary per platform.
@ -12,19 +12,19 @@ callPackage ./generic.nix {
*/
# linux-i386
snapshotHashLinux686 = "0bc8cffdce611fb71fd7d3d8e7cdbfaf748a4f16";
snapshotHashLinux686 = "a6f22e481eabf098cc65bda97bf7e434a1fcc20b";
# linux-x86_64
snapshotHashLinux64 = "94089740e48167c5975c92c139ae9c286764012f";
snapshotHashLinux64 = "5fd8698fdfe953e6c4d86cf4fa1d5f3a0053248c";
# macos-i386
snapshotHashDarwin686 = "54cc35e76497e6e94fddf38d6e40e9d168491ddb";
snapshotHashDarwin686 = "9a273324a6b63a40f67a553029c0a9fb692ffd1f";
# macos-x86_64
snapshotHashDarwin64 = "43a1c1fba0d1dfee4c2ca310d506f8f5f51b3f6f";
snapshotHashDarwin64 = "e5b12cb7c179fc98fa905a3c84803645d946a6ae";
snapshotDate = "2015-04-27";
snapshotRev = "857ef6e";
snapshotDate = "2015-05-24";
snapshotRev = "ba0e1cd";
patches = [
./patches/stable.patch

View File

@ -123,10 +123,6 @@ stdenv.mkDerivation {
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/librustc_back/target/mod.rs \
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc" \
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"

View File

@ -1,43 +1,28 @@
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 ed44bf8..2b84627 100644
--- a/src/librustc_back/archive.rs
+++ b/src/librustc_back/archive.rs
@@ -57,7 +57,7 @@ fn run_ar(handler: &ErrorHandler, maybe_ar_prog: &Option<String>,
paths: &[&Path]) -> Output {
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 3087a8e..578448f 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -352,7 +352,7 @@ 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(),
}
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
index 402fbcd..8fe2de2 100644
--- a/src/librustc_back/target/mod.rs
+++ b/src/librustc_back/target/mod.rs
@@ -172,8 +172,8 @@ impl Default for TargetOptions {
/// incomplete, and if used for compilation, will certainly not work.
fn default() -> TargetOptions {
TargetOptions {
- linker: "cc".to_string(),
- ar: "ar".to_string(),
+ linker: "@ccPath@".to_string(), // ignore-tidy-linelength
+ ar: "@arPath@".to_string(), // ignore-tidy-linelength
pre_link_args: Vec::new(),
post_link_args: Vec::new(),
cpu: "generic".to_string(),
diff --git a/src/test/run-pass/issue-20797.rs b/src/test/run-pass/issue-20797.rs
index 2772fc8..3d37b08 100644
--- a/src/test/run-pass/issue-20797.rs
+++ b/src/test/run-pass/issue-20797.rs
@@ -97,7 +97,7 @@ impl<S: Strategy> Iterator for Subpaths<S> {
}
fn _foo() {
- let _walker: Subpaths<Recursive> = Subpaths::walk(&PathBuf::from("/home")).unwrap();
+ let _walker: Subpaths<Recursive> = Subpaths::walk(&PathBuf::from("/tmp")).unwrap();
}
fn main() {}