Skip to content

Commit 062d349

Browse files
committed
---
yaml --- r: 276531 b: refs/heads/try c: a8d59e0 h: refs/heads/master i: 276529: dde30c8 276527: bde2411
1 parent 3c8ee4c commit 062d349

File tree

719 files changed

+27698
-18294
lines changed

Some content is hidden

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

719 files changed

+27698
-18294
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 41244661979cda16bf2b15bd802337a0ee9764dd
4+
refs/heads/try: a8d59e0ca62a47e87bf4b5288b9aaf586ae3c640
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build.
7777
7878
Download [MinGW from
7979
here](http://mingw-w64.org/doku.php/download/mingw-builds), and choose the
80-
`threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
80+
`version=4.9.x,threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
8181
add its `bin` directory to your `PATH`. This is due to [#28260](https://github.com/rust-lang/rust/issues/28260), in the future,
8282
installing from pacman should be just fine.
8383

branches/try/RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Compatibility Notes
116116
that were not intended. In this release, [defaulted type parameters
117117
appearing outside of type definitions will generate a
118118
warning][1.7d], which will become an error in future releases.
119-
* [Parsing "." as a float results in an error instead of
120-
0][1.7p]. That is, `".".parse::<f32>()` returns `Err`, not `Ok(0)`.
119+
* [Parsing "." as a float results in an error instead of 0][1.7p].
120+
That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
121121
* [Borrows of closure parameters may not outlive the closure][1.7bc].
122122

123123
[1.7a]: https://github.com/rust-lang/rust/pull/30928

branches/try/configure

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ opt dist-host-only 0 "only install bins for the host architecture"
607607
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
608608
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
609609
opt rustbuild 0 "use the rust and cargo based build system"
610+
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
610611

611612
# Optimization and debugging options. These may be overridden by the release channel, etc.
612613
opt_nosave optimize 1 "build optimized rust code"
@@ -713,6 +714,8 @@ if [ -n "$CFG_ENABLE_DEBUG_ASSERTIONS" ]; then putvar CFG_ENABLE_DEBUG_ASSERTION
713714
if [ -n "$CFG_ENABLE_DEBUGINFO" ]; then putvar CFG_ENABLE_DEBUGINFO; fi
714715
if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; fi
715716

717+
if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
718+
716719
# A magic value that allows the compiler to use unstable features
717720
# during the bootstrap even when doing so would normally be an error
718721
# because of feature staging or because the build turns on
@@ -1031,7 +1034,7 @@ then
10311034
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10321035
then
10331036
case $CFG_OSX_CLANG_VERSION in
1034-
(7.0* | 7.1* | 7.2*)
1037+
(7.0* | 7.1* | 7.2* | 7.3*)
10351038
step_msg "found ok version of APPLE CLANG: $CFG_OSX_CLANG_VERSION"
10361039
;;
10371040
(*)

branches/try/mk/cfg/i586-unknown-linux-gnu.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
77
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
88
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12-
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS) -march=pentium
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS) -march=pentium
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS) -march=pentium
1313
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
1414
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
1515
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=

branches/try/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
9797
log graphviz rustc_llvm rustc_back rustc_data_structures\
9898
rustc_const_eval
9999
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
100-
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
100+
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
101101
DEPS_rustc_data_structures := std log serialize
102102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
103103
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \

branches/try/mk/main.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ ifdef CFG_ENABLE_DEBUGINFO
134134
CFG_RUSTC_FLAGS += -g
135135
endif
136136

137+
ifdef CFG_ENABLE_ORBIT
138+
$(info cfg: launching MIR (CFG_ENABLE_ORBIT))
139+
CFG_RUSTC_FLAGS += -Z orbit
140+
endif
141+
137142
ifdef SAVE_TEMPS
138143
CFG_RUSTC_FLAGS += --save-temps
139144
endif

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
383383
@$$(call E, rustc: $$@)
384384
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
385385
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
386-
-L "$$(RT_OUTPUT_DIR_$(2))" \
386+
-Cmetadata="test-crate" -L "$$(RT_OUTPUT_DIR_$(2))" \
387387
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
388388
$$(RUSTFLAGS_$(4))
389389

