Skip to content

Commit 164619a

Browse files
committed
Auto merge of #38499 - alexcrichton:rollup, r=alexcrichton
Rollup of 29 pull requests - Successful merges: #37761, #38006, #38131, #38150, #38158, #38171, #38208, #38215, #38236, #38245, #38289, #38302, #38315, #38346, #38388, #38395, #38398, #38418, #38432, #38451, #38463, #38468, #38470, #38471, #38472, #38478, #38486, #38493, #38498 - Failed merges: #38271, #38483
2 parents 3038f30 + d5f1c6e commit 164619a

File tree

135 files changed

+2615
-1526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+2615
-1526
lines changed

mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.15.0
16+
CFG_RELEASE_NUM=1.16.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

src/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/bin/rustc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
//! switching compilers for the bootstrap and for build scripts will probably
2626
//! never get replaced.
2727
28+
#![deny(warnings)]
29+
2830
extern crate bootstrap;
2931

3032
use std::env;

src/bootstrap/bin/rustdoc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
//!
1313
//! See comments in `src/bootstrap/rustc.rs` for more information.
1414
15+
#![deny(warnings)]
16+
1517
extern crate bootstrap;
1618

1719
use std::env;

src/bootstrap/bootstrap.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def verify(path, sha_path, verbose):
8181
with open(path, "rb") as f:
8282
found = hashlib.sha256(f.read()).hexdigest()
8383
with open(sha_path, "r") as f:
84-
expected, _ = f.readline().split()
84+
expected = f.readline().split()[0]
8585
verified = found == expected
8686
if not verified:
8787
print("invalid checksum:\n"
@@ -146,7 +146,7 @@ class RustBuild(object):
146146
def download_stage0(self):
147147
cache_dst = os.path.join(self.build_dir, "cache")
148148
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date())
149-
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_date())
149+
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_rev())
150150
if not os.path.exists(rustc_cache):
151151
os.makedirs(rustc_cache)
152152
if not os.path.exists(cargo_cache):
@@ -179,21 +179,17 @@ def download_stage0(self):
179179
if self.cargo().startswith(self.bin_root()) and \
180180
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
181181
self.print_what_it_means_to_bootstrap()
182-
channel = self.stage0_cargo_channel()
183-
filename = "cargo-{}-{}.tar.gz".format(channel, self.build)
184-
url = "https://static.rust-lang.org/cargo-dist/" + self.stage0_cargo_date()
182+
filename = "cargo-nightly-{}.tar.gz".format(self.build)
183+
url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/" + self.stage0_cargo_rev()
185184
tarball = os.path.join(cargo_cache, filename)
186185
if not os.path.exists(tarball):
187186
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
188187
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
189188
with open(self.cargo_stamp(), 'w') as f:
190-
f.write(self.stage0_cargo_date())
189+
f.write(self.stage0_cargo_rev())
191190

192-
def stage0_cargo_date(self):
193-
return self._cargo_date
194-
195-
def stage0_cargo_channel(self):
196-
return self._cargo_channel
191+
def stage0_cargo_rev(self):
192+
return self._cargo_rev
197193

198194
def stage0_rustc_date(self):
199195
return self._rustc_date
@@ -217,7 +213,7 @@ def cargo_out_of_date(self):
217213
if not os.path.exists(self.cargo_stamp()) or self.clean:
218214
return True
219215
with open(self.cargo_stamp(), 'r') as f:
220-
return self.stage0_cargo_date() != f.read()
216+
return self.stage0_cargo_rev() != f.read()
221217

222218
def bin_root(self):
223219
return os.path.join(self.build_dir, self.build, "stage0")
@@ -469,7 +465,7 @@ def main():
469465

470466
data = stage0_data(rb.rust_root)
471467
rb._rustc_channel, rb._rustc_date = data['rustc'].split('-', 1)
472-
rb._cargo_channel, rb._cargo_date = data['cargo'].split('-', 1)
468+
rb._cargo_rev = data['cargo']
473469

