Skip to content

Commit 700891f

Browse files
committed
---
yaml --- r: 192459 b: refs/heads/auto c: 7d07f70 h: refs/heads/master i: 192457: e78be69 192455: d0eec37 v: v3
1 parent 48dd326 commit 700891f

File tree

2,471 files changed

+28083
-17198
lines changed

Some content is hidden

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

2,471 files changed

+28083
-17198
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 9c906da7ade767925aca1da06f139152835b661b
13+
refs/heads/auto: 7d07f70ccbc5050fcd862b46551775726d1e9561
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/Makefile.in

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@
9797
# make check-stage1-rpass TESTNAME=my-shiny-new-test
9898
#
9999
# // Having trouble figuring out which test is failing? Turn off parallel tests
100-
# make check-stage1-std RUST_TEST_TASKS=1
101-
#
102-
# This is hardly all there is to know of The Rust Build System's
103-
# mysteries. The tale continues on the wiki[1].
104-
#
105-
# [1]: https://github.com/rust-lang/rust/wiki/Note-testsuite
100+
# make check-stage1-std RUST_TEST_THREADS=1
106101
#
107102
# If you really feel like getting your hands dirty, then:
108103
#

branches/auto/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Read ["Installing Rust"] from [The Book].
6464
# Choose one based on platform:
6565
$ pacman -S mingw-w64-i686-toolchain
6666
$ pacman -S mingw-w64-x86_64-toolchain
67-
67+
6868
$ pacman -S base-devel
6969
```
7070

branches/auto/configure

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,10 @@ case $CFG_CPUTYPE in
461461
CFG_CPUTYPE=aarch64
462462
;;
463463

464-
powerpc)
464+
# At some point, when ppc64[le] support happens, this will need to do
465+
# something clever. For now it's safe to assume that we're only ever
466+
# interested in building 32 bit.
467+
powerpc | ppc | ppc64)
465468
CFG_CPUTYPE=powerpc
466469
;;
467470

@@ -476,10 +479,19 @@ esac
476479
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
477480
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
478481
then
479-
file -L "$SHELL" | grep -q "x86[_-]64"
480-
if [ $? != 0 ]; then
481-
CFG_CPUTYPE=i686
482+
# $SHELL does not exist in standard 'sh', so probably only exists
483+
# if configure is running in an interactive bash shell. /usr/bin/env
484+
# exists *everywhere*.
485+
BIN_TO_PROBE="$SHELL"
486+
if [ -z "$BIN_TO_PROBE" -a -e "/usr/bin/env" ]; then
487+
BIN_TO_PROBE="/usr/bin/env"
482488
fi
489+
if [ -n "$BIN_TO_PROBE" ]; then
490+
file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64"
491+
if [ $? != 0 ]; then
492+
CFG_CPUTYPE=i686
493+
fi
494+
fi
483495
fi
484496

485497

@@ -823,11 +835,11 @@ then
823835
LLVM_VERSION=$($LLVM_CONFIG --version)
824836

825837
case $LLVM_VERSION in
826-
(3.[2-6]*)
838+
(3.[5-6]*)
827839
msg "found ok version of LLVM: $LLVM_VERSION"
828840
;;
829841
(*)
830-
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
842+
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
831843
;;
832844
esac
833845
fi

branches/auto/man/rustc.1

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,28 @@ full debug info with variable and type information.
242242
\fBopt\-level\fR=\fIVAL\fR
243243
Optimize with possible levels 0\[en]3
244244

245+
.SH ENVIRONMENT
246+
247+
Some of these affect the output of the compiler, while others affect programs
248+
which link to the standard library.
249+
250+
.TP
251+
\fBRUST_TEST_THREADS\fR
252+
The test framework Rust provides executes tests in parallel. This variable sets
253+
the maximum number of threads used for this purpose.
254+
255+
.TP
256+
\fBRUST_TEST_NOCAPTURE\fR
257+
A synonym for the --nocapture flag.
258+
259+
.TP
260+
\fBRUST_MIN_STACK\fR
261+
Sets the minimum stack size for new threads.
262+
263+
.TP
264+
\fBRUST_BACKTRACE\fR
265+
If set, produces a backtrace in the output of a program which panics.
266+
245267
.SH "EXAMPLES"
246268
To build an executable from a source file with a main function:
247269
$ rustc \-o hello hello.rs

branches/auto/mk/cfg/x86_64-unknown-linux-gnu.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ CFG_LDPATH_x86_64-unknown-linux-gnu :=
2525
CFG_RUN_x86_64-unknown-linux-gnu=$(2)
2626
CFG_RUN_TARG_x86_64-unknown-linux-gnu=$(call CFG_RUN_x86_64-unknown-linux-gnu,,$(2))
2727
CFG_GNU_TRIPLE_x86_64-unknown-linux-gnu := x86_64-unknown-linux-gnu
28-

branches/auto/mk/dist.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ PKG_FILES := \
5353
driver \
5454
etc \
5555
$(foreach crate,$(CRATES),lib$(crate)) \
56+
libcollectionstest \
5657
libcoretest \
5758
libbacktrace \
5859
rt \

branches/auto/mk/main.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
290290
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
291291
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
292292
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
293+
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
293294
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
294295
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
295296
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

branches/auto/mk/prepare.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,5 +221,3 @@ prepare-maybe-clean-$(1):
221221

222222

223223
endef
224-
225-

branches/auto/mk/target.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
7272
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7373
$$(CRATEFILE_$(4)) \
7474
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
75+
$$(LLVM_CONFIG_$(2)) \
7576
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7677
| $$(TLIB$(1)_T_$(2)_H_$(3))/
7778
@$$(call E, rustc: $$(@D)/lib$(4))
@@ -84,7 +85,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8485
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
8586
$$(RUST_LIB_FLAGS_ST$(1)) \
8687
-L "$$(RT_OUTPUT_DIR_$(2))" \
87-
-L "$$(LLVM_LIBDIR_$(2))" \
88+
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
8889
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
8990
$$(RUSTFLAGS_$(4)) \
9091
--out-dir $$(@D) \

branches/auto/mk/tests.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

22-
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
22+
DEPS_collectionstest :=
23+
$(eval $(call RUST_CRATE,collectionstest))
24+
25+
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) collectionstest coretest
2326
TEST_DOC_CRATES = $(DOC_CRATES)
2427
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans rustc_lint,\
2528
$(HOST_CRATES))
@@ -372,7 +375,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
372375
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
373376
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
374377
-L "$$(RT_OUTPUT_DIR_$(2))" \
375-
-L "$$(LLVM_LIBDIR_$(2))" \
378+
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
376379
$$(RUSTFLAGS_$(4))
377380

378381
endef

branches/auto/mk/util.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ else
1717
endif
1818

1919
S := $(CFG_SRC_DIR)
20-

branches/auto/src/compiletest/compiletest.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#![feature(unboxed_closures)]
2020
#![feature(std_misc)]
2121
#![feature(test)]
22-
#![feature(core)]
23-
#![feature(net)]
2422
#![feature(path_ext)]
23+
#![feature(convert)]
24+
#![feature(str_char)]
2525

2626
#![deny(warnings)]
2727

@@ -117,7 +117,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
117117

118118
fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf {
119119
match m.opt_str(nm) {
120-
Some(s) => PathBuf::new(&s),
120+
Some(s) => PathBuf::from(&s),
121121
None => panic!("no option (=path) found for {}", nm),
122122
}
123123
}
@@ -132,18 +132,18 @@ pub fn parse_config(args: Vec<String> ) -> Config {
132132
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
133133
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
134134
rustc_path: opt_path(matches, "rustc-path"),
135-
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)),
135+
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&s)),
136136
valgrind_path: matches.opt_str("valgrind-path"),
137137
force_valgrind: matches.opt_present("force-valgrind"),
138-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)),
138+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&s)),
139139
src_base: opt_path(matches, "src-base"),
140140
build_base: opt_path(matches, "build-base"),
141141
aux_base: opt_path(matches, "aux-base"),
142142
stage_id: matches.opt_str("stage-id").unwrap(),
143143
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
144144
run_ignored: matches.opt_present("ignored"),
145145
filter: filter,
146-
logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)),
146+
logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)),
147147
runtool: matches.opt_str("runtool"),
148148
host_rustcflags: matches.opt_str("host-rustcflags"),
149149
target_rustcflags: matches.opt_str("target-rustcflags"),
@@ -226,15 +226,15 @@ pub fn run_tests(config: &Config) {
226226
// android debug-info test uses remote debugger
227227
// so, we test 1 task at once.
228228
// also trying to isolate problems with adb_run_wrapper.sh ilooping
229-
env::set_var("RUST_TEST_TASKS","1");
229+
env::set_var("RUST_TEST_THREADS","1");
230230
}
231231

232232
match config.mode {
233233
DebugInfoLldb => {
234234
// Some older versions of LLDB seem to have problems with multiple
235235
// instances running in parallel, so only run one test task at a
236236
// time.
237-
env::set_var("RUST_TEST_TASKS", "1");
237+
env::set_var("RUST_TEST_THREADS", "1");
238238
}
239239
_ => { /* proceed */ }
240240
}

branches/auto/src/compiletest/header.rs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub struct TestProps {
4040
pub check_stdout: bool,
4141
// Don't force a --crate-type=dylib flag on the command line
4242
pub no_prefer_dynamic: bool,
43-
// Don't run --pretty expanded when running pretty printing tests
44-
pub no_pretty_expanded: bool,
43+
// Run --pretty expanded when running pretty printing tests
44+
pub pretty_expanded: bool,
4545
// Which pretty mode are we testing with, default to 'normal'
4646
pub pretty_mode: String,
4747
// Only compare pretty output and don't try compiling
@@ -62,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
6262
let mut force_host = false;
6363
let mut check_stdout = false;
6464
let mut no_prefer_dynamic = false;
65-
let mut no_pretty_expanded = false;
65+
let mut pretty_expanded = false;
6666
let mut pretty_mode = None;
6767
let mut pretty_compare_only = false;
6868
let mut forbid_output = Vec::new();
@@ -96,8 +96,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
9696
no_prefer_dynamic = parse_no_prefer_dynamic(ln);
9797
}
9898

99-
if !no_pretty_expanded {
100-
no_pretty_expanded = parse_no_pretty_expanded(ln);
99+
if !pretty_expanded {
100+
pretty_expanded = parse_pretty_expanded(ln);
101101
}
102102

103103
if pretty_mode.is_none() {
@@ -131,7 +131,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
131131
true
132132
});
133133

134-
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_TASKS"] {
134+
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_THREADS"] {
135135
match env::var(key) {
136136
Ok(val) =>
137137
if exec_env.iter().find(|&&(ref x, _)| *x == key.to_string()).is_none() {
@@ -152,7 +152,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
152152
force_host: force_host,
153153
check_stdout: check_stdout,
154154
no_prefer_dynamic: no_prefer_dynamic,
155-
no_pretty_expanded: no_pretty_expanded,
155+
pretty_expanded: pretty_expanded,
156156
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
157157
pretty_compare_only: pretty_compare_only,
158158
forbid_output: forbid_output,
@@ -163,6 +163,9 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
163163
fn ignore_target(config: &Config) -> String {
164164
format!("ignore-{}", util::get_os(&config.target))
165165
}
166+
fn ignore_architecture(config: &Config) -> String {
167+
format!("ignore-{}", util::get_arch(&config.target))
168+
}
166169
fn ignore_stage(config: &Config) -> String {
167170
format!("ignore-{}",
168171
config.stage_id.split('-').next().unwrap())
@@ -226,6 +229,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
226229
let val = iter_header(testfile, &mut |ln| {
227230
!parse_name_directive(ln, "ignore-test") &&
228231
!parse_name_directive(ln, &ignore_target(config)) &&
232+
!parse_name_directive(ln, &ignore_architecture(config)) &&
229233
!parse_name_directive(ln, &ignore_stage(config)) &&
230234
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
231235
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
@@ -291,8 +295,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
291295
parse_name_directive(line, "no-prefer-dynamic")
292296
}
293297

294-
fn parse_no_pretty_expanded(line: &str) -> bool {
295-
parse_name_directive(line, "no-pretty-expanded")
298+
fn parse_pretty_expanded(line: &str) -> bool {
299+
parse_name_directive(line, "pretty-expanded")
296300
}
297301

298302
fn parse_pretty_mode(line: &str) -> Option<String> {
@@ -324,10 +328,10 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
324328

325329
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
326330
match parse_name_value_directive(line, "pp-exact") {
327-
Some(s) => Some(PathBuf::new(&s)),
331+
Some(s) => Some(PathBuf::from(&s)),
328332
None => {
329333
if parse_name_directive(line, "pp-exact") {
330-
testfile.file_name().map(|s| PathBuf::new(s))
334+
testfile.file_name().map(|s| PathBuf::from(s))
331335
} else {
332336
None
333337
}
@@ -336,7 +340,8 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
336340
}
337341

338342
fn parse_name_directive(line: &str, directive: &str) -> bool {
339-
line.contains(directive)
343+
// This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist
344+
line.contains(directive) && !line.contains(&("no-".to_string() + directive))
340345
}
341346

342347
pub fn parse_name_value_directive(line: &str, directive: &str)

branches/auto/src/compiletest/procsrv.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010

1111
#![allow(deprecated)] // for old path, for dynamic_lib
1212

13-
use std::process::{ExitStatus, Command, Child, Output, Stdio};
14-
use std::io::prelude::*;
1513
use std::dynamic_lib::DynamicLibrary;
14+
use std::io::prelude::*;
15+
use std::old_path::Path;
16+
use std::process::{ExitStatus, Command, Child, Output, Stdio};
1617

1718
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1819
// Need to be sure to put both the lib_path and the aux path in the dylib

0 commit comments

Comments
 (0)