Skip to content

Commit 09f06dd

Browse files
committed
---
yaml --- r: 275702 b: refs/heads/master c: ebff638 h: refs/heads/master
1 parent 43a5612 commit 09f06dd

File tree

140 files changed

+7233
-6145
lines changed

Some content is hidden

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

140 files changed

+7233
-6145
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: 2872c236186810f72c154ae764c473c17323b038
2+
refs/heads/master: ebff6382194b40c357dba0fbe829e5af9d3cf724
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/configure

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ 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"
611611
opt codegen-tests 1 "run the src/test/codegen tests"
612+
opt option-checking 1 "complain about unrecognized options in this configure script"
612613

613614
# Optimization and debugging options. These may be overridden by the release channel, etc.
614615
opt_nosave optimize 1 "build optimized rust code"
@@ -674,8 +675,11 @@ then
674675
fi
675676

676677
# Validate Options
677-
step_msg "validating $CFG_SELF args"
678-
validate_opt
678+
if [ -z "$CFG_DISABLE_OPTION_CHECKING" ]
679+
then
680+
step_msg "validating $CFG_SELF args"
681+
validate_opt
682+
fi
679683

680684
# Validate the release channel, and configure options
681685
case "$CFG_RELEASE_CHANNEL" in
@@ -819,6 +823,19 @@ then
819823
fi
820824
fi
821825

826+
# LLDB tests on OSX require /usr/bin/python, not something like Homebrew's
827+
# /usr/local/bin/python. We're loading a compiled module for LLDB tests which is
828+
# only compatible with the system.
829+
case $CFG_BUILD in
830+
*-apple-darwin)
831+
CFG_LLDB_PYTHON=/usr/bin/python
832+
;;
833+
*)
834+
CFG_LLDB_PYTHON=$CFG_PYTHON
835+
;;
836+
esac
837+
putvar CFG_LLDB_PYTHON
838+
822839
step_msg "looking for target specific programs"
823840

824841
probe CFG_ADB adb

trunk/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
128128
test rustc_lint rustc_const_eval
129129

130130

131-
TOOL_DEPS_compiletest := test getopts log
131+
TOOL_DEPS_compiletest := test getopts log serialize
132132
TOOL_DEPS_rustdoc := rustdoc
133133
TOOL_DEPS_rustc := rustc_driver
134134
TOOL_DEPS_rustbook := std rustdoc

trunk/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
619619
--stage-id stage$(1)-$(2) \
620620
--target $(2) \
621621
--host $(3) \
622-
--python $$(CFG_PYTHON) \
622+
--docck-python $$(CFG_PYTHON) \
623+
--lldb-python $$(CFG_LLDB_PYTHON) \
623624
--gdb-version="$(CFG_GDB_VERSION)" \
624625
--lldb-version="$(CFG_LLDB_VERSION)" \
625626
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \

trunk/src/bootstrap/build/check.rs

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// except according to those terms.
1010

1111
use std::fs;
12-
use std::path::PathBuf;
12+
use std::path::{PathBuf, Path};
13+
use std::process::Command;
1314

1415
use build::{Build, Compiler};
1516

