Skip to content

Commit 31753b2

Browse files
committed
---
yaml --- r: 185791 b: refs/heads/auto c: eaacc7a h: refs/heads/master i: 185789: 44b477f 185787: 32067e2 185783: d845a70 185775: a63c0c4 185759: 9883d9b 185727: b7d67c9 v: v3
1 parent 213d063 commit 31753b2

File tree

368 files changed

+5998
-7881
lines changed

Some content is hidden

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

368 files changed

+5998
-7881
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: e3104d8f0c3ceb3b268cd6ddc5e91f355e44a7c5
13+
refs/heads/auto: eaacc7aad5817ca10277ea6658d6e23b88d4cf77
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ links to the major sections:
1414
If you have questions, please make a post on [internals.rust-lang.org][internals] or
1515
hop on [#rust-internals][pound-rust-internals].
1616

17-
As a reminder, all contributors are expected to follow our [Code of Conduct](coc).
17+
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
1818

1919
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
2020
[internals]: http://internals.rust-lang.org

branches/auto/README.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,34 @@ Read ["Installing Rust"] from [The Book].
1515
## Building from Source
1616

1717
1. Make sure you have installed the dependencies:
18-
* `g++` 4.7 or `clang++` 3.x
19-
* `python` 2.6 or later (but not 3.x)
20-
* GNU `make` 3.81 or later
21-
* `curl`
22-
* `git`
18+
19+
* `g++` 4.7 or `clang++` 3.x
20+
* `python` 2.6 or later (but not 3.x)
21+
* GNU `make` 3.81 or later
22+
* `curl`
23+
* `git`
2324

2425
2. Clone the [source] with `git`:
2526

26-
$ git clone https://github.com/rust-lang/rust.git
27-
$ cd rust
27+
```sh
28+
$ git clone https://github.com/rust-lang/rust.git
29+
$ cd rust
30+
```
2831

2932
[source]: https://github.com/rust-lang/rust
3033

3134
3. Build and install:
3235

33-
$ ./configure
34-
$ make && make install
36+
```sh
37+
$ ./configure
38+
$ make && make install
39+
```
3540

36-
> ***Note:*** You may need to use `sudo make install` if you do not normally have
37-
> permission to modify the destination directory. The install locations can
38-
> be adjusted by passing a `--prefix` argument to `configure`. Various other
39-
> options are also supported, pass `--help` for more information on them.
41+
> ***Note:*** You may need to use `sudo make install` if you do not
42+
> normally have permission to modify the destination directory. The
43+
> install locations can be adjusted by passing a `--prefix` argument
44+
> to `configure`. Various other options are also supported – pass
45+
> `--help` for more information on them.
4046

4147
When complete, `make install` will place several programs into
4248
`/usr/local/bin`: `rustc`, the Rust compiler, and `rustdoc`, the
@@ -47,27 +53,30 @@ Read ["Installing Rust"] from [The Book].
4753
4854
### Building on Windows
4955
50-
To easily build on windows we can use [MSYS2](http://msys2.github.io/):
56+
[MSYS2](http://msys2.github.io/) can be used to easily build Rust on Windows:
5157
5258
1. Grab the latest MSYS2 installer and go through the installer.
53-
2. Now from the MSYS2 terminal we want to install the mingw64 toolchain and the other
54-
tools we need.
5559
56-
```bash
57-
# choose one based on platform
58-
$ pacman -S mingw-w64-i686-toolchain
59-
$ pacman -S mingw-w64-x86_64-toolchain
60+
2. From the MSYS2 terminal, install the `mingw64` toolchain and other required
61+
tools.
62+
63+
```sh
64+
# Choose one based on platform:
65+
$ pacman -S mingw-w64-i686-toolchain
66+
$ pacman -S mingw-w64-x86_64-toolchain
67+
68+
$ pacman -S base-devel
69+
```
6070
61-
$ pacman -S base-devel
62-
```
71+
3. Run `mingw32_shell.bat` or `mingw64_shell.bat` from wherever you installed
72+
MYSY2 (i.e. `C:\msys`), depending on whether you want 32-bit or 64-bit Rust.
6373
64-
3. With that now start `mingw32_shell.bat` or `mingw64_shell.bat`
65-
from where you installed MSYS2 (i.e. `C:\msys`). Which one you
66-
choose depends on if you want 32 or 64 bit Rust.
67-
4. From there just navigate to where you have Rust's source code, configure and build it:
74+
4. Navigate to Rust's source code, configure and build it:
6875

69-
$ ./configure
70-
$ make && make install
76+
```sh
77+
$ ./configure
78+
$ make && make install
79+
```
7180

7281
## Notes
7382

@@ -92,15 +101,15 @@ There is more advice about hacking on Rust in [CONTRIBUTING.md].
92101

93102
[CONTRIBUTING.md]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md
94103

95-
## Getting help
104+
## Getting Help
96105

97106
The Rust community congregates in a few places:
98107

99-
* [StackOverflow] - Direct questions about using the language here.
100-
* [users.rust-lang.org] - General discussion, broader questions.
108+
* [Stack Overflow] - Direct questions about using the language.
109+
* [users.rust-lang.org] - General discussion and broader questions.
101110
* [/r/rust] - News and general discussion.
102111

103-
[StackOverflow]: http://stackoverflow.com/questions/tagged/rust
112+
[Stack Overflow]: http://stackoverflow.com/questions/tagged/rust
104113
[/r/rust]: http://reddit.com/r/rust
105114
[users.rust-lang.org]: http://users.rust-lang.org/
106115

@@ -111,7 +120,7 @@ To contribute to Rust, please see [CONTRIBUTING.md](CONTRIBUTING.md).
111120
Rust has an [IRC] culture and most real-time collaboration happens in a
112121
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
113122
most popular channel is [#rust], a venue for general discussion about
114-
Rust, and a good place to ask for help,
123+
Rust, and a good place to ask for help.
115124
116125
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
117126
[#rust]: irc://irc.mozilla.org/rust

branches/auto/RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Version 1.0.0-alpha.2 (February 2015)
5151
* Abstract [OS-specific string types][osstr], `std::ff::{OsString,
5252
OsStr}`, provide strings in platform-specific encodings for easier
5353
interop with system APIs. [RFC][osstr-rfc].
54-
* The `boxed::into_raw` and `Box::frow_raw` functions [convert
54+
* The `boxed::into_raw` and `Box::from_raw` functions [convert
5555
between `Box<T>` and `*mut T`][boxraw], a common pattern for
5656
creating raw pointers.
5757

branches/auto/configure

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,12 @@ case $CFG_OSTYPE in
374374
CFG_OSTYPE=unknown-dragonfly
375375
;;
376376

377+
Bitrig)
378+
CFG_OSTYPE=unknown-bitrig
379+
;;
380+
377381
OpenBSD)
378-
CFG_OSTYPE=unknown-openbsd
382+
CFG_OSTYPE=unknown-openbsd
379383
;;
380384

381385
Darwin)
@@ -747,6 +751,13 @@ then
747751
CFG_ENABLE_CLANG=1
748752
fi
749753

754+
# Force bitrig to build with clang; gcc doesn't like us there
755+
if [ $CFG_OSTYPE = unknown-bitrig ]
756+
then
757+
step_msg "on Bitrig, forcing use of clang"
758+
CFG_ENABLE_CLANG=1
759+
fi
760+
750761
if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
751762
then
752763
err "either clang or gcc is required"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# x86_64-unknown-bitrig-elf configuration
2+
CC_x86_64-unknown-bitrig=$(CC)
3+
CXX_x86_64-unknown-bitrig=$(CXX)
4+
CPP_x86_64-unknown-bitrig=$(CPP)
5+
AR_x86_64-unknown-bitrig=$(AR)
6+
CFG_LIB_NAME_x86_64-unknown-bitrig=lib$(1).so
7+
CFG_STATIC_LIB_NAME_x86_64-unknown-bitrig=lib$(1).a
8+
CFG_LIB_GLOB_x86_64-unknown-bitrig=lib$(1)-*.so
9+
CFG_LIB_DSYM_GLOB_x86_64-unknown-bitrig=$(1)-*.dylib.dSYM
10+
CFG_JEMALLOC_CFLAGS_x86_64-unknown-bitrig := -m64 -I/usr/include $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_x86_64-unknown-bitrig := -Wall -Werror -fPIC -m64 -I/usr/include $(CFLAGS)
12+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-bitrig := -shared -pic -pthread -m64 $(LDFLAGS)
13+
CFG_GCCISH_DEF_FLAG_x86_64-unknown-bitrig := -Wl,--export-dynamic,--dynamic-list=
14+
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-bitrig := -Wl,-pic -Wl,-whole-archive
15+
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-bitrig := -Wl,-no-whole-archive
16+
CFG_DEF_SUFFIX_x86_64-unknown-bitrig := .bsd.def
17+
CFG_LLC_FLAGS_x86_64-unknown-bitrig :=
18+
CFG_INSTALL_NAME_x86_64-unknown-bitrig =
19+
CFG_EXE_SUFFIX_x86_64-unknown-bitrig :=
20+
CFG_WINDOWSY_x86_64-unknown-bitrig :=
21+
CFG_UNIXY_x86_64-unknown-bitrig := 1
22+
CFG_PATH_MUNGE_x86_64-unknown-bitrig :=
23+
CFG_LDPATH_x86_64-unknown-bitrig :=
24+
CFG_RUN_x86_64-unknown-bitrig=$(2)
25+
CFG_RUN_TARG_x86_64-unknown-bitrig=$(call CFG_RUN_x86_64-unknown-bitrig,,$(2))
26+
CFG_GNU_TRIPLE_x86_64-unknown-bitrig := x86_64-unknown-bitrig

branches/auto/mk/platform.mk

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ FIND_COMPILER = $(word 1,$(1:ccache=))
144144
define CFG_MAKE_TOOLCHAIN
145145
# Prepend the tools with their prefix if cross compiling
146146
ifneq ($(CFG_BUILD),$(1))
147-
CC_$(1)=$(CROSS_PREFIX_$(1))$(CC_$(1))
148-
CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1))
149-
CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1))
150-
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
151-
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CC_$(1))) \
152-
-C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1))
153-
154-
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
147+
CC_$(1)=$(CROSS_PREFIX_$(1))$(CC_$(1))
148+
CXX_$(1)=$(CROSS_PREFIX_$(1))$(CXX_$(1))
149+
CPP_$(1)=$(CROSS_PREFIX_$(1))$(CPP_$(1))
150+
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
151+
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(CC_$(1))) \
152+
-C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1))
153+
154+
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
155155
endif
156156

