Skip to content

Commit 372ef14

Browse files
committed
---
yaml --- r: 179582 b: refs/heads/master c: 4ef7551 h: refs/heads/master v: v3
1 parent 96bc6cd commit 372ef14

File tree

881 files changed

+6079
-10240
lines changed

Some content is hidden

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

881 files changed

+6079
-10240
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 88d8ba5ab3b1d22288b021708c3d87464e43b880
2+
refs/heads/master: 4ef7551ccacd4d2042493f2ed905813b297634d0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 0ba9e1fa52627404a1e5b90f745f96a872a0c564
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/Makefile.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@
5959
# * check-stage$(stage)-$(crate) - Test a crate in a specific stage
6060
# * check-stage$(stage)-{rpass,rfail,cfail,rmake,...} - Run tests in src/test/
6161
# * check-stage1-T-$(target)-H-$(host) - Run cross-compiled-tests
62-
# * tidy-basic - show file / line stats
63-
# * tidy-errors - show the highest rustc error code
64-
# * tidy-features - show the status of language and lib features
6562
#
6663
# Then mix in some of these environment variables to harness the
6764
# ultimate power of The Rust Build System.

trunk/configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,9 @@ probe CFG_GRUN grun
653653
probe CFG_FLEX flex
654654
probe CFG_BISON bison
655655
probe CFG_PANDOC pandoc
656+
probe CFG_PDFLATEX pdflatex
656657
probe CFG_XELATEX xelatex
658+
probe CFG_LUALATEX lualatex
657659
probe CFG_GDB gdb
658660
probe CFG_LLDB lldb
659661

trunk/man/rustc.1

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ Display the help message
1818
\fB\-\-cfg\fR SPEC
1919
Configure the compilation environment
2020
.TP
21-
\fB\-L\fR [KIND=]PATH
22-
Add a directory to the library search path. The optional KIND can be one of:
23-
dependency = only lookup transitive dependencies here
24-
crate = only lookup local `extern crate` directives here
25-
native = only lookup native libraries here
26-
framework = only look for OSX frameworks here
27-
all = look for anything here (the default)
28-
.TP
29-
\fB\-l\fR [KIND=]NAME
21+
\fB\-L\fR PATH
22+
Add a directory to the library search path
23+
.TP
24+
\fB\-l\fR NAME[:KIND]
3025
Link the generated crate(s) to the specified native library NAME. The optional
3126
KIND can be one of, static, dylib, or framework. If omitted, dylib is assumed.
3227
.TP

trunk/mk/docs.mk

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,27 @@ else
8585
HTML_DEPS :=
8686
endif
8787

88-
# Check for xelatex
89-
90-
ifeq ($(CFG_XELATEX),)
88+
# Check for the various external utilities for the EPUB/PDF docs:
89+
90+
ifeq ($(CFG_LUALATEX),)
91+
$(info cfg: no lualatex found, deferring to xelatex)
92+
ifeq ($(CFG_XELATEX),)
93+
$(info cfg: no xelatex found, deferring to pdflatex)
94+
ifeq ($(CFG_PDFLATEX),)
95+
$(info cfg: no pdflatex found, disabling LaTeX docs)
96+
NO_PDF_DOCS = 1
97+
else
98+
CFG_LATEX := $(CFG_PDFLATEX)
99+
endif
100+
else
91101
CFG_LATEX := $(CFG_XELATEX)
92102
XELATEX = 1
93-
else
94-
$(info cfg: no xelatex found, disabling LaTeX docs)
95-
NO_PDF_DOCS = 1
103+
endif
104+
else
105+
CFG_LATEX := $(CFG_LUALATEX)
96106
endif
97107

108+
98109
ifeq ($(CFG_PANDOC),)
99110
$(info cfg: no pandoc found, omitting PDF and EPUB docs)
100111
ONLY_HTML_DOCS = 1

trunk/mk/main.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ endif
7272
# numbers and dots here
7373
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
7474

75-
CFG_INFO := $(info cfg: version $(CFG_VERSION))
7675

7776
######################################################################
7877
# More configuration
@@ -180,7 +179,6 @@ endif
180179

181180
ifndef CFG_DISABLE_VALGRIND_RPASS
182181
$(info cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS))
183-
$(info cfg: valgrind-rpass command set to $(CFG_VALGRIND))
184182
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND)
185183
else
186184
CFG_VALGRIND_RPASS :=

trunk/mk/tests.mk

