Skip to content

Commit 5097256

Browse files
committed
---
yaml --- r: 120385 b: refs/heads/dist-snap c: 84406d4 h: refs/heads/master i: 120383: c3a8228 v: v3
1 parent 30e57e4 commit 5097256

File tree

412 files changed

+9998
-4966
lines changed

Some content is hidden

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

412 files changed

+9998
-4966
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: ba7844a7fff0061e5b4528c2ecd5adf765145b70
9+
refs/heads/dist-snap: 84406d438c6c49aa63875096e5f3cca1a3879f17
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#
6969
# * `TESTNAME=...` - Specify the name of tests to run
7070
# * `CHECK_IGNORED=1` - Run normally-ignored tests
71-
# * `NO_BENCH=1` - Don't run crate benchmarks (disable `--bench` flag)
71+
# * `PLEASE_BENCH=1` - Run crate benchmarks (enable `--bench` flag)
7272
#
7373
# * `CFG_ENABLE_VALGRIND=1` - Run tests under valgrind
7474
# * `VALGRIND_COMPILE=1` - Run the compiler itself under valgrind

branches/dist-snap/man/rustc.1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ A space-separated list of arguments to pass through to LLVM.
138138
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
139139
throughout compilation in the output directory.
140140
.TP
141-
\fBandroid-cross-path\fR=path/to/ndk/bin
142-
Directory to find the Android NDK cross-compilation tools
143-
.TP
144141
\fBno-rpath\fR
145142
If specified, then the rpath value for dynamic libraries will not be set in
146143
either dynamic library or executable outputs.

branches/dist-snap/mk/crates.mk

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,21 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz core
54+
workcache url log regex graphviz core rlibc
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

5959
DEPS_core :=
60+
DEPS_rlibc :=
6061
DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace native:jemalloc
62+
DEPS_graphviz := std
6163
DEPS_green := std rand native:context_switch
6264
DEPS_rustuv := std native:uv native:uv_support
6365
DEPS_native := std
6466
DEPS_syntax := std term serialize collections log fmt_macros
6567
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
66-
collections time log
68+
collections time log graphviz
6769
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
6870
test time
6971
DEPS_flate := std native:miniz
@@ -80,7 +82,7 @@ DEPS_collections := std rand
8082
DEPS_fourcc := syntax std
8183
DEPS_hexfloat := syntax std
8284
DEPS_num := std rand
83-
DEPS_test := std collections getopts serialize term time
85+
DEPS_test := std collections getopts serialize term time regex
8486
DEPS_time := std serialize
8587
DEPS_rand := std
8688
DEPS_url := std collections
@@ -98,6 +100,7 @@ TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
98100
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
99101

100102
ONLY_RLIB_core := 1
103+
ONLY_RLIB_rlibc := 1
101104

102105
################################################################################
103106
# You should not need to edit below this line

branches/dist-snap/mk/docs.mk

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DOCS := index intro tutorial guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport complement-cheatsheet \
3232
complement-lang-faq complement-project-faq rust rustdoc \
33-
guide-unsafe not_found
33+
guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

@@ -42,10 +42,11 @@ L10N_LANGS := ja
4242
# Generally no need to edit below here.
4343

4444
# The options are passed to the documentation generators.
45-
RUSTDOC_HTML_OPTS = --markdown-css rust.css \
46-
--markdown-before-content=doc/version_info.html \
45+
RUSTDOC_HTML_OPTS_NO_CSS = --markdown-before-content=doc/version_info.html \
4746
--markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc
4847

48+
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
49+
4950
PANDOC_BASE_OPTS := --standalone --toc --number-sections
5051
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.tex \
5152
--from=markdown --include-before-body=doc/footer.tex --to=latex
@@ -152,6 +153,11 @@ doc/footer.tex: $(D)/footer.inc | doc/
152153
@$(call E, pandoc: $@)
153154
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
154155

