Skip to content

Commit b366e9d

Browse files
committed
---
yaml --- r: 273916 b: refs/heads/beta c: 9f3de64 h: refs/heads/master
1 parent e3d6603 commit b366e9d

File tree

879 files changed

+13475
-23639
lines changed

Some content is hidden

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

879 files changed

+13475
-23639
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: 22c229d88c6897ed3b10d31ff5a0c43f259eaff1
26+
refs/heads/beta: 9f3de647326fbe50e0e283b9018ab7c41abccde3
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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 to a revision.
80+
Note that not all headers have meaning when customized too 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/beta/CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ which includes important information about what platform you're on, what
7171
version of Rust you're using, etc.
7272

7373
Sometimes, a backtrace is helpful, and so including that is nice. To get
74-
a backtrace, set the `RUST_BACKTRACE` environment variable to a value
75-
other than `0`. The easiest way
74+
a backtrace, set the `RUST_BACKTRACE` environment variable. The easiest way
7675
to do this is to invoke `rustc` like this:
7776

7877
```bash
@@ -133,8 +132,8 @@ Some common make targets are:
133132
- `make check-stage1-std NO_REBUILD=1` - test the standard library without
134133
rebuilding the entire compiler
135134
- `make check TESTNAME=<substring-of-test-name>` - Run a matching set of tests.
136-
- `TESTNAME` should be a substring of the tests to match against e.g. it could
137-
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.
138137
`TESTNAME=collections::hash::map::test_map::test_capacity_not_less_than_len`
139138
or `TESTNAME=test_capacity_not_less_than_len`.
140139
- `make check-stage1-rpass TESTNAME=<substring-of-test-name>` - Run a single

branches/beta/README.md

Lines changed: 2 additions & 3 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-
`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,
80+
`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,11 +177,10 @@ 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 would be [#rust-beginners].
180+
Rust, and a good place to ask for help.
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
185184
186185
## License
187186

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 0][1.7p].
120-
That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
119+
* [Parsing "." as a float results in an error instead of
120+
0][1.7p]. That is, `".".parse::<f32>()` returns `Err`, not `Ok(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: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ opt inject-std-version 1 "inject the current compiler version of libstd into pro
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"
610610
opt orbit 0 "get MIR where it belongs - everywhere; most importantly, in orbit"
611-
opt codegen-tests 1 "run the src/test/codegen tests"
612611

613612
# Optimization and debugging options. These may be overridden by the release channel, etc.
614613
opt_nosave optimize 1 "build optimized rust code"
@@ -970,11 +969,11 @@ then
970969
LLVM_VERSION=$($LLVM_CONFIG --version)
971970

972971
case $LLVM_VERSION in
973-
(3.[6-8]*)
972+
(3.[5-8]*)
974973
msg "found ok version of LLVM: $LLVM_VERSION"
975974
;;
976975
(*)
977-
err "bad LLVM version: $LLVM_VERSION, need >=3.6"
976+
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
978977
;;
979978
esac
980979
fi
@@ -1035,7 +1034,7 @@ then
10351034
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10361035
then
10371036
case $CFG_OSX_CLANG_VERSION in
1038-
(7.0* | 7.1* | 7.2* | 7.3*)
1037+
(7.0* | 7.1* | 7.2*)
10391038
step_msg "found ok version of APPLE CLANG: $CFG_OSX_CLANG_VERSION"
10401039
;;
10411040
(*)
@@ -1253,7 +1252,7 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
12531252
bits=x86_64
12541253
msvc_part=amd64
12551254
;;
1256-
i*86-*)
1255+
i686-*)
12571256
bits=i386
12581257
msvc_part=
12591258
;;
@@ -1498,9 +1497,7 @@ do
14981497
LLVM_INST_DIR=$CFG_LLVM_ROOT
14991498
do_reconfigure=0
15001499
# Check that LLVm FileCheck is available. Needed for the tests
1501-
if [ -z "$CFG_DISABLE_CODEGEN_TESTS" ]; then
1502-
need_cmd $LLVM_INST_DIR/bin/FileCheck
1503-
fi
1500+
need_cmd $LLVM_INST_DIR/bin/FileCheck
15041501
fi
15051502

15061503
if [ ${do_reconfigure} -ne 0 ]

branches/beta/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ the maximum number of threads used for this purpose.
268268

269269
.TP
270270
\fBRUST_TEST_NOCAPTURE\fR
271-
If set to a value other than "0", a synonym for the --nocapture flag.
271+
A synonym for the --nocapture flag.
272272

273273
.TP
274274
\fBRUST_MIN_STACK\fR
275275
Sets the minimum stack size for new threads.
276276

277277
.TP
278278
\fBRUST_BACKTRACE\fR
279-
If set to a value different than "0", produces a backtrace in the output of a program which panics.
279+
If set, produces a backtrace in the output of a program which panics.
280280

281281
.SH "EXAMPLES"
282282
To build an executable from a source file with a main function:

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) -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
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)
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: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ 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 \
60-
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
61-
rustc_const_eval rustc_const_math
60+
rustc_plugin rustc_metadata rustc_passes
6261
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6362
flate arena graphviz rbml log serialize
6463
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -92,42 +91,38 @@ DEPS_test := std getopts term native:rust_test_helpers
9291
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9392
DEPS_syntax_ext := syntax fmt_macros
9493

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
94+
DEPS_rustc_const_eval := std syntax
9895