Lines changed: 52 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ $(foreach file,$(wildcard $(S)src/doc/trpl/*.md), \
162162
######################################################################
163163

164164
# The main testing target. Tests lots of stuff.
165-
check: cleantmptestlogs cleantestlibs all check-stage2 tidy
166-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
165+
check: cleantmptestlogs cleantestlibs check-notidy tidy
167166

168167
# As above but don't bother running tidy.
169168
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
@@ -236,24 +235,57 @@ cleantestlibs:
236235
######################################################################
237236

238237
ifdef CFG_NOTIDY
239-
.PHONY: tidy
240238
tidy:
241239
else
242240

243-
# Run the tidy script in multiple parts to avoid huge 'echo' commands
244-
.PHONY: tidy
245-
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
246-
247-
endif
241+
ALL_CS := $(wildcard $(S)src/rt/*.cpp \
242+
$(S)src/rt/*/*.cpp \
243+
$(S)src/rt/*/*/*.cpp \
244+
$(S)src/rustllvm/*.cpp)
245+
ALL_CS := $(filter-out $(S)src/rt/miniz.cpp \
246+
$(wildcard $(S)src/rt/hoedown/src/*.c) \
247+
$(wildcard $(S)src/rt/hoedown/bin/*.c) \
248+
,$(ALL_CS))
249+
ALL_HS := $(wildcard $(S)src/rt/*.h \
250+
$(S)src/rt/*/*.h \
251+
$(S)src/rt/*/*/*.h \
252+
$(S)src/rustllvm/*.h)
253+
ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
254+
$(S)src/rt/valgrind/memcheck.h \
255+
$(S)src/rt/msvc/typeof.h \
256+
$(S)src/rt/msvc/stdint.h \
257+
$(S)src/rt/msvc/inttypes.h \
258+
$(wildcard $(S)src/rt/hoedown/src/*.h) \
259+
$(wildcard $(S)src/rt/hoedown/bin/*.h) \
260+
,$(ALL_HS))
248261

249-
.PHONY: tidy-basic
250-
tidy-basic:
262+
# Run the tidy script in multiple parts to avoid huge 'echo' commands
263+
tidy:
251264
@$(call E, check: formatting)
252-
$(Q) $(CFG_PYTHON) $(S)src/etc/tidy.py $(S)src/
253-
254-
.PHONY: tidy-binaries
255-
tidy-binaries:
256-
@$(call E, check: binaries)
265+
$(Q)find $(S)src -name '*.r[sc]' \
266+
-and -not -regex '^$(S)src/jemalloc.*' \
267+
-and -not -regex '^$(S)src/libuv.*' \
268+
-and -not -regex '^$(S)src/llvm.*' \
269+
-and -not -regex '^$(S)src/gyp.*' \
270+
-and -not -regex '^$(S)src/libbacktrace.*' \
271+
-print0 \
272+
| xargs -0 -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
273+
$(Q)find $(S)src/etc -name '*.py' \
274+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
275+
$(Q)find $(S)src/doc -name '*.js' \
276+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
277+
$(Q)find $(S)src/etc -name '*.sh' \
278+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
279+
$(Q)find $(S)src/etc -name '*.pl' \
280+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
281+
$(Q)find $(S)src/etc -name '*.c' \
282+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
283+
$(Q)find $(S)src/etc -name '*.h' \
284+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
285+
$(Q)echo $(ALL_CS) \
286+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
287+
$(Q)echo $(ALL_HS) \
288+
| xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
257289
$(Q)find $(S)src -type f -perm +a+x \
258290
-not -name '*.rs' -and -not -name '*.py' \
259291
-and -not -name '*.sh' \
@@ -268,18 +300,13 @@ tidy-binaries:
268300
| grep '^$(S)src/libbacktrace' -v \
269301
| grep '^$(S)src/rust-installer' -v \
270302
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
271-
272-
.PHONY: tidy-errors
273-
tidy-errors:
274-
@$(call E, check: extended errors)
275303
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
276-
277-
.PHONY: tidy-features
278-
tidy-features:
279-
@$(call E, check: feature sanity)
280304
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
281305

282306

307+
endif
308+
309+
283310
######################################################################
284311
# Sets of tests
285312
######################################################################
@@ -452,7 +479,6 @@ RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
452479
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
453480
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
454481
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
455-
PFAIL_RS := $(wildcard $(S)src/test/parse-fail/*.rs)
456482
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
457483
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
458484
DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
@@ -469,7 +495,7 @@ RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
469495
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
470496
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
471497
RFAIL_TESTS := $(RFAIL_RS)
472-
CFAIL_TESTS := $(CFAIL_RS) $(PFAIL_RS)
498+
CFAIL_TESTS := $(CFAIL_RS)
473499
BENCH_TESTS := $(BENCH_RS)
474500
PERF_TESTS := $(PERF_RS)
475501
PRETTY_TESTS := $(PRETTY_RS)
@@ -613,6 +639,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
613639

614640
ifdef CFG_VALGRIND_RPASS
615641
ifdef GOOD_VALGRIND_$(2)
642+
$(info cfg: valgrind-path set to $(CFG_VALGRIND_RPASS))
616643
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)"
617644
endif
618645
endif

trunk/src/compiletest/compiletest.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,31 +97,28 @@ pub fn parse_config(args: Vec<String> ) -> Config {
9797
assert!(!args.is_empty());
9898
let argv0 = args[0].clone();
9999
let args_ = args.tail();
100-
if args[1] == "-h" || args[1] == "--help" {
100+
if args[1].as_slice() == "-h" || args[1].as_slice() == "--help" {
101101
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
102-
println!("{}", getopts::usage(&message, &groups));
102+
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
103103
println!("");
104104
panic!()
105105
}
106106

107107
let matches =
108-
&match getopts::getopts(args_, &groups) {
108+
&match getopts::getopts(args_.as_slice(), groups.as_slice()) {
109109
Ok(m) => m,
110110
Err(f) => panic!("{:?}", f)
111111
};
112112

113113
if matches.opt_present("h") || matches.opt_present("help") {
114114
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
115-
println!("{}", getopts::usage(&message, &groups));
115+
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
116116
println!("");
117117
panic!()
118118
}
119119

120120
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
121-
match m.opt_str(nm) {
122-
Some(s) => Path::new(s),
123-
None => panic!("no option (=path) found for {}", nm),
124-
}
121+
Path::new(m.opt_str(nm).unwrap())
125122
}
126123

127124
let filter = if !matches.free.is_empty() {
@@ -159,9 +156,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
159156
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
160157
adb_device_status:
161158
"arm-linux-androideabi" ==
162-
opt_str2(matches.opt_str("target")) &&
159+
opt_str2(matches.opt_str("target")).as_slice() &&
163160
"(none)" !=
164-
opt_str2(matches.opt_str("adb-test-dir")) &&
161+
opt_str2(matches.opt_str("adb-test-dir")).as_slice() &&
165162
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
166163
lldb_python_dir: matches.opt_str("lldb-python-dir"),
167164
verbose: matches.opt_present("verbose"),
@@ -204,7 +201,7 @@ pub fn log_config(config: &Config) {
204201
pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
205202
match *maybestr {
206203
None => "(none)",
207-
Some(ref s) => s,
204+
Some(ref s) => s.as_slice(),
208205
}
209206
}
210207

@@ -216,7 +213,7 @@ pub fn opt_str2(maybestr: Option<String>) -> String {
216213
}
217214

218215
pub fn run_tests(config: &Config) {
219-
if config.target == "arm-linux-androideabi" {
216+
if config.target.as_slice() == "arm-linux-androideabi" {
220217
match config.mode {
221218
DebugInfoGdb => {
222219
println!("arm-linux-androideabi debug-info \
@@ -309,13 +306,13 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
309306
let mut valid = false;
310307

311308
for ext in &valid_extensions {
312-
if name.ends_with(ext) {
309+
if name.ends_with(ext.as_slice()) {
313310
valid = true;
314311
}
315312
}
316313

317314
for pre in &invalid_prefixes {
318-
if name.starts_with(pre) {
315+
if name.starts_with(pre.as_slice()) {
319316
valid = false;
320317
}
321318
}
@@ -362,7 +359,7 @@ pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::Test
362359
let config = (*config).clone();
363360
// FIXME (#9639): This needs to handle non-utf8 paths
364361
let testfile = testfile.as_str().unwrap().to_string();
365-
test::DynMetricFn(box move |mm: &mut test::MetricMap| {
362+
test::DynMetricFn(box move |: mm: &mut test::MetricMap| {
366363
runtest::run_metrics(config, testfile, mm)
367364
})
368365
}

trunk/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
4444
rdr.lines().enumerate().filter_map(|(line_no, ln)| {
4545
parse_expected(last_nonfollow_error,
4646
line_no + 1,
47-
&ln.unwrap())
47+
ln.unwrap().as_slice())
4848
.map(|(which, error)| {
4949
match which {
5050
FollowPrevious(_) => {}

0 commit comments

Comments
 (0)