Skip to content

Commit 44097b6

Browse files
committed
---
yaml --- r: 272205 b: refs/heads/auto c: 211c35a h: refs/heads/master i: 272203: e769a81
1 parent 7b8c594 commit 44097b6

File tree

899 files changed

+25802
-18639
lines changed

Some content is hidden

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

899 files changed

+25802
-18639
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: e3146d77ec6b599f1dc189ef8d7daad2f13e9680
11+
refs/heads/auto: 211c35afcbb7842f6f9d7fa45cee4cd192e4bfe6
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/COMPILER_TESTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_foo() {
7777
}
7878
```
7979

80-
Note that not all headers have meaning when customized too a revision.
80+
Note that not all headers have meaning when customized to a revision.
8181
For example, the `ignore-test` header (and all "ignore" headers)
8282
currently only apply to the test as a whole, not to particular
8383
revisions. The only headers that are intended to really work when

branches/auto/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Some common make targets are:
132132
- `make check-stage1-std NO_REBUILD=1` - test the standard library without
133133
rebuilding the entire compiler
134134
- `make check TESTNAME=<substring-of-test-name>` - Run a matching set of tests.
135-
- `TESTNAME` should be a substring of the tests to match against e.g. it could
136-
be the fully qualified test name, or just a part of it.
135+
- `TESTNAME` should be a substring of the tests to match against e.g. it could
136+
be the fully qualified test name, or just a part of it.
137137
`TESTNAME=collections::hash::map::test_map::test_capacity_not_less_than_len`
138138
or `TESTNAME=test_capacity_not_less_than_len`.
139139
- `make check-stage1-rpass TESTNAME=<substring-of-test-name>` - Run a single

branches/auto/README.md

Lines changed: 3 additions & 2 deletions
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
@@ -177,10 +177,11 @@ To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md).
177177
Rust has an [IRC] culture and most real-time collaboration happens in a
178178
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
179179
most popular channel is [#rust], a venue for general discussion about
180-
Rust, and a good place to ask for help.
180+
Rust. And a good place to ask for help would be [#rust-beginners].
181181
182182
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
183183
[#rust]: irc://irc.mozilla.org/rust
184+
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
184185
185186
## License
186187

branches/auto/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/auto/configure

Lines changed: 7 additions & 4 deletions
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
@@ -966,11 +969,11 @@ then
966969
LLVM_VERSION=$($LLVM_CONFIG --version)
967970

968971
case $LLVM_VERSION in
969-
(3.[5-8]*)
972+
(3.[6-8]*)
970973
msg "found ok version of LLVM: $LLVM_VERSION"
971974
;;
972975
(*)
973-
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
976+
err "bad LLVM version: $LLVM_VERSION, need >=3.6"
974977
;;
975978
esac
976979
fi
@@ -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
(*)
@@ -1249,7 +1252,7 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
12491252
bits=x86_64
12501253
msvc_part=amd64
12511254
;;
1252-
i686-*)
1255+
i*86-*)
12531256
bits=i386
12541257
msvc_part=
12551258
;;

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

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ TARGET_CRATES := libc std term \
5353
getopts collections test rand \
5454
core alloc \
5555
rustc_unicode rustc_bitflags \
56-
alloc_system alloc_jemalloc rustc_const_eval
56+
alloc_system alloc_jemalloc
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 \
60-
rustc_plugin rustc_metadata rustc_passes
60+
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
61+
rustc_const_eval rustc_const_math
6162
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6263
flate arena graphviz rbml log serialize
6364
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -91,38 +92,42 @@ DEPS_test := std getopts term native:rust_test_helpers
9192
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9293
DEPS_syntax_ext := syntax fmt_macros
9394

94-
DEPS_rustc_const_eval := std syntax
95+
DEPS_rustc_const_math := std syntax log serialize
96+
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
97+
rustc_back graphviz
9598

9699
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
97-
log graphviz rustc_llvm rustc_back rustc_data_structures\
98-
rustc_const_eval
99-
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
100-
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
100+
log graphviz rustc_back rustc_data_structures\
101+
rustc_const_math
102+
DEPS_rustc_back := std syntax rustc_front flate log libc
103+
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
101104
DEPS_rustc_data_structures := std log serialize
102105
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
103106
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
104107
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
105-
rustc_metadata syntax_ext rustc_passes
108+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
106109
DEPS_rustc_front := std syntax log serialize
107-
DEPS_rustc_lint := rustc log syntax
110+
DEPS_rustc_lint := rustc log syntax rustc_const_eval
108111
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
109-
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_eval
110-
DEPS_rustc_passes := syntax rustc core rustc_front
111-
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_eval
112+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113+
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
112115
DEPS_rustc_resolve := arena rustc rustc_front log syntax
113-
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
116+
DEPS_rustc_platform_intrinsics := std
114117
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
115118
DEPS_rustc_privacy := rustc rustc_front log syntax
116119
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
117120
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
121+
rustc_const_math rustc_const_eval
122+
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
124+
rustc_const_eval
120125

121126
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
122-
test rustc_lint rustc_front
127+
test rustc_lint rustc_front rustc_const_eval
123128

124129

125-
TOOL_DEPS_compiletest := test getopts
130+
TOOL_DEPS_compiletest := test getopts log
126131
TOOL_DEPS_rustdoc := rustdoc
127132
TOOL_DEPS_rustc := rustc_driver
128133
TOOL_DEPS_rustbook := std rustdoc

branches/auto/mk/main.mk

Lines changed: 10 additions & 9 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
@@ -488,7 +493,7 @@ endif
488493
LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \
489494
$$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib
490495
LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3) := \
491-
$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))
496+
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(3))
492497

493498
HOST_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
494499
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3)):$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))
@@ -501,18 +506,14 @@ RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(HOST_RPATH_VAR$(1)_T_$(2)_H_$(3))
501506
# if you're building a cross config, the host->* parts are
502507
# effectively stage1, since it uses the just-built stage0.
503508
#
504-
# This logic is similar to how the LD_LIBRARY_PATH variable must
505-
# change be slightly different when doing cross compilations.
506-
# The build doesn't copy over all target libraries into
507-
# a new directory, so we need to point the library path at
508-
# the build directory where all the target libraries came
509-
# from (the stage0 build host). Otherwise the relative rpaths
510-
# inside of the rustc binary won't get resolved correctly.
509+
# Also be sure to use the right rpath because we're loading libraries from the
510+
# CFG_BUILD's stage1 directory for our target, so switch this one instance of
511+
# `RPATH_VAR` to get the bootstrap working.
511512
ifeq ($(1),0)
512513
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
513514
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
514515

515-
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR$(1)_T_$(2)_H_$(3))
516+
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR1_T_$(2)_H_$$(CFG_BUILD))
516517
endif
517518
endif
518519

branches/auto/mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
236236
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
237237

238238
ifeq ($$(findstring msvc,$(1)),msvc)
239-
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
239+
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD))
240240
@$$(call E, cmake: compiler-rt)
241241
$$(Q)cd "$$(COMPRT_BUILD_DIR_$(1))"; $$(CFG_CMAKE) "$(S)src/compiler-rt" \
242242
-DCMAKE_BUILD_TYPE=$$(LLVM_BUILD_CONFIG_MODE) \
243-
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$(1)) \
243+
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$$(CFG_BUILD)) \
244244
-G"$$(CFG_CMAKE_GENERATOR)"
245245
$$(Q)$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
246246
--target lib/builtins/builtins \

branches/auto/mk/target.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8989
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
9090
--out-dir $$(@D) \
9191
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
92+
-C metadata=$$(CFG_FILENAME_EXTRA) \
9293
$$<
9394
@touch -r $$@.start_time $$@ && rm $$@.start_time
9495
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

branches/auto/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/auto/src/bootstrap/build/check.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ pub fn linkcheck(build: &Build, stage: u32, host: &str) {
1616
build.run(build.tool_cmd(&compiler, "linkchecker")
1717
.arg(build.out.join(host).join("doc")));
1818
}
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));
26+
}

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

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,38 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) {
123123
}
124124
}
125125

126+
/// Build libtest.
127+
///
128+
/// This will build libtest and supporting libraries for a particular stage of
129+
/// the build using the `compiler` targeting the `target` architecture. The
130+
/// artifacts created will also be linked into the sysroot directory.
131+
pub fn test<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
132+
println!("Building stage{} test artifacts ({} -> {})", compiler.stage,
133+
compiler.host, target);
134+
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
135+
build.clear_if_dirty(&out_dir, &libstd_shim(build, compiler, target));
136+
let mut cargo = build.cargo(compiler, Mode::Libtest, target, "build");
137+
cargo.arg("--manifest-path")
138+
.arg(build.src.join("src/rustc/test_shim/Cargo.toml"));
139+
build.run(&mut cargo);
140+
test_link(build, target, compiler, compiler.host);
141+
}
142+
143+
/// Link all libtest rlibs/dylibs into the sysroot location.
144+
///
145+
/// Links those artifacts generated in the given `stage` for `target` produced
146+
/// by `compiler` into `host`'s sysroot.
147+
pub fn test_link(build: &Build,
148+
target: &str,
149+
compiler: &Compiler,
150+
host: &str) {
151+
let target_compiler = Compiler::new(compiler.stage, host);
152+
let libdir = build.sysroot_libdir(&target_compiler, target);
153+
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
154+
add_to_sysroot(&out_dir, &libdir);
155+
}
156+
157+
126158
/// Build the compiler.
127159
///
128160
/// This will build the compiler for a particular stage of the build using
@@ -133,7 +165,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
133165
compiler.stage, compiler.host, target);
134166

135167
let out_dir = build.cargo_out(compiler, Mode::Librustc, target);
136-
build.clear_if_dirty(&out_dir, &libstd_shim(build, compiler, target));
168+
build.clear_if_dirty(&out_dir, &libtest_shim(build, compiler, target));
137169

138170
let mut cargo = build.cargo(compiler, Mode::Librustc, target, "build");
139171
cargo.arg("--features").arg(build.rustc_features())
@@ -202,6 +234,12 @@ fn libstd_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
202234
build.cargo_out(compiler, Mode::Libstd, target).join("libstd_shim.rlib")
203235
}
204236

237+
/// Cargo's output path for libtest in a given stage, compiled by a particular
238+
/// compiler for the specified target.
239+
fn libtest_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
240+
build.cargo_out(compiler, Mode::Libtest, target).join("libtest_shim.rlib")
241+
}
242+
205243
fn compiler_file(compiler: &Path, file: &str) -> String {
206244
output(Command::new(compiler)
207245
.arg(format!("-print-file-name={}", file))).trim().to_string()

branches/auto/src/bootstrap/build/doc.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,22 @@ pub fn std(build: &Build, stage: u32, host: &str, out: &Path) {
122122
cp_r(&out_dir, out)
123123
}
124124

125+
pub fn test(build: &Build, stage: u32, host: &str, out: &Path) {
126+
println!("Documenting stage{} test ({})", stage, host);
127+
let compiler = Compiler::new(stage, host);
128+
let out_dir = build.stage_out(&compiler, Mode::Libtest)
129+
.join(host).join("doc");
130+
let rustdoc = build.rustdoc(&compiler);
131+
132+
build.clear_if_dirty(&out_dir, &rustdoc);
133+
134+
let mut cargo = build.cargo(&compiler, Mode::Libtest, host, "doc");
135+
cargo.arg("--manifest-path")
136+
.arg(build.src.join("src/rustc/test_shim/Cargo.toml"));
137+
build.run(&mut cargo);
138+
cp_r(&out_dir, out)
139+
}
140+
125141
pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
126142
println!("Documenting stage{} compiler ({})", stage, host);
127143
let compiler = Compiler::new(stage, host);

0 commit comments

Comments
 (0)