9996
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
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
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
104101
DEPS_rustc_data_structures := std log serialize
105102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106103
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107104
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
108-
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
105+
rustc_metadata syntax_ext rustc_passes
109106
DEPS_rustc_front := std syntax log serialize
110-
DEPS_rustc_lint := rustc log syntax rustc_const_eval
107+
DEPS_rustc_lint := rustc log syntax
111108
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
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
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
115112
DEPS_rustc_resolve := arena rustc rustc_front log syntax
116-
DEPS_rustc_platform_intrinsics := std
113+
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
117114
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
118115
DEPS_rustc_privacy := rustc rustc_front log syntax
119116
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
120117
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
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
118+
rustc_const_eval
119+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
125120

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

129124

130-
TOOL_DEPS_compiletest := test getopts log
125+
TOOL_DEPS_compiletest := test getopts
131126
TOOL_DEPS_rustdoc := rustdoc
132127
TOOL_DEPS_rustc := rustc_driver
133128
TOOL_DEPS_rustbook := std rustdoc

branches/beta/mk/main.mk

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ endif
493493
LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \
494494
$$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib
495495
LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3) := \
496-
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(3))
496+
$$(CURDIR)/$$(TLIB1_T_$(2)_H_$(CFG_BUILD))
497497

498498
HOST_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
499499
$$(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))
@@ -506,14 +506,18 @@ RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(HOST_RPATH_VAR$(1)_T_$(2)_H_$(3))
506506
# if you're building a cross config, the host->* parts are
507507
# effectively stage1, since it uses the just-built stage0.
508508
#
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.
509+
# This logic is similar to how the LD_LIBRARY_PATH variable must
510+
# change be slightly different when doing cross compilations.
511+
# The build doesn't copy over all target libraries into
512+
# a new directory, so we need to point the library path at
513+
# the build directory where all the target libraries came
514+
# from (the stage0 build host). Otherwise the relative rpaths
515+
# inside of the rustc binary won't get resolved correctly.
512516
ifeq ($(1),0)
513517
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
514518
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
515519

516-
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR1_T_$(2)_H_$$(CFG_BUILD))
520+
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR$(1)_T_$(2)_H_$(3))
517521
endif
518522
endif
519523

branches/beta/mk/rt.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ else ifeq ($(findstring android, $(OSTYPE_$(1))), android)
157157
# If the test suite passes, however, without symbol prefixes then we should be
158158
# good to go!
159159
JEMALLOC_ARGS_$(1) := --disable-tls --with-jemalloc-prefix=je_
160+
else ifeq ($(findstring dragonfly, $(OSTYPE_$(1))), dragonfly)
161+
JEMALLOC_ARGS_$(1) := --with-jemalloc-prefix=je_
160162
endif
161163

162164
ifdef CFG_ENABLE_DEBUG_JEMALLOC
@@ -236,11 +238,11 @@ COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
236238
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
237239

238240
ifeq ($$(findstring msvc,$(1)),msvc)
239-
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD))
241+
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
240242
@$$(call E, cmake: compiler-rt)
241243
$$(Q)cd "$$(COMPRT_BUILD_DIR_$(1))"; $$(CFG_CMAKE) "$(S)src/compiler-rt" \
242244
-DCMAKE_BUILD_TYPE=$$(LLVM_BUILD_CONFIG_MODE) \
243-
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$$(CFG_BUILD)) \
245+
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$(1)) \
244246
-G"$$(CFG_CMAKE_GENERATOR)"
245247
$$(Q)$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
246248
--target lib/builtins/builtins \

branches/beta/mk/target.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ $$(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) \
9392
$$<
9493
@touch -r $$@.start_time $$@ && rm $$@.start_time
9594
$$(call LIST_ALL_OLD_GLOB_MATCHES, \

branches/beta/mk/tests.mk

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,15 +305,11 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
305305
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
306306
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
307307
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
308+
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
309+
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec \
308310
check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
309311
check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
310312

311-
ifndef CFG_DISABLE_CODEGEN_TESTS
312-
check-stage$(1)-T-$(2)-H-$(3)-exec: \
313-
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
314-
check-stage$(1)-T-$(2)-H-$(3)-codegen-units-exec
315-
endif
316-
317313
# Only test the compiler-dependent crates when the target is
318314
# able to build a compiler (when the target triple is in the set of host triples)
319315
ifneq ($$(findstring $(2),$$(CFG_HOST)),)
@@ -387,7 +383,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
387383
@$$(call E, rustc: $$@)
388384
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
389385
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
390-
-Cmetadata="test-crate" -L "$$(RT_OUTPUT_DIR_$(2))" \
386+
-L "$$(RT_OUTPUT_DIR_$(2))" \
391387
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
392388
$$(RUSTFLAGS_$(4))
393389

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,3 @@ 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/beta/src/bootstrap/build/compile.rs

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -123,38 +123,6 @@ 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-
158126
/// Build the compiler.
159127
///
160128
/// This will build the compiler for a particular stage of the build using
@@ -165,7 +133,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
165133
compiler.stage, compiler.host, target);
166134

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

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

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-
243205
fn compiler_file(compiler: &Path, file: &str) -> String {
244206
output(Command::new(compiler)
245207
.arg(format!("-print-file-name={}", file))).trim().to_string()

0 commit comments

Comments
 (0)