Skip to content

Commit

Permalink
Showing 341 changed files with 8,886 additions and 3,945 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ Read ["Installation"] from [The Book].
## Building from Source
[building-from-source]: #building-from-source

### Building on *nix
1. Make sure you have installed the dependencies:

* `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:
You may find that other platforms work, but these are our officially
supported build environments that are most likely to work.

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

There is more advice about hacking on Rust in [CONTRIBUTING.md].
12 changes: 6 additions & 6 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -3,19 +3,19 @@ Version 1.21.0 (2017-10-12)

Language
--------
- [Relaxed path syntax. You can now add type parameters to values][43540]
Example:
```rust
my_macro!(Vec<i32>::new); // Always worked
my_macro!(Vec::<i32>::new); // Now works
```
- [You can now use static references for literals.][43838]
Example:
```rust
fn main() {
let x: &'static u32 = &0;
}
```
- [Relaxed path syntax. Optional `::` before `<` is now allowed in all contexts.][43540]
Example:
```rust
my_macro!(Vec<i32>::new); // Always worked
my_macro!(Vec::<i32>::new); // Now works
```

Compiler
--------
20 changes: 13 additions & 7 deletions config.toml.example
Original file line number Diff line number Diff line change
@@ -250,14 +250,11 @@
# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
#backtrace = true

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

# The default ar utility that will be used by the generated compiler if LLVM
# cannot be used. Note that this is not used to assemble said compiler.
#default-ar = "ar"

# The "channel" for the Rust build to produce. The stable/beta channels only
# allow using stable features, whereas the nightly and dev channels allow using
# nightly features
@@ -303,7 +300,7 @@
# =============================================================================
[target.x86_64-unknown-linux-gnu]

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

# Archiver to be used to assemble static libraries compiled from C/C++ code.
# Note: an absolute path should be used, otherwise LLVM build will break.
#ar = "ar"

# Linker to be used to link Rust code. Note that the
# default value is platform specific, and if not specified it may also depend on
# what platform is crossing to what platform.
#linker = "cc"

# Path to the `llvm-config` binary of the installation of a custom LLVM to link
# against. Note that if this is specifed we don't compile LLVM at all for this
# target.
47 changes: 23 additions & 24 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ cmake = "0.1.23"
filetime = "0.1"
num_cpus = "1.0"
getopts = "0.2"
cc = "1.0"
cc = "1.0.1"
libc = "0.2"
serde = "1.0.8"
serde_derive = "1.0.8"
4 changes: 2 additions & 2 deletions src/bootstrap/README.md
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ The script accepts commands, flags, and arguments to determine what to do:
```

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

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

```
# configure to use local rust instead of downloding a beta.
# configure to use local rust instead of downloading a beta.
# `--local-rust-root` is optional here. If elided, we will
# use whatever rustc we find on your PATH.
> configure --enable-rustbuild --local-rust-root=~/.cargo/ --enable-local-rebuild
20 changes: 9 additions & 11 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
@@ -31,8 +31,6 @@ extern crate bootstrap;

use std::env;
use std::ffi::OsString;
use std::io;
use std::io::prelude::*;
use std::str::FromStr;
use std::path::PathBuf;
use std::process::{Command, ExitStatus};
@@ -122,19 +120,14 @@ fn main() {
cmd.arg("-L").arg(&root);
}

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

// Pass down incremental directory, if any.
if let Ok(dir) = env::var("RUSTC_INCREMENTAL") {
cmd.arg(format!("-Zincremental={}", dir));

if verbose > 0 {
cmd.arg("-Zincremental-info");
}
}

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

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

if verbose > 1 {
writeln!(&mut io::stderr(), "rustc command: {:?}", cmd).unwrap();
eprintln!("rustc command: {:?}", cmd);
}

// Actually run the compiler!
11 changes: 11 additions & 0 deletions src/bootstrap/bin/rustdoc.rs
Original file line number Diff line number Diff line change
@@ -47,6 +47,17 @@ fn main() {
if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() {
cmd.arg("-Z").arg("force-unstable-if-unmarked");
}
if let Some(linker) = env::var_os("RUSTC_TARGET_LINKER") {
cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options");
}

// Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
// it up so we can make rustdoc print this into the docs
if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
// This "unstable-options" can be removed when `--crate-version` is stabilized
cmd.arg("-Z").arg("unstable-options")
.arg("--crate-version").arg(version);
}

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

0 comments on commit bd84978

Please sign in to comment.