diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-11-16 09:19:02 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-11-30 10:38:08 -0800 |
| commit | 2186660b5169cb7784b89a7fc0a25eb7889d1e6b (patch) | |
| tree | 57da88baf1858763e63eff44c92a4322b2b56195 /src/bootstrap | |
| parent | 8e373b47872872a2ce61c5b02f4dd96d90d046ee (diff) | |
| download | rust-2186660b5169cb7784b89a7fc0a25eb7889d1e6b.tar.gz rust-2186660b5169cb7784b89a7fc0a25eb7889d1e6b.zip | |
Update the bootstrap compiler
Now that we've got a beta build, let's use it!
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/Cargo.toml | 1 | ||||
| -rw-r--r-- | src/bootstrap/channel.rs | 17 | ||||
| -rw-r--r-- | src/bootstrap/check.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/lib.rs | 16 |
5 files changed, 5 insertions, 35 deletions
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index 4c9b578c134..35f8fb43f7b 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -29,4 +29,3 @@ getopts = "0.2" rustc-serialize = "0.3" gcc = "0.3.38" libc = "0.2" -md5 = "0.1" diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index 879c383404a..b2341f59787 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -20,7 +20,6 @@ use std::io::prelude::*; use std::process::Command; use build_helper::output; -use md5; use Build; @@ -91,20 +90,4 @@ pub fn collect(build: &mut Build) { build.ver_hash = Some(ver_hash); build.short_ver_hash = Some(short_ver_hash); } - - // Calculate this compiler's bootstrap key, which is currently defined as - // the first 8 characters of the md5 of the release string. - let key = md5::compute(build.release.as_bytes()); - build.bootstrap_key = format!("{:02x}{:02x}{:02x}{:02x}", - key[0], key[1], key[2], key[3]); - - // Slurp up the stage0 bootstrap key as we're bootstrapping from an - // otherwise stable compiler. - let mut s = String::new(); - t!(t!(File::open(build.src.join("src/stage0.txt"))).read_to_string(&mut s)); - if let Some(line) = s.lines().find(|l| l.starts_with("rustc_key")) { - if let Some(key) = line.split(": ").nth(1) { - build.bootstrap_key_stage0 = key.to_string(); - } - } } diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 150232e4ab4..b67eab38f5d 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -220,7 +220,7 @@ pub fn compiletest(build: &Build, } } } - build.add_bootstrap_key(&mut cmd); + cmd.env("RUSTC_BOOTSTRAP", "1"); cmd.arg("--adb-path").arg("adb"); cmd.arg("--adb-test-dir").arg(ADB_TEST_DIR); diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 236989dbcfe..b268686ca6c 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -120,8 +120,8 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) { for file in t!(fs::read_dir(build.src.join("src/rtstartup"))) { let file = t!(file); let mut cmd = Command::new(&compiler_path); - build.add_bootstrap_key(&mut cmd); - build.run(cmd.arg("--target").arg(target) + build.run(cmd.env("RUSTC_BOOTSTRAP", "1") + .arg("--target").arg(target) .arg("--emit=obj") .arg("--out-dir").arg(into) .arg(file.path())); diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 03c74ff081a..590c967d147 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -22,7 +22,6 @@ extern crate cmake; extern crate filetime; extern crate gcc; extern crate getopts; -extern crate md5; extern crate num_cpus; extern crate rustc_serialize; extern crate toml; @@ -120,8 +119,6 @@ pub struct Build { version: String, package_vers: String, local_rebuild: bool, - bootstrap_key: String, - bootstrap_key_stage0: String, // Probed tools at runtime lldb_version: Option<String>, @@ -205,8 +202,6 @@ impl Build { ver_date: None, version: String::new(), local_rebuild: local_rebuild, - bootstrap_key: String::new(), - bootstrap_key_stage0: String::new(), package_vers: String::new(), cc: HashMap::new(), cxx: HashMap::new(), @@ -438,7 +433,8 @@ impl Build { .env("RUSTDOC_REAL", self.rustdoc(compiler)) .env("RUSTC_FLAGS", self.rustc_flags(target).join(" ")); - self.add_bootstrap_key(&mut cargo); + // Enable usage of unstable features + cargo.env("RUSTC_BOOTSTRAP", "1"); // Specify some various options for build scripts used throughout // the build. @@ -655,14 +651,6 @@ impl Build { add_lib_path(vec![self.rustc_libdir(compiler)], cmd); } - /// Adds the compiler's bootstrap key to the environment of `cmd`. - fn add_bootstrap_key(&self, cmd: &mut Command) { - cmd.env("RUSTC_BOOTSTRAP", "1"); - // FIXME: Transitionary measure to bootstrap using the old bootstrap logic. - // Remove this once the bootstrap compiler uses the new login in Issue #36548. - cmd.env("RUSTC_BOOTSTRAP_KEY", "62b3e239"); - } - /// Returns the compiler's libdir where it stores the dynamic libraries that /// it itself links against. /// |
