Skip to content

Commit 5c94997

Browse files
committed
Auto merge of #40524 - alexcrichton:update-bootstrap, r=alexcrichton
rustbuild: Update bootstrap compiler Now that we've also updated cargo's release process this commit also changes the download location of Cargo from Cargos archives back to the static.r-l.o archives. This should ensure that the Cargo download is the exact Cargo paired with the rustc that we release.
2 parents 7ae95e5 + c033942 commit 5c94997

File tree

18 files changed

+243
-167
lines changed

18 files changed

+243
-167
lines changed

src/bootstrap/bootstrap.py

+5-12
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,8 @@ class RustBuild(object):
160160
def download_stage0(self):
161161
cache_dst = os.path.join(self.build_dir, "cache")
162162
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date())
163-
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_rev())
164163
if not os.path.exists(rustc_cache):
165164
os.makedirs(rustc_cache)
166-
if not os.path.exists(cargo_cache):
167-
os.makedirs(cargo_cache)
168165

169166
if self.rustc().startswith(self.bin_root()) and \
170167
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
@@ -195,15 +192,15 @@ def download_stage0(self):
195192
if self.cargo().startswith(self.bin_root()) and \
196193
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
197194
self.print_what_it_means_to_bootstrap()
198-
filename = "cargo-nightly-{}.tar.gz".format(self.build)
199-
url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/" + self.stage0_cargo_rev()
200-
tarball = os.path.join(cargo_cache, filename)
195+
filename = "cargo-{}-{}.tar.gz".format(channel, self.build)
196+
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
197+
tarball = os.path.join(rustc_cache, filename)
201198
if not os.path.exists(tarball):
202199
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
203200
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
204201
self.fix_executable(self.bin_root() + "/bin/cargo")
205202
with open(self.cargo_stamp(), 'w') as f:
206-
f.write(self.stage0_cargo_rev())
203+
f.write(self.stage0_rustc_date())
207204

208205
def fix_executable(self, fname):
209206
# If we're on NixOS we need to change the path to the dynamic loader
@@ -258,9 +255,6 @@ def fix_executable(self, fname):
258255
print("warning: failed to call patchelf: %s" % e)
259256
return
260257

261-
def stage0_cargo_rev(self):
262-
return self._cargo_rev
263-
264258
def stage0_rustc_date(self):
265259
return self._rustc_date
266260

@@ -283,7 +277,7 @@ def cargo_out_of_date(self):
283277
if not os.path.exists(self.cargo_stamp()) or self.clean:
284278
return True
285279
with open(self.cargo_stamp(), 'r') as f:
286-
return self.stage0_cargo_rev() != f.read()
280+
return self.stage0_rustc_date() != f.read()
287281

288282
def bin_root(self):
289283
return os.path.join(self.build_dir, self.build, "stage0")
@@ -578,7 +572,6 @@ def bootstrap():
578572

579573
data = stage0_data(rb.rust_root)
580574
rb._rustc_channel, rb._rustc_date = data['rustc'].split('-', 1)
581-
rb._cargo_rev = data['cargo']
582575

583576
# Fetch/build the bootstrap
584577
rb.build = rb.build_triple()

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use build_helper::output;
2323
use Build;
2424

2525
// The version number
26-
pub const CFG_RELEASE_NUM: &'static str = "1.17.0";
26+
pub const CFG_RELEASE_NUM: &'static str = "1.18.0";
2727

2828
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
2929
// Be sure to make this starts with a dot to conform to semver pre-release

src/librustc/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![feature(conservative_impl_trait)]
3030
#![feature(const_fn)]
3131
#![feature(core_intrinsics)]
32-
#![cfg_attr(stage0,feature(field_init_shorthand))]
3332
#![feature(i128_type)]
3433
#![feature(libc)]
3534
#![feature(loop_break_value)]

src/librustc_asan/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![cfg_attr(not(stage0), feature(sanitizer_runtime))]
12-
#![cfg_attr(not(stage0), sanitizer_runtime)]
11+
#![sanitizer_runtime]
12+
#![feature(sanitizer_runtime)]
1313
#![feature(alloc_system)]
1414
#![feature(staged_api)]
1515
#![no_std]