branches/try/src/bootstrap/build/channel.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,23 @@ pub fn collect(build: &mut Build) {
3636
match &build.config.channel[..] {
3737
"stable" => {
3838
build.release = release_num.to_string();
39+
build.package_vers = build.release.clone();
3940
build.unstable_features = false;
4041
}
4142
"beta" => {
4243
build.release = format!("{}-beta{}", release_num,
4344
prerelease_version);
45+
build.package_vers = "beta".to_string();
4446
build.unstable_features = false;
4547
}
4648
"nightly" => {
4749
build.release = format!("{}-nightly", release_num);
50+
build.package_vers = "nightly".to_string();
4851
build.unstable_features = true;
4952
}
5053
_ => {
5154
build.release = format!("{}-dev", release_num);
55+
build.package_vers = build.release.clone();
5256
build.unstable_features = true;
5357
}
5458
}

branches/try/src/bootstrap/build/check.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::process::Command;
12-
1311
use build::{Build, Compiler};
1412

1513
pub fn linkcheck(build: &Build, stage: u32, host: &str) {
1614
println!("Linkcheck stage{} ({})", stage, host);
1715
let compiler = Compiler::new(stage, host);
18-
let linkchecker = build.tool(&compiler, "linkchecker");
19-
build.run(Command::new(&linkchecker)
20-
.arg(build.out.join(host).join("doc")));
16+
build.run(build.tool_cmd(&compiler, "linkchecker")
17+
.arg(build.out.join(host).join("doc")));
18+
}
19+
20+
pub fn cargotest(build: &Build, stage: u32, host: &str) {
21+
let ref compiler = Compiler::new(stage, host);
22+
build.run(build.tool_cmd(compiler, "cargotest")
23+
.env("RUSTC", build.compiler_path(compiler))
24+
.env("RUSTDOC", build.rustdoc(compiler))
25+
.arg(&build.cargo));
2126
}

branches/try/src/bootstrap/build/compile.rs

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,23 @@ use build::{Build, Compiler, Mode};
2323
/// This will build the standard library for a particular stage of the build
2424
/// using the `compiler` targeting the `target` architecture. The artifacts
2525
/// created will also be linked into the sysroot directory.
26-
pub fn std<'a>(build: &'a Build, stage: u32, target: &str,
27-
compiler: &Compiler<'a>) {
28-
let host = compiler.host;
29-
println!("Building stage{} std artifacts ({} -> {})", stage,
30-
host, target);
26+
pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
27+
println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
28+
compiler.host, target);
3129

3230
// Move compiler-rt into place as it'll be required by the compiler when
3331
// building the standard library to link the dylib of libstd
34-
let libdir = build.sysroot_libdir(stage, &host, target);
32+
let libdir = build.sysroot_libdir(compiler, target);
3533
let _ = fs::remove_dir_all(&libdir);
3634
t!(fs::create_dir_all(&libdir));
3735
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
3836
libdir.join(staticlib("compiler-rt", target))));
3937

4038
build_startup_objects(build, target, &libdir);
4139

42-
let out_dir = build.cargo_out(stage, &host, Mode::Libstd, target);
40+
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
4341
build.clear_if_dirty(&out_dir, &build.compiler_path(compiler));
44-
let mut cargo = build.cargo(stage, compiler, Mode::Libstd, Some(target),
45-
"build");
42+
let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build");
4643
cargo.arg("--features").arg(build.std_features())
4744
.arg("--manifest-path")
4845
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"));
@@ -59,20 +56,20 @@ pub fn std<'a>(build: &'a Build, stage: u32, target: &str,
5956
}
6057

6158
build.run(&mut cargo);
62-
std_link(build, stage, target, compiler, host);
59+
std_link(build, target, compiler, compiler.host);
6360
}
6461

6562
/// Link all libstd rlibs/dylibs into the sysroot location.
6663
///
6764
/// Links those artifacts generated in the given `stage` for `target` produced
6865
/// by `compiler` into `host`'s sysroot.
6966
pub fn std_link(build: &Build,
70-
stage: u32,
7167
target: &str,
7268
compiler: &Compiler,
7369
host: &str) {
74-
let libdir = build.sysroot_libdir(stage, host, target);
75-
let out_dir = build.cargo_out(stage, compiler.host, Mode::Libstd, target);
70+
let target_compiler = Compiler::new(compiler.stage, host);
71+
let libdir = build.sysroot_libdir(&target_compiler, target);
72+
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
7673

7774
// If we're linking one compiler host's output into another, then we weren't
7875
// called from the `std` method above. In that case we clean out what's
@@ -85,7 +82,8 @@ pub fn std_link(build: &Build,
8582
}
8683
add_to_sysroot(&out_dir, &libdir);
8784

88-
if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
85+
if target.contains("musl") &&
86+
(target.contains("x86_64") || target.contains("i686")) {
8987
copy_third_party_objects(build, target, &libdir);
9088
}
9189
}
@@ -130,17 +128,14 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) {
130128
/// This will build the compiler for a particular stage of the build using
131129
/// the `compiler` targeting the `target` architecture. The artifacts
132130
/// created will also be linked into the sysroot directory.
133-
pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
134-
compiler: &Compiler<'a>) {
135-
let host = compiler.host;
136-
println!("Building stage{} compiler artifacts ({} -> {})", stage,
137-
host, target);
131+
pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
132+
println!("Building stage{} compiler artifacts ({} -> {})",
133+
compiler.stage, compiler.host, target);
138134

139-
let out_dir = build.cargo_out(stage, &host, Mode::Librustc, target);
140-
build.clear_if_dirty(&out_dir, &libstd_shim(build, stage, &host, target));
135+
let out_dir = build.cargo_out(compiler, Mode::Librustc, target);
136+
build.clear_if_dirty(&out_dir, &libstd_shim(build, compiler, target));
141137

142-
let mut cargo = build.cargo(stage, compiler, Mode::Librustc, Some(target),
143-
"build");
138+
let mut cargo = build.cargo(compiler, Mode::Librustc, target, "build");
144139
cargo.arg("--features").arg(build.rustc_features())
145140
.arg("--manifest-path")
146141
.arg(build.src.join("src/rustc/Cargo.toml"));
@@ -184,27 +179,27 @@ pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
184179
}
185180
build.run(&mut cargo);
186181

