Skip to content

Commit 6338493

Browse files
committed
---
yaml --- r: 273541 b: refs/heads/beta c: 64a13a4 h: refs/heads/master i: 273539: 14d7626
1 parent 66c0791 commit 6338493

File tree

686 files changed

+27265
-18475
lines changed

Some content is hidden

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

686 files changed

+27265
-18475
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: ed8a2e230d64dff35991475f516821ab3ebe455f
26+
refs/heads/beta: 64a13a46601bb47a470264936b623b4adf706128
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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/beta/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/beta/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/beta/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/beta/mk/crates.mk

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ TARGET_CRATES := libc std term \
5353
getopts collections test rand \
5454
core alloc \
5555
rustc_unicode rustc_bitflags \
56-
alloc_system alloc_jemalloc
56+
alloc_system alloc_jemalloc rustc_const_eval
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
@@ -91,10 +91,13 @@ DEPS_test := std getopts term native:rust_test_helpers
9191
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9292
DEPS_syntax_ext := syntax fmt_macros
9393

94+
DEPS_rustc_const_eval := std syntax
95+
9496
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
95-
log graphviz rustc_llvm rustc_back rustc_data_structures
97+
log graphviz rustc_llvm rustc_back rustc_data_structures\
98+
rustc_const_eval
9699
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
97-
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
100+
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
98101
DEPS_rustc_data_structures := std log serialize
99102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
100103
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
@@ -103,16 +106,17 @@ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_bo
103106
DEPS_rustc_front := std syntax log serialize
104107
DEPS_rustc_lint := rustc log syntax
105108
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
106-
DEPS_rustc_metadata := rustc rustc_front syntax rbml
109+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_eval
107110
DEPS_rustc_passes := syntax rustc core rustc_front
108-
DEPS_rustc_mir := rustc rustc_front syntax
111+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_eval
109112
DEPS_rustc_resolve := arena rustc rustc_front log syntax
110113
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
111114
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
112115
DEPS_rustc_privacy := rustc rustc_front log syntax
113116
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
114-
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
115-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
117+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
118+
rustc_const_eval
119+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
116120

117121
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
118122
test rustc_lint rustc_front

branches/beta/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/beta/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/beta/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/beta/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)