src/librustc_data_structures/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#![feature(shared)]
2929
#![feature(collections_range)]
30-
#![cfg_attr(stage0,feature(field_init_shorthand))]
3130
#![feature(nonzero)]
3231
#![feature(rustc_private)]
3332
#![feature(staged_api)]

src/librustc_incremental/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#![feature(rand)]
2525
#![feature(core_intrinsics)]
2626
#![feature(conservative_impl_trait)]
27-
#![cfg_attr(stage0,feature(field_init_shorthand))]
2827
#![cfg_attr(stage0, feature(pub_restricted))]
2928

3029
extern crate graphviz;

src/librustc_lsan/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![cfg_attr(not(stage0), feature(sanitizer_runtime))]
12-
#![cfg_attr(not(stage0), sanitizer_runtime)]
11+
#![sanitizer_runtime]
12+
#![feature(sanitizer_runtime)]
1313
#![feature(alloc_system)]
1414
#![feature(staged_api)]
1515
#![no_std]

src/librustc_metadata/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#![feature(box_patterns)]
2121
#![feature(conservative_impl_trait)]
2222
#![feature(core_intrinsics)]
23-
#![cfg_attr(stage0, feature(field_init_shorthand))]
2423
#![feature(i128_type)]
2524
#![feature(proc_macro_internals)]
2625
#![feature(quote)]

src/librustc_mir/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
2323
#![feature(associated_consts)]
2424
#![feature(box_patterns)]
2525
#![feature(box_syntax)]
26-
#![cfg_attr(stage0, feature(field_init_shorthand))]
2726
#![feature(i128_type)]
2827
#![feature(rustc_diagnostic_macros)]
2928
#![feature(rustc_private)]
@@ -61,4 +60,4 @@ pub fn provide(providers: &mut Providers) {
6160
mir_map::provide(providers);
6261
shim::provide(providers);
6362
transform::qualify_consts::provide(providers);
64-
}
63+
}

src/librustc_msan/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![cfg_attr(not(stage0), feature(sanitizer_runtime))]
12-
#![cfg_attr(not(stage0), sanitizer_runtime)]
11+
#![sanitizer_runtime]
12+
#![feature(sanitizer_runtime)]
1313
#![feature(alloc_system)]
1414
#![feature(staged_api)]
1515
#![no_std]

src/librustc_privacy/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
html_root_url = "https://doc.rust-lang.org/nightly/")]
1818
#![deny(warnings)]
1919

20-
#![cfg_attr(stage0, feature(field_init_shorthand))]
2120
#![feature(rustc_diagnostic_macros)]
2221
#![feature(rustc_private)]
2322
#![feature(staged_api)]

src/librustc_trans/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#![feature(box_syntax)]
2929
#![feature(const_fn)]
3030
#![feature(custom_attribute)]
31-
#![cfg_attr(stage0, feature(field_init_shorthand))]
3231
#![allow(unused_attributes)]
3332
#![feature(i128_type)]
3433
#![feature(libc)]

src/librustc_tsan/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![cfg_attr(not(stage0), feature(sanitizer_runtime))]
12-
#![cfg_attr(not(stage0), sanitizer_runtime)]
11+
#![sanitizer_runtime]
12+
#![feature(sanitizer_runtime)]
1313
#![feature(alloc_system)]
1414
#![feature(staged_api)]
1515
#![no_std]

src/librustc_typeck/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ This API is completely unstable and subject to change.
7777
#![feature(box_patterns)]
7878
#![feature(box_syntax)]
7979
#![feature(conservative_impl_trait)]
80-
#![cfg_attr(stage0,feature(field_init_shorthand))]
8180
#![feature(loop_break_value)]
8281
#![feature(never_type)]
8382
#![feature(quote)]

src/stage0.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212
# tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
1313
# released on `$date`
1414

15-
rustc: beta-2017-02-01
16-
cargo: 407edef22e894266eb562618cba5ca9757051946
15+
rustc: beta-2017-03-21

0 commit comments

Comments
 (0)