187-
rustc_link(build, stage, target, compiler, compiler.host);
182+
rustc_link(build, target, compiler, compiler.host);
188183
}
189184

190185
/// Link all librustc rlibs/dylibs into the sysroot location.
191186
///
192187
/// Links those artifacts generated in the given `stage` for `target` produced
193188
/// by `compiler` into `host`'s sysroot.
194189
pub fn rustc_link(build: &Build,
195-
stage: u32,
196190
target: &str,
197191
compiler: &Compiler,
198192
host: &str) {
199-
let libdir = build.sysroot_libdir(stage, host, target);
200-
let out_dir = build.cargo_out(stage, compiler.host, Mode::Librustc, target);
193+
let target_compiler = Compiler::new(compiler.stage, host);
194+
let libdir = build.sysroot_libdir(&target_compiler, target);
195+
let out_dir = build.cargo_out(compiler, Mode::Librustc, target);
201196
add_to_sysroot(&out_dir, &libdir);
202197
}
203198

204199
/// Cargo's output path for the standard library in a given stage, compiled
205200
/// by a particular compiler for the specified target.
206-
fn libstd_shim(build: &Build, stage: u32, host: &str, target: &str) -> PathBuf {
207-
build.cargo_out(stage, host, Mode::Libstd, target).join("libstd_shim.rlib")
201+
fn libstd_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
202+
build.cargo_out(compiler, Mode::Libstd, target).join("libstd_shim.rlib")
208203
}
209204

210205
fn compiler_file(compiler: &Path, file: &str) -> String {
@@ -219,25 +214,29 @@ fn compiler_file(compiler: &Path, file: &str) -> String {
219214
/// compiler.
220215
pub fn assemble_rustc(build: &Build, stage: u32, host: &str) {
221216
assert!(stage > 0, "the stage0 compiler isn't assembled, it's downloaded");
217+
// The compiler that we're assembling
218+
let target_compiler = Compiler::new(stage, host);
219+
220+
// The compiler that compiled the compiler we're assembling
221+
let build_compiler = Compiler::new(stage - 1, &build.config.build);
222222

223223
// Clear out old files
224-
let sysroot = build.sysroot(stage, host);
224+
let sysroot = build.sysroot(&target_compiler);
225225
let _ = fs::remove_dir_all(&sysroot);
226226
t!(fs::create_dir_all(&sysroot));
227227

228228
// Link in all dylibs to the libdir
229229
let sysroot_libdir = sysroot.join(libdir(host));
230230
t!(fs::create_dir_all(&sysroot_libdir));
231-
let src_libdir = build.sysroot_libdir(stage - 1, &build.config.build, host);
231+
let src_libdir = build.sysroot_libdir(&build_compiler, host);
232232
for f in t!(fs::read_dir(&src_libdir)).map(|f| t!(f)) {
233233
let filename = f.file_name().into_string().unwrap();
234234
if is_dylib(&filename) {
235235
t!(fs::hard_link(&f.path(), sysroot_libdir.join(&filename)));
236236
}
237237
}
238238

239-
let out_dir = build.cargo_out(stage - 1, &build.config.build,
240-
Mode::Librustc, host);
239+
let out_dir = build.cargo_out(&build_compiler, Mode::Librustc, host);
241240

242241
// Link the compiler binary itself into place
243242
let rustc = out_dir.join(exe("rustc", host));
@@ -315,7 +314,7 @@ pub fn tool(build: &Build, stage: u32, host: &str, tool: &str) {
315314
// let out_dir = build.cargo_out(stage, &host, Mode::Librustc, target);
316315
// build.clear_if_dirty(&out_dir, &libstd_shim(build, stage, &host, target));
317316

318-
let mut cargo = build.cargo(stage, &compiler, Mode::Tool, None, "build");
317+
let mut cargo = build.cargo(&compiler, Mode::Tool, host, "build");
319318
cargo.arg("--manifest-path")
320319
.arg(build.src.join(format!("src/tools/{}/Cargo.toml", tool)));
321320
build.run(&mut cargo);

0 commit comments

Comments
 (0)