157157
CFG_COMPILE_C_$(1) = $$(CC_$(1)) \
@@ -179,11 +179,19 @@ define CFG_MAKE_TOOLCHAIN
179179

180180
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182+
# On Bitrig, we need the relocation model to be PIC for everthing
183+
ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
184+
LLVM_MC_RELOCATION_MODEL="pic"
185+
else
186+
LLVM_MC_RELOCATION_MODEL="default"
187+
endif
188+
182189
# We're using llvm-mc as our assembler because it supports
183190
# .cfi pseudo-ops on mac
184191
CFG_ASSEMBLE_$(1)=$$(CPP_$(1)) -E $$(CFG_DEPEND_FLAGS) $$(2) | \
185192
$$(LLVM_MC_$$(CFG_BUILD)) \
186193
-assemble \
194+
-relocation-model=$$(LLVM_MC_RELOCATION_MODEL) \
187195
-filetype=obj \
188196
-triple=$(1) \
189197
-o=$$(1)
@@ -192,7 +200,7 @@ define CFG_MAKE_TOOLCHAIN
192200
# For the ARM, AARCH64, MIPS and POWER crosses, use the toolchain assembler
193201
# FIXME: We should be able to use the LLVM assembler
194202
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
195-
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
203+
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
196204

197205
endif
198206