156+
# HTML (rustdoc)
157+
DOC_TARGETS += doc/not_found.html
158+
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
159+
$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css http://static.rust-lang.org/doc/master/rust.css $<
160+
155161
define DEF_DOC
156162

157163
# HTML (rustdoc)

branches/dist-snap/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ CFG_LDPATH_arm-linux-androideabi :=
307307
CFG_RUN_arm-linux-androideabi=
308308
CFG_RUN_TARG_arm-linux-androideabi=
309309
RUSTC_FLAGS_arm-linux-androideabi :=
310-
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=-C android-cross-path=$(CFG_ANDROID_CROSS_PATH)
310+
RUSTC_CROSS_FLAGS_arm-linux-androideabi :=
311311

312312
# arm-unknown-linux-gnueabihf configuration
313313
CROSS_PREFIX_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-

branches/dist-snap/mk/tests.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ ifdef CHECK_IGNORED
3232
TESTARGS += --ignored
3333
endif
3434

35-
TEST_BENCH = --bench
35+
TEST_BENCH =
3636

3737
# Arguments to the cfail/rfail/rpass/bench tests
3838
ifdef CFG_VALGRIND
3939
CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
4040
TEST_BENCH =
4141
endif
4242

43-
ifdef NO_BENCH
44-
TEST_BENCH =
43+
ifdef PLEASE_BENCH
44+
TEST_BENCH = --bench
4545
endif
4646

4747
# Arguments to the perf tests
@@ -601,6 +601,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
601601
--stage-id stage$(1)-$(2) \
602602
--target $(2) \
603603
--host $(3) \
604+
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
604605
--adb-path=$(CFG_ADB) \
605606
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
606607
--host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \

branches/dist-snap/src/compiletest/common.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use std::from_str::FromStr;
1212
use std::fmt;
13+
use regex::Regex;
1314