@@ -81,8 +82,19 @@ pub fn compiletest(build: &Build,
8182

8283
// FIXME: needs android support
8384
cmd.arg("--android-cross-path").arg("");
85+
8486
// FIXME: CFG_PYTHON should probably be detected more robustly elsewhere
85-
cmd.arg("--python").arg("python");
87+
let python_default = "python";
88+
cmd.arg("--docck-python").arg(python_default);
89+
90+
if build.config.build.ends_with("apple-darwin") {
91+
// Force /usr/bin/python on OSX for LLDB tests because we're loading the
92+
// LLDB plugin's compiled module which only works with the system python
93+
// (namely not Homebrew-installed python)
94+
cmd.arg("--lldb-python").arg("/usr/bin/python");
95+
} else {
96+
cmd.arg("--lldb-python").arg(python_default);
97+
}
8698

8799
if let Some(ref vers) = build.gdb_version {
88100
cmd.arg("--gdb-version").arg(vers);
@@ -102,3 +114,42 @@ pub fn compiletest(build: &Build,
102114

103115
build.run(&mut cmd);
104116
}
117+
118+
pub fn docs(build: &Build, compiler: &Compiler) {
119+
let mut stack = vec![build.src.join("src/doc")];
120+
121+
while let Some(p) = stack.pop() {
122+
if p.is_dir() {
123+
stack.extend(t!(p.read_dir()).map(|p| t!(p).path()));
124+
continue
125+
}
126+
127+
if p.extension().and_then(|s| s.to_str()) != Some("md") {
128+
continue
129+
}
130+
131+
println!("doc tests for: {}", p.display());
132+
markdown_test(build, compiler, &p);
133+
}
134+
}
135+
136+
pub fn error_index(build: &Build, compiler: &Compiler) {
137+
println!("Testing error-index stage{}", compiler.stage);
138+
139+
let output = testdir(build, compiler.host).join("error-index.md");
140+
build.run(build.tool_cmd(compiler, "error_index_generator")
141+
.arg("markdown")
142+
.arg(&output)
143+
.env("CFG_BUILD", &build.config.build));
144+
145+
markdown_test(build, compiler, &output);
146+
}
147+
148+
fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) {
149+
let mut cmd = Command::new(build.rustdoc(compiler));
150+
build.add_rustc_lib_path(compiler, &mut cmd);
151+
cmd.arg("--test");
152+
cmd.arg(markdown);
153+
cmd.arg("--test-args").arg(build.flags.args.join(" "));
154+
build.run(&mut cmd);
155+
}

trunk/src/bootstrap/build/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ impl Build {
308308
check::compiletest(self, &compiler, target.target,
309309
"compile-fail", "compile-fail-fulldeps")
310310
}
311+
CheckDocs { compiler } => {
312+
check::docs(self, &compiler);
313+
}
314+
CheckErrorIndex { compiler } => {
315+
check::error_index(self, &compiler);
316+
}
311317

312318
DistDocs { stage } => dist::docs(self, stage, target.target),
313319
DistMingw { _dummy } => dist::mingw(self, target.target),

trunk/src/bootstrap/build/step.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ macro_rules! targets {
9696
(check_rpass_valgrind, CheckRPassValgrind { compiler: Compiler<'a> }),
9797
(check_rpass_full, CheckRPassFull { compiler: Compiler<'a> }),
9898
(check_cfail_full, CheckCFailFull { compiler: Compiler<'a> }),
99+
(check_docs, CheckDocs { compiler: Compiler<'a> }),
100+
(check_error_index, CheckErrorIndex { compiler: Compiler<'a> }),
99101

100102
// Distribution targets, creating tarballs
101103
(dist, Dist { stage: u32 }),
@@ -341,7 +343,10 @@ impl<'a> Step<'a> {
341343
self.check_rpass_valgrind(compiler),
342344
self.check_rpass_full(compiler),
343345
self.check_cfail_full(compiler),
346+
self.check_error_index(compiler),
347+
self.check_docs(compiler),
344348
self.check_linkcheck(stage),
349+
self.check_tidy(stage),
345350
self.dist(stage),
346351
]
347352
}
@@ -383,6 +388,12 @@ impl<'a> Step<'a> {
383388
vec![self.librustc(compiler),
384389
self.tool_compiletest(compiler.stage)]
385390
}
391+
Source::CheckDocs { compiler } => {
392+
vec![self.libstd(compiler)]
393+
}
394+
Source::CheckErrorIndex { compiler } => {
395+
vec![self.libstd(compiler), self.tool_error_index(compiler.stage)]
396+
}
386397

387398
Source::ToolLinkchecker { stage } |
388399
Source::ToolTidy { stage } => {
@@ -405,7 +416,14 @@ impl<'a> Step<'a> {
405416
vec![self.rustc(stage)]
406417
}
407418
Source::DistStd { compiler } => {
408-
vec![self.libtest(compiler)]
419+
// We want to package up as many target libraries as possible
420+
// for the `rust-std` package, so if this is a host target we
421+
// depend on librustc and otherwise we just depend on libtest.
422+
if build.config.host.iter().any(|t| t == self.target) {
423+
vec![self.librustc(compiler)]
424+
} else {
425+
vec![self.libtest(compiler)]
426+
}
409427
}
410428

411429
Source::Dist { stage } => {

trunk/src/doc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ libraries.
99

1010
To generate HTML documentation from one source file/crate, do something like:
1111

12-
~~~~
12+
~~~~text
1313
rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
1414
~~~~
1515

@@ -20,7 +20,7 @@ rustdoc --output html-doc/ --output-format html ../src/libstd/path.rs
2020
To generate an HTML version of a doc from Markdown manually, you can do
2121
something like:
2222

23-
~~~~
23+
~~~~text
2424
rustdoc reference.md
2525
~~~~
2626

trunk/src/doc/book/getting-started.md

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ Specifically they will each satisfy the following requirements:
3939

4040
| Target | std |rustc|cargo| notes |
4141
|-------------------------------|-----|-----|-----|----------------------------|
42-
| `i686-pc-windows-msvc` |||| 32-bit MSVC (Windows 7+) |
43-
| `x86_64-pc-windows-msvc` |||| 64-bit MSVC (Windows 7+) |
44-
| `i686-pc-windows-gnu` |||| 32-bit MinGW (Windows 7+) |
45-
| `x86_64-pc-windows-gnu` |||| 64-bit MinGW (Windows 7+) |
4642
| `i686-apple-darwin` |||| 32-bit OSX (10.7+, Lion+) |
47-
| `x86_64-apple-darwin` |||| 64-bit OSX (10.7+, Lion+) |
43+
| `i686-pc-windows-gnu` |||| 32-bit MinGW (Windows 7+) |
44+
| `i686-pc-windows-msvc` |||| 32-bit MSVC (Windows 7+) |
4845
| `i686-unknown-linux-gnu` |||| 32-bit Linux (2.6.18+) |
46+
| `x86_64-apple-darwin` |||| 64-bit OSX (10.7+, Lion+) |
47+
| `x86_64-pc-windows-gnu` |||| 64-bit MinGW (Windows 7+) |
48+
| `x86_64-pc-windows-msvc` |||| 64-bit MSVC (Windows 7+) |
4949
| `x86_64-unknown-linux-gnu` |||| 64-bit Linux (2.6.18+) |
5050

5151
### Tier 2
@@ -63,13 +63,28 @@ these platforms are required to have each of the following:
6363

6464
| Target | std |rustc|cargo| notes |
6565
|-------------------------------|-----|-----|-----|----------------------------|
66-
| `x86_64-unknown-linux-musl` || | | 64-bit Linux with MUSL |
66+
| `aarch64-apple-ios` || | | ARM64 iOS |
67+
| `aarch64-unknown-linux-gnu` |||| ARM64 Linux (2.6.18+) |
6768
| `arm-linux-androideabi` || | | ARM Android |
68-
| `arm-unknown-linux-gnueabi` ||| | ARM Linux (2.6.18+) |
69-
| `arm-unknown-linux-gnueabihf` ||| | ARM Linux (2.6.18+) |
70-
| `aarch64-unknown-linux-gnu` || | | ARM64 Linux (2.6.18+) |
69+
| `arm-unknown-linux-gnueabi` |||| ARM Linux (2.6.18+) |
70+
| `arm-unknown-linux-gnueabihf` |||| ARM Linux (2.6.18+) |
71+
| `armv7-apple-ios` || | | ARM iOS |
72+
|`armv7-unknown-linux-gnueabihf`|||| ARMv7 Linux (2.6.18+) |
73+
| `armv7s-apple-ios` || | | ARM iOS |
74+
| `i386-apple-ios` || | | 32-bit x86 iOS |
75+
| `i586-pc-windows-msvc` || | | 32-bit Windows w/o SSE |
7176
| `mips-unknown-linux-gnu` || | | MIPS Linux (2.6.18+) |
77+
| `mips-unknown-linux-musl` || | | MIPS Linux with MUSL |
7278
| `mipsel-unknown-linux-gnu` || | | MIPS (LE) Linux (2.6.18+) |
79+
| `mipsel-unknown-linux-musl` || | | MIPS (LE) Linux with MUSL |
80+
| `powerpc-unknown-linux-gnu` || | | PowerPC Linux (2.6.18+) |
81+
| `powerpc64-unknown-linux-gnu` || | | PPC64 Linux (2.6.18+) |
82+
|`powerpc64le-unknown-linux-gnu`|| | | PPC64LE Linux (2.6.18+) |
83+
| `x86_64-apple-ios` || | | 64-bit x86 iOS |
84+
| `x86_64-rumprun-netbsd` || | | 64-bit NetBSD Rump Kernel |
85+
| `x86_64-unknown-freebsd` |||| 64-bit FreeBSD |
86+
| `x86_64-unknown-linux-musl` || | | 64-bit Linux with MUSL |
87+
| `x86_64-unknown-netbsd` |||| 64-bit NetBSD |
7388

7489
### Tier 3
7590

@@ -82,27 +97,15 @@ unofficial locations.
8297

8398
| Target | std |rustc|cargo| notes |
8499
|-------------------------------|-----|-----|-----|----------------------------|
85-
| `i686-linux-android` || | | 32-bit x86 Android |
86100
| `aarch64-linux-android` || | | ARM64 Android |
87-
| `powerpc-unknown-linux-gnu` || | | PowerPC Linux (2.6.18+) |
88-
| `powerpc64-unknown-linux-gnu` || | | PPC64 Linux (2.6.18+) |
89-
|`powerpc64le-unknown-linux-gnu`|| | | PPC64LE Linux (2.6.18+) |
90-
|`armv7-unknown-linux-gnueabihf`|| | | ARMv7 Linux (2.6.18+) |
91-
| `i386-apple-ios` || | | 32-bit x86 iOS |
92-
| `x86_64-apple-ios` || | | 64-bit x86 iOS |
93-
| `armv7-apple-ios` || | | ARM iOS |
94-
| `armv7s-apple-ios` || | | ARM iOS |
95-
| `aarch64-apple-ios` || | | ARM64 iOS |
101+
| `i686-linux-android` || | | 32-bit x86 Android |
102+
| `i686-pc-windows-msvc` (XP) || | | Windows XP support |
96103
| `i686-unknown-freebsd` |||| 32-bit FreeBSD |
97-
| `x86_64-unknown-freebsd` |||| 64-bit FreeBSD |
98-
| `x86_64-unknown-openbsd` ||| | 64-bit OpenBSD |
99-
| `x86_64-unknown-netbsd` ||| | 64-bit NetBSD |
104+
| `x86_64-pc-windows-msvc` (XP) || | | Windows XP support |
105+
| `x86_64-sun-solaris` ||| | 64-bit Solaris/SunOS |
100106
| `x86_64-unknown-bitrig` ||| | 64-bit Bitrig |
101107
| `x86_64-unknown-dragonfly` ||| | 64-bit DragonFlyBSD |
102-
| `x86_64-rumprun-netbsd` || | | 64-bit NetBSD Rump Kernel |
103-
| `x86_64-sun-solaris` ||| | 64-bit Solaris/SunOS |
104-
| `i686-pc-windows-msvc` (XP) || | | Windows XP support |
105-
| `x86_64-pc-windows-msvc` (XP) || | | Windows XP support |
108+
| `x86_64-unknown-openbsd` ||| | 64-bit OpenBSD |
106109

107110
Note that this table can be expanded over time, this isn't the exhaustive set of
108111
tier 3 platforms that will ever be!

trunk/src/doc/style/errors/ergonomics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pattern.
99

1010
Prefer
1111

12-
```rust
12+
```rust,ignore
1313
use std::io::{File, Open, Write, IoError};
1414
1515
struct Info {
@@ -31,7 +31,7 @@ fn write_info(info: &Info) -> Result<(), IoError> {
3131

3232
over
3333

34-
```rust
34+
```rust,ignore
3535
use std::io::{File, Open, Write, IoError};
3636
3737
struct Info {

trunk/src/doc/style/features/functions-and-methods/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
Prefer
66

7-
```rust
7+
```rust,ignore
88
impl Foo {
99
pub fn frob(&self, w: widget) { ... }
1010
}
1111
```
1212

1313
over
1414

15-
```rust
15+
```rust,ignore
1616
pub fn frob(foo: &Foo, w: widget) { ... }
1717
```
1818

0 commit comments

Comments
 (0)