Skip to content

Commit bd84978

Browse files
authored
Merge branch 'master' into future_imports
2 parents 49a73d0 + 4e9527c commit bd84978

File tree

341 files changed

+8886
-3945
lines changed

Some content is hidden

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

341 files changed

+8886
-3945
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Read ["Installation"] from [The Book].
1616
## Building from Source
1717
[building-from-source]: #building-from-source
1818

19+
### Building on *nix
1920
1. Make sure you have installed the dependencies:
2021

2122
* `g++` 4.7 or later or `clang++` 3.x or later
@@ -193,7 +194,7 @@ Snapshot binaries are currently built and tested on several platforms:
193194
You may find that other platforms work, but these are our officially
194195
supported build environments that are most likely to work.
195196

196-
Rust currently needs between 600MiB and 1.5GiB to build, depending on platform.
197+
Rust currently needs between 600MiB and 1.5GiB of RAM to build, depending on platform.
197198
If it hits swap, it will take a very long time to build.
198199

199200
There is more advice about hacking on Rust in [CONTRIBUTING.md].

RELEASES.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Version 1.21.0 (2017-10-12)
33

44
Language
55
--------
6-
- [Relaxed path syntax. You can now add type parameters to values][43540]
7-
Example:
8-
```rust
9-
my_macro!(Vec<i32>::new); // Always worked
10-
my_macro!(Vec::<i32>::new); // Now works
11-
```
126
- [You can now use static references for literals.][43838]
137
Example:
148
```rust
159
fn main() {
1610
let x: &'static u32 = &0;
1711
}
1812
```
13+
- [Relaxed path syntax. Optional `::` before `<` is now allowed in all contexts.][43540]
14+
Example:
15+
```rust
16+
my_macro!(Vec<i32>::new); // Always worked
17+
my_macro!(Vec::<i32>::new); // Now works
18+
```
1919

2020
Compiler
2121
--------

config.toml.example

+13-7
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,11 @@
250250
# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
251251
#backtrace = true
252252

253-
# The default linker that will be used by the generated compiler. Note that this
254-
# is not the linker used to link said compiler.
253+
# The default linker that will be hard-coded into the generated compiler for
254+
# targets that don't specify linker explicitly in their target specifications.
255+
# Note that this is not the linker used to link said compiler.
255256
#default-linker = "cc"
256257

257-
# The default ar utility that will be used by the generated compiler if LLVM
258-
# cannot be used. Note that this is not used to assemble said compiler.
259-
#default-ar = "ar"
260-
261258
# The "channel" for the Rust build to produce. The stable/beta channels only
262259
# allow using stable features, whereas the nightly and dev channels allow using
263260
# nightly features
@@ -303,7 +300,7 @@
303300
# =============================================================================
304301
[target.x86_64-unknown-linux-gnu]
305302

306-
# C compiler to be used to compiler C code and link Rust code. Note that the
303+
# C compiler to be used to compiler C code. Note that the
307304
# default value is platform specific, and if not specified it may also depend on
308305
# what platform is crossing to what platform.
309306
#cc = "cc"
@@ -312,6 +309,15 @@
312309
# This is only used for host targets.
313310
#cxx = "c++"
314311

312+
# Archiver to be used to assemble static libraries compiled from C/C++ code.
313+
# Note: an absolute path should be used, otherwise LLVM build will break.
314+
#ar = "ar"
315+
316+
# Linker to be used to link Rust code. Note that the
317+
# default value is platform specific, and if not specified it may also depend on
318+
# what platform is crossing to what platform.
319+
#linker = "cc"
320+
315321
# Path to the `llvm-config` binary of the installation of a custom LLVM to link
316322
# against. Note that if this is specifed we don't compile LLVM at all for this
317323
# target.

src/Cargo.lock

+23-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ cmake = "0.1.23"
3434
filetime = "0.1"
3535
num_cpus = "1.0"
3636
getopts = "0.2"
37-
cc = "1.0"
37+
cc = "1.0.1"
3838
libc = "0.2"
3939
serde = "1.0.8"
4040
serde_derive = "1.0.8"

src/bootstrap/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The script accepts commands, flags, and arguments to determine what to do:
3939
```
4040

4141
If files are dirty that would normally be rebuilt from stage 0, that can be
42-
overidden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps
42+
overridden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps
4343
that belong to stage n or earlier:
4444

4545
```
@@ -126,7 +126,7 @@ install a nightly, presumably using `rustup`. You will then want to
126126
configure your directory to use this build, like so:
127127

128128
```
129-
# configure to use local rust instead of downloding a beta.
129+
# configure to use local rust instead of downloading a beta.
130130
# `--local-rust-root` is optional here. If elided, we will
131131
# use whatever rustc we find on your PATH.
132132
> configure --enable-rustbuild --local-rust-root=~/.cargo/ --enable-local-rebuild

src/bootstrap/bin/rustc.rs

+9-11
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ extern crate bootstrap;
3131

3232
use std::env;
3333
use std::ffi::OsString;
34-
use std::io;
35-
use std::io::prelude::*;
3634
use std::str::FromStr;
3735
use std::path::PathBuf;
3836
use std::process::{Command, ExitStatus};
@@ -122,19 +120,14 @@ fn main() {
122120
cmd.arg("-L").arg(&root);
123121
}
124122

125-
// Pass down extra flags, commonly used to configure `-Clinker` when
126-
// cross compiling.
127-
if let Ok(s) = env::var("RUSTC_FLAGS") {
128-
cmd.args(&s.split(" ").filter(|s| !s.is_empty()).collect::<Vec<_>>());
123+
// Override linker if necessary.
124+
if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") {
125+
cmd.arg(format!("-Clinker={}", target_linker));
129126
}
130127

131128
// Pass down incremental directory, if any.
132129
if let Ok(dir) = env::var("RUSTC_INCREMENTAL") {
133130
cmd.arg(format!("-Zincremental={}", dir));
134-
135-
if verbose > 0 {
136-
cmd.arg("-Zincremental-info");
137-
}
138131
}
139132

140133
let crate_name = args.windows(2)
@@ -258,6 +251,11 @@ fn main() {
258251
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
259252
cmd.arg("-Z").arg("force-unstable-if-unmarked");
260253
}
254+
} else {
255+
// Override linker if necessary.
256+
if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") {
257+
cmd.arg(format!("-Clinker={}", host_linker));
258+
}
261259
}
262260

263261
let color = match env::var("RUSTC_COLOR") {
@@ -270,7 +268,7 @@ fn main() {
270268
}
271269

272270
if verbose > 1 {
273-
writeln!(&mut io::stderr(), "rustc command: {:?}", cmd).unwrap();
271+
eprintln!("rustc command: {:?}", cmd);
274272
}
275273

276274
// Actually run the compiler!

src/bootstrap/bin/rustdoc.rs

+11
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ fn main() {
4747
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
4848
cmd.arg("-Z").arg("force-unstable-if-unmarked");
4949
}
50+
if let Some(linker) = env::var_os("RUSTC_TARGET_LINKER") {
51+
cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options");
52+
}
53+
54+
// Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
55+
// it up so we can make rustdoc print this into the docs
56+
if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
57+
// This "unstable-options" can be removed when `--crate-version` is stabilized
58+
cmd.arg("-Z").arg("unstable-options")
59+
.arg("--crate-version").arg(version);
60+
}
5061

5162
std::process::exit(match cmd.status() {
5263
Ok(s) => s.code().unwrap_or(1),

0 commit comments

Comments
 (0)