1415
#[deriving(Clone, Eq)]
1516
pub enum Mode {
@@ -88,7 +89,7 @@ pub struct Config {
8889
pub run_ignored: bool,
8990

9091
// Only run tests that match this filter
91-
pub filter: Option<~str>,
92+
pub filter: Option<Regex>,
9293

9394
// Write out a parseable log of tests that were run
9495
pub logfile: Option<Path>,
@@ -126,6 +127,9 @@ pub struct Config {
126127
// Host triple for the compiler being invoked
127128
pub host: ~str,
128129

130+
// Path to the android tools
131+
pub android_cross_path: Path,
132+
129133
// Extra parameter to run adb on arm-linux-androideabi
130134
pub adb_path: ~str,
131135

branches/dist-snap/src/compiletest/compiletest.rs

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ extern crate log;
2323
extern crate green;
2424
extern crate rustuv;
2525

26+
extern crate regex;
27+
2628
use std::os;
2729
use std::io;
2830
use std::io::fs;
@@ -79,6 +81,7 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
7981
optflag("", "jit", "run tests under the JIT"),
8082
optopt("", "target", "the target to build for", "TARGET"),
8183
optopt("", "host", "the host to build for", "HOST"),
84+
optopt("", "android-cross-path", "Android NDK standalone path", "PATH"),
8285
optopt("", "adb-path", "path to the android debugger", "PATH"),
8386
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
8487
optopt("", "lldb-python-dir", "directory containing LLDB's python module", "PATH"),
@@ -112,6 +115,19 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
112115
Path::new(m.opt_str(nm).unwrap())
113116
}
114117

118+
let filter = if !matches.free.is_empty() {
119+
let s = matches.free.get(0).as_slice();
120+
match regex::Regex::new(s) {
121+
Ok(re) => Some(re),
122+
Err(e) => {
123+
println!("failed to parse filter /{}/: {}", s, e);
124+
fail!()
125+
}
126+
}
127+
} else {
128+
None
129+
};
130+
115131
Config {
116132
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
117133
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
@@ -124,12 +140,7 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
124140
stage_id: matches.opt_str("stage-id").unwrap(),
125141
mode: FromStr::from_str(matches.opt_str("mode").unwrap()).expect("invalid mode"),
126142
run_ignored: matches.opt_present("ignored"),
127-
filter:
128-
if !matches.free.is_empty() {
129-
Some((*matches.free.get(0)).clone())
130-
} else {
131-
None
132-
},
143+
filter: filter,
133144
logfile: matches.opt_str("logfile").map(|s| Path::new(s)),
134145
save_metrics: matches.opt_str("save-metrics").map(|s| Path::new(s)),
135146
ratchet_metrics:
@@ -142,6 +153,7 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
142153
jit: matches.opt_present("jit"),
143154
target: opt_str2(matches.opt_str("target")).to_str(),
144155
host: opt_str2(matches.opt_str("host")).to_str(),
156+
android_cross_path: opt_path(matches, "android-cross-path"),
145157
adb_path: opt_str2(matches.opt_str("adb-path")).to_str(),
146158
adb_test_dir:
147159
opt_str2(matches.opt_str("adb-test-dir")).to_str(),
@@ -150,7 +162,8 @@ pub fn parse_config(args: Vec<~str> ) -> Config {
150162
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&
151163
!opt_str2(matches.opt_str("adb-test-dir")).is_empty(),
152164
lldb_python_dir: matches.opt_str("lldb-python-dir"),
153-
test_shard: test::opt_shard(matches.opt_str("test-shard")),
165+
test_shard: test::opt_shard(matches.opt_str("test-shard")
166+
.map(|x| x.to_strbuf())),
154167
verbose: matches.opt_present("verbose")
155168
}
156169
}
@@ -166,13 +179,14 @@ pub fn log_config(config: &Config) {
166179
logv(c, format!("stage_id: {}", config.stage_id));
167180
logv(c, format!("mode: {}", config.mode));
168181
logv(c, format!("run_ignored: {}", config.run_ignored));
169-
logv(c, format!("filter: {}", opt_str(&config.filter)));
182+
logv(c, format!("filter: {}", opt_str(&config.filter.as_ref().map(|re| re.to_str()))));
170183
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
171184
logv(c, format!("host-rustcflags: {}", opt_str(&config.host_rustcflags)));
172185
logv(c, format!("target-rustcflags: {}", opt_str(&config.target_rustcflags)));
173186
logv(c, format!("jit: {}", config.jit));
174187
logv(c, format!("target: {}", config.target));
175188
logv(c, format!("host: {}", config.host));
189+
logv(c, format!("android-cross-path: {}", config.android_cross_path.display()));
176190
logv(c, format!("adb_path: {}", config.adb_path));
177191
logv(c, format!("adb_test_dir: {}", config.adb_test_dir));
178192
logv(c, format!("adb_device_status: {}", config.adb_device_status));
@@ -232,7 +246,10 @@ pub fn run_tests(config: &Config) {
232246

233247
pub fn test_opts(config: &Config) -> test::TestOpts {
234248
test::TestOpts {
235-
filter: config.filter.clone(),
249+
filter: match config.filter {
250+
None => None,
251+
Some(ref filter) => Some(filter.clone()),
252+
},
236253
run_ignored: config.run_ignored,
237254
logfile: config.logfile.clone(),
238255
run_tests: true,
@@ -311,7 +328,9 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
311328
format!("{}/{}", dir.unwrap_or(""), filename.unwrap_or(""))
312329
}
313330

314-
test::DynTestName(format!("[{}] {}", config.mode, shorten(testfile)))
331+
test::DynTestName(format_strbuf!("[{}] {}",
332+
config.mode,
333+
shorten(testfile)))
315334
}
316335

317336
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {

branches/dist-snap/src/compiletest/procsrv.rs

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

1111
use std::os;
1212
use std::str;
13-
use std::io::process::{ProcessExit, Process, ProcessConfig, ProcessOutput};
13+
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
1414

1515
#[cfg(target_os = "win32")]
1616
fn target_env(lib_path: &str, prog: &str) -> Vec<(~str, ~str)> {
@@ -68,14 +68,7 @@ pub fn run(lib_path: &str,
6868
input: Option<~str>) -> Option<Result> {
6969

7070
let env = env.clone().append(target_env(lib_path, prog).as_slice());
71-
let opt_process = Process::configure(ProcessConfig {
72-
program: prog,
73-
args: args,
74-
env: Some(env.as_slice()),
75-
.. ProcessConfig::new()
76-
});
77-
78-
match opt_process {
71+
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
7972
Ok(mut process) => {
8073
for input in input.iter() {
8174
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
@@ -100,14 +93,7 @@ pub fn run_background(lib_path: &str,
10093
input: Option<~str>) -> Option<Process> {
10194

10295
let env = env.clone().append(target_env(lib_path, prog).as_slice());
103-
let opt_process = Process::configure(ProcessConfig {
104-
program: prog,
105-
args: args,
106-
env: Some(env.as_slice()),
107-
.. ProcessConfig::new()
108-
});
109-
110-
match opt_process {
96+
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
11197
Ok(mut process) => {
11298
for input in input.iter() {
11399
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
347347
break;
348348
}
349349

350-
let args = split_maybe_args(&config.target_rustcflags);
351-
let mut tool_path = StrBuf::new();
352-
for arg in args.iter() {
353-
if arg.contains("android-cross-path=") {
354-
tool_path = StrBuf::from_str(arg.replace("android-cross-path=", ""));
355-
break;
356-
}
357-
}
358-
359-
if tool_path.is_empty() {
360-
fatal("cannot found android cross path".to_owned());
361-
}
350+
let tool_path = match config.android_cross_path.as_str() {
351+
Some(x) => x.to_strbuf(),
352+
None => fatal("cannot find android cross path".to_owned())
353+
};
362354

363355
let debugger_script = make_out_name(config, testfile, "debugger.script");
364356
// FIXME (#9639): This needs to handle non-utf8 paths
@@ -428,7 +420,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
428420
}
429421

430422
fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path) {
431-
use std::io::process::{Process, ProcessConfig, ProcessOutput};
423+
use std::io::process::{Command, ProcessOutput};
432424

433425
if config.lldb_python_dir.is_none() {
434426
fatal("Can't run LLDB test because LLDB's python path is not set.".to_owned());
@@ -491,25 +483,13 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
491483

492484
fn run_lldb(config: &Config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
493485
// Prepare the lldb_batchmode which executes the debugger script
494-
let lldb_batchmode_script = "./src/etc/lldb_batchmode.py".to_owned();
495-
let test_executable_str = test_executable.as_str().unwrap().to_owned();
496-
let debugger_script_str = debugger_script.as_str().unwrap().to_owned();
497-
let commandline = format!("python {} {} {}",
498-
lldb_batchmode_script.as_slice(),
499-
test_executable_str.as_slice(),
500-
debugger_script_str.as_slice());
501-
502-
let args = &[lldb_batchmode_script, test_executable_str, debugger_script_str];
503-
let env = &[("PYTHONPATH".to_owned(), config.lldb_python_dir.clone().unwrap())];
504-
505-
let opt_process = Process::configure(ProcessConfig {
506-
program: "python",
507-
args: args,
508-
env: Some(env),
509-
.. ProcessConfig::new()
510-
});
511-
512-
let (status, out, err) = match opt_process {
486+
let mut cmd = Command::new("python");
487+
cmd.arg("./src/etc/lldb_batchmode.py")
488+
.arg(test_executable)
489+
.arg(debugger_script)
490+
.env([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);
491+
492+
let (status, out, err) = match cmd.spawn() {
513493
Ok(process) => {
514494
let ProcessOutput { status, output, error } =
515495
process.wait_with_output().unwrap();
@@ -528,7 +508,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
528508
status: status,
529509
stdout: out,
530510
stderr: err,
531-
cmdline: commandline
511+
cmdline: format!("{}", cmd)
532512
};
533513
}
534514
}

0 commit comments

Comments
 (0)