474470
start_time = time()
475471

src/bootstrap/check.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
//! This file implements the various regression test suites that we execute on
1414
//! our CI.
1515
16+
extern crate build_helper;
17+
1618
use std::collections::HashSet;
1719
use std::env;
1820
use std::fmt;
@@ -543,7 +545,7 @@ pub fn distcheck(build: &Build) {
543545
build.run(&mut cmd);
544546
build.run(Command::new("./configure")
545547
.current_dir(&dir));
546-
build.run(Command::new("make")
548+
build.run(Command::new(build_helper::make(&build.config.build))
547549
.arg("check")
548550
.current_dir(&dir));
549551
}

src/bootstrap/config.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ pub struct Target {
113113
#[derive(RustcDecodable, Default)]
114114
struct TomlConfig {
115115
build: Option<Build>,
116+
install: Option<Install>,
116117
llvm: Option<Llvm>,
117118
rust: Option<Rust>,
118119
target: Option<HashMap<String, TomlTarget>>,
@@ -135,6 +136,12 @@ struct Build {
135136
python: Option<String>,
136137
}
137138

139+
/// TOML representation of various global install decisions.
140+
#[derive(RustcDecodable, Default, Clone)]
141+
struct Install {
142+
prefix: Option<String>,
143+
}
144+
138145
/// TOML representation of how the LLVM build is configured.
139146
#[derive(RustcDecodable, Default)]
140147
struct Llvm {
@@ -258,6 +265,10 @@ impl Config {
258265
set(&mut config.submodules, build.submodules);
259266
set(&mut config.vendor, build.vendor);
260267

268+
if let Some(ref install) = toml.install {
269+
config.prefix = install.prefix.clone();
270+
}
271+
261272
if let Some(ref llvm) = toml.llvm {
262273
match llvm.ccache {
263274
Some(StringOrBool::String(ref s)) => {
@@ -275,6 +286,7 @@ impl Config {
275286
set(&mut config.llvm_version_check, llvm.version_check);
276287
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
277288
}
289+
278290
if let Some(ref rust) = toml.rust {
279291
set(&mut config.rust_debug_assertions, rust.debug_assertions);
280292
set(&mut config.rust_debuginfo, rust.debuginfo);

src/bootstrap/config.toml.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@
100100
# Indicate whether the vendored sources are used for Rust dependencies or not
101101
#vendor = false
102102

103+
# =============================================================================
104+
# General install configuration options
105+
# =============================================================================
106+
[install]
107+
108+
# Instead of installing to /usr/local, install to this path instead.
109+
#prefix = "/path/to/install"
110+
103111
# =============================================================================
104112
# Options for compiling Rust code itself
105113
# =============================================================================

src/bootstrap/dist.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,14 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
346346
}
347347

348348
/// Creates the `rust-src` installer component and the plain source tarball
349-
pub fn rust_src(build: &Build) {
349+
pub fn rust_src(build: &Build, host: &str) {
350350
println!("Dist src");
351+
352+
if host != build.config.build {
353+
println!("\tskipping, not a build host");
354+
return
355+
}
356+
351357
let plain_name = format!("rustc-{}-src", package_vers(build));
352358
let name = format!("rust-src-{}", package_vers(build));
353359
let image = tmpdir(build).join(format!("{}-image", name));

src/bootstrap/flags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ To learn more about a subcommand, run `./x.py <command> -h`
280280

281281
Flags {
282282
verbose: m.opt_count("v"),
283-
stage: m.opt_str("stage").map(|j| j.parse().unwrap()),
283+
stage: stage,
284284
keep_stage: m.opt_str("keep-stage").map(|j| j.parse().unwrap()),
285285
build: m.opt_str("build").unwrap_or_else(|| {
286286
env::var("BUILD").unwrap()

0 commit comments

Comments
 (0)