branches/auto/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
268268
logfile: config.logfile.clone(),
269269
run_tests: true,
270270
run_benchmarks: true,
271-
nocapture: false,
271+
nocapture: env::var("RUST_TEST_NOCAPTURE").is_ok(),
272272
color: test::AutoColor,
273273
}
274274
}

branches/auto/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
5858
fn parse_expected(last_nonfollow_error: Option<uint>,
5959
line_num: uint,
6060
line: &str) -> Option<(WhichLine, ExpectedError)> {
61-
let start = match line.find_str("//~") { Some(i) => i, None => return None };
61+
let start = match line.find("//~") { Some(i) => i, None => return None };
6262
let (follow, adjusts) = if line.char_at(start + 3) == '|' {
6363
(true, 0)
6464
} else {

branches/auto/src/compiletest/header.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::env;
12+
1113
use common::Config;
1214
use common;
1315
use util;
@@ -125,6 +127,16 @@ pub fn load_props(testfile: &Path) -> TestProps {
125127
true
126128
});
127129

130+
for key in vec!["RUST_TEST_NOCAPTURE", "RUST_TEST_TASKS"] {
131+
match env::var(key) {
132+
Ok(val) =>
133+
if exec_env.iter().find(|&&(ref x, _)| *x == key.to_string()).is_none() {
134+
exec_env.push((key.to_string(), val))
135+
},
136+
Err(..) => {}
137+
}
138+
}
139+
128140
TestProps {
129141
error_patterns: error_patterns,
130142
compile_flags: compile_flags,
@@ -330,7 +342,7 @@ fn parse_name_directive(line: &str, directive: &str) -> bool {
330342
pub fn parse_name_value_directive(line: &str, directive: &str)
331343
-> Option<String> {
332344
let keycolon = format!("{}:", directive);
333-
match line.find_str(&keycolon) {
345+
match line.find(&keycolon) {
334346
Some(colon) => {
335347
let value = line[(colon + keycolon.len()) .. line.len()].to_string();
336348
debug!("{}: {}", directive, value);

branches/auto/src/compiletest/runtest.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
8989
let proc_res = compile_test(config, props, testfile);
9090

9191
if proc_res.status.success() {
92-
fatal_proc_rec(&format!("{} test compiled successfully!", config.mode)[],
92+
fatal_proc_rec(&format!("{} test compiled successfully!", config.mode)[..],
9393
&proc_res);
9494
}
9595

@@ -398,7 +398,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
398398
for line in breakpoint_lines.iter() {
399399
script_str.push_str(&format!("break {:?}:{}\n",
400400
testfile.filename_display(),
401-
*line)[]);
401+
*line)[..]);
402402
}
403403
script_str.push_str(&cmds);
404404
script_str.push_str("quit\n");
@@ -553,17 +553,17 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
553553
script_str.push_str("set print pretty off\n");
554554

555555
// Add the pretty printer directory to GDB's source-file search path
556-
script_str.push_str(&format!("directory {}\n", rust_pp_module_abs_path)[]);
556+
script_str.push_str(&format!("directory {}\n", rust_pp_module_abs_path)[..]);
557557

558558
// Load the target executable
559559
script_str.push_str(&format!("file {}\n",
560-
exe_file.as_str().unwrap().replace("\\", "\\\\"))[]);
560+
exe_file.as_str().unwrap().replace("\\", "\\\\"))[..]);
561561

562562
// Add line breakpoints
563563
for line in &breakpoint_lines {
564564
script_str.push_str(&format!("break '{}':{}\n",
565565
testfile.filename_display(),
566-
*line)[]);
566+
*line)[..]);
567567
}
568568

569569
script_str.push_str(&cmds);
@@ -689,7 +689,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
689689
.unwrap()
690690
.to_string();
691691

692-
script_str.push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[]);
692+
script_str.push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[..]);
693693
script_str.push_str("type summary add --no-value ");
694694
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
695695
script_str.push_str("-x \".*\" --category Rust\n");
@@ -847,7 +847,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
847847
check_lines.iter().map(|s| {
848848
s
849849
.trim()
850-
.split_str("[...]")
850+
.split("[...]")
851851
.map(|x| x.to_string())
852852
.collect()
853853
}).collect();
@@ -866,7 +866,7 @@ fn check_debugger_output(debugger_run_result: &ProcRes, check_lines: &[String])
866866
None
867867
}
868868
} else {
869-
rest.find_str(frag)
869+
rest.find(frag)
870870
};
871871
match found {
872872
None => {

branches/auto/src/compiletest/util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ static OS_TABLE: &'static [(&'static str, &'static str)] = &[
2323
("linux", "linux"),
2424
("freebsd", "freebsd"),
2525
("dragonfly", "dragonfly"),
26+
("bitrig", "bitrig"),
2627
("openbsd", "openbsd"),
2728
];
2829

0 commit comments

Comments
 (0)