Skip to content

Commit 464a7d0

Browse files
committed
---
yaml --- r: 275319 b: refs/heads/stable c: 287eb2a h: refs/heads/master i: 275317: d46fa0d 275315: ad3907b 275311: d723811
1 parent d83c3c0 commit 464a7d0

File tree

88 files changed

+411
-909
lines changed

Some content is hidden

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

88 files changed

+411
-909
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: bbc0238e90c4966b76f43342bddba10ac9e9a0a0
32+
refs/heads/stable: 287eb2ac756bfe42fe2b8659ecb5d0547676a0b9
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/RELEASES.md

Lines changed: 47 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -14,60 +14,51 @@ Language
1414
Libraries
1515
---------
1616

17-
* Stabilized APIs:
18-
[`Path::strip_prefix`][] (renamed from relative_from),
19-
[`path::StripPrefixError`][] (new error type returned from strip_prefix),
20-
[`Ipv4Addr::is_loopback`],
21-
[`Ipv4Addr::is_private`],
22-
[`Ipv4Addr::is_link_local`],
23-
[`Ipv4Addr::is_multicast`],
24-
[`Ipv4Addr::is_broadcast`],
25-
[`Ipv4Addr::is_documentation`],
26-
[`Ipv6Addr::is_unspecified`],
27-
[`Ipv6Addr::is_loopback`],
28-
[`Ipv6Addr::is_multicast`],
29-
[`Vec::as_slice`],
30-
[`Vec::as_mut_slice`],
31-
[`String::as_str`],
32-
[`String::as_mut_str`],
33-
`<[T]>::`[`clone_from_slice`], which now requires the two slices to
34-
be the same length
35-
`<[T]>::`[`sort_by_key`],
36-
[`i32::checked_rem`],
37-
[`i32::checked_neg`],
38-
[`i32::checked_shl`],
39-
[`i32::checked_shr`],
40-
[`i32::saturating_mul`],
41-
[`i32::overflowing_add`],
42-
[`i32::overflowing_sub`],
43-
[`i32::overflowing_mul`],
44-
[`i32::overflowing_div`],
45-
[`i32::overflowing_rem`],
46-
[`i32::overflowing_neg`],
47-
[`i32::overflowing_shl`],
48-
[`i32::overflowing_shr`],
49-
[`u32::checked_rem`],
50-
[`u32::checked_neg`],
51-
[`u32::checked_shl`],
52-
[`u32::checked_shl`],
53-
[`u32::saturating_mul`],
54-
[`u32::overflowing_add`],
55-
[`u32::overflowing_sub`],
56-
[`u32::overflowing_mul`],
57-
[`u32::overflowing_div`],
58-
[`u32::overflowing_rem`],
59-
[`u32::overflowing_neg`],
60-
[`u32::overflowing_shl`],
61-
[`u32::overflowing_shr`],
62-
checked, saturated, and overflowing operations for other primitive types,
63-
[`ffi::IntoStringError`],
64-
[`CString::into_string`],
65-
[`CString::into_bytes`],
66-
[`CString::into_bytes_with_nul`],
67-
`From<CString> for Vec<u8>`,
68-
[`IntoStringError::into_cstring`],
69-
[`IntoStringError::utf8_error`],
70-
`Error for IntoStringError`.
17+
* Stabilized APIs
18+
* `Path`
19+
* [`Path::strip_prefix`][] (renamed from relative_from)
20+
* [`path::StripPrefixError`][] (new error type returned from strip_prefix)
21+
* `Ipv4Addr`
22+
* [`Ipv4Addr::is_loopback`]
23+
* [`Ipv4Addr::is_private`]
24+
* [`Ipv4Addr::is_link_local`]
25+
* [`Ipv4Addr::is_multicast`]
26+
* [`Ipv4Addr::is_broadcast`]
27+
* [`Ipv4Addr::is_documentation`]
28+
* `Ipv6Addr`
29+
* [`Ipv6Addr::is_unspecified`]
30+
* [`Ipv6Addr::is_loopback`]
31+
* [`Ipv6Addr::is_multicast`]
32+
* `Vec`
33+
* [`Vec::as_slice`]
34+
* [`Vec::as_mut_slice`]
35+
* `String`
36+
* [`String::as_str`]
37+
* [`String::as_mut_str`]
38+
* Slices
39+
* `<[T]>::`[`clone_from_slice`], which now requires the two slices to
40+
be the same length
41+
* `<[T]>::`[`sort_by_key`]
42+
* checked, saturated, and overflowing operations
43+
* [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`], [`i32::checked_shr`]
44+
* [`i32::saturating_mul`]
45+
* [`i32::overflowing_add`], [`i32::overflowing_sub`], [`i32::overflowing_mul`], [`i32::overflowing_div`]
46+
* [`i32::overflowing_rem`], [`i32::overflowing_neg`], [`i32::overflowing_shl`], [`i32::overflowing_shr`]
47+
* [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`], [`u32::checked_shl`]
48+
* [`u32::saturating_mul`]
49+
* [`u32::overflowing_add`], [`u32::overflowing_sub`], [`u32::overflowing_mul`], [`u32::overflowing_div`]
50+
* [`u32::overflowing_rem`], [`u32::overflowing_neg`], [`u32::overflowing_shl`], [`u32::overflowing_shr`]
51+
* and checked, saturated, and overflowing operations for other primitive types
52+
* FFI
53+
* [`ffi::IntoStringError`]
54+
* [`CString::into_string`]
55+
* [`CString::into_bytes`]
56+
* [`CString::into_bytes_with_nul`]
57+
* `From<CString> for Vec<u8>`
58+
* `IntoStringError`
59+
* [`IntoStringError::into_cstring`]
60+
* [`IntoStringError::utf8_error`]
61+
* `Error for IntoStringError`
7162
* [Validating UTF-8 is faster by a factor of between 7 and 14x for
7263
ASCII input][1.7utf8]. This means that creating `String`s and `str`s
7364
from bytes is faster.
@@ -76,7 +67,7 @@ Libraries
7667
* [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
7768
`f64` variants were stabilized previously.
7869
* [`BTreeMap` was rewritten to use less memory and improve the performance
79-
of insertion and iteration, the latter by as much as 5x`][1.7bm].
70+
of insertion and iteration, the latter by as much as 5x][1.7bm].
8071
* [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
8172
covariant over their contained type][1.7bt].
8273
* [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant
@@ -182,6 +173,7 @@ Compatibility Notes
182173
[`i32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_sub
183174
[`i32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.saturating_mul
184175
[`path::StripPrefixError`]: http://doc.rust-lang.org/nightly/std/path/struct.StripPrefixError.html
176+
[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
185177
[`u32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_rem
186178
[`u32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_shl
187179
[`u32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_add

branches/stable/src/bootstrap/Cargo.lock

Lines changed: 35 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branches/stable/src/bootstrap/bootstrap.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def download_rust_nightly(self):
7373

7474
if self.rustc().startswith(self.bin_root()) and \
7575
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
76-
shutil.rmtree(self.bin_root())
7776
filename = "rust-std-nightly-" + self.build + ".tar.gz"
7877
url = "https://static.rust-lang.org/dist/" + self.snap_rustc_date()
7978
tarball = os.path.join(rustc_cache, filename)

branches/stable/src/bootstrap/build/compile.rs

Lines changed: 22 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -58,30 +58,6 @@ pub fn std<'a>(build: &'a Build, stage: u32, target: &str,
5858
}
5959

6060
build.run(&mut cargo);
61-
std_link(build, stage, target, compiler, host);
62-
}
63-
64-
/// Link all libstd rlibs/dylibs into the sysroot location.
65-
///
66-
/// Links those artifacts generated in the given `stage` for `target` produced
67-
/// by `compiler` into `host`'s sysroot.
68-
pub fn std_link(build: &Build,
69-
stage: u32,
70-
target: &str,
71-
compiler: &Compiler,
72-
host: &str) {
73-
let libdir = build.sysroot_libdir(stage, host, target);
74-
let out_dir = build.cargo_out(stage, compiler.host, true, target);
75-
76-
// If we're linking one compiler host's output into another, then we weren't
77-
// called from the `std` method above. In that case we clean out what's
78-
// already there and then also link compiler-rt into place.
79-
if host != compiler.host {
80-
let _ = fs::remove_dir_all(&libdir);
81-
t!(fs::create_dir_all(&libdir));
82-
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
83-
libdir.join(staticlib("compiler-rt", target))));
84-
}
8561
add_to_sysroot(&out_dir, &libdir);
8662
}
8763

@@ -123,6 +99,7 @@ pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
12399
host, target);
124100

125101
let out_dir = build.cargo_out(stage, &host, false, target);
102+
let rustc = out_dir.join(exe("rustc", target));
126103
build.clear_if_dirty(&out_dir, &libstd_shim(build, stage, &host, target));
127104

128105
let mut cargo = build.cargo(stage, compiler, false, target, "build");
@@ -154,13 +131,10 @@ pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
154131
if !build.unstable_features {
155132
cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1");
156133
}
157-
let target_config = build.config.target_config.get(target);
158-
if let Some(ref s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
159-
cargo.env("LLVM_CONFIG", s);
160-
} else {
161-
let llvm_config = build.llvm_out(&build.config.build).join("bin")
162-
.join(exe("llvm-config", target));
163-
cargo.env("LLVM_CONFIG", llvm_config);
134+
if let Some(config) = build.config.target_config.get(target) {
135+
if let Some(ref s) = config.llvm_config {
136+
cargo.env("LLVM_CONFIG", s);
137+
}
164138
}
165139
if build.config.llvm_static_stdcpp {
166140
cargo.env("LLVM_STATIC_STDCPP",
@@ -174,21 +148,12 @@ pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
174148
}
175149
build.run(&mut cargo);
176150

177-
rustc_link(build, stage, target, compiler, compiler.host);
178-
}
151+
let sysroot_libdir = build.sysroot_libdir(stage, host, target);
152+
add_to_sysroot(&out_dir, &sysroot_libdir);
179153

180-
/// Link all librustc rlibs/dylibs into the sysroot location.
181-
///
182-
/// Links those artifacts generated in the given `stage` for `target` produced
183-
/// by `compiler` into `host`'s sysroot.
184-
pub fn rustc_link(build: &Build,
185-
stage: u32,
186-
target: &str,
187-
compiler: &Compiler,
188-
host: &str) {
189-
let libdir = build.sysroot_libdir(stage, host, target);
190-
let out_dir = build.cargo_out(stage, compiler.host, false, target);
191-
add_to_sysroot(&out_dir, &libdir);
154+
if host == target {
155+
assemble_compiler(build, stage, target, &rustc);
156+
}
192157
}
193158

194159
/// Cargo's output path for the standard library in a given stage, compiled
@@ -204,42 +169,39 @@ fn compiler_file(compiler: &Path, file: &str) -> String {
204169

205170
/// Prepare a new compiler from the artifacts in `stage`
206171
///
207-
/// This will assemble a compiler in `build/$host/stage$stage`. The compiler
208-
/// must have been previously produced by the `stage - 1` build.config.build
209-
/// compiler.
210-
pub fn assemble_rustc(build: &Build, stage: u32, host: &str) {
211-
assert!(stage > 0, "the stage0 compiler isn't assembled, it's downloaded");
212-
172+
/// This will link the compiler built by `host` during the stage
173+
/// specified to the sysroot location for `host` to be the official
174+
/// `stage + 1` compiler for that host. This means that the `rustc` binary
175+
/// itself will be linked into place along with all supporting dynamic
176+
/// libraries.
177+
fn assemble_compiler(build: &Build, stage: u32, host: &str, rustc: &Path) {
213178
// Clear out old files
214-
let sysroot = build.sysroot(stage, host);
179+
let sysroot = build.sysroot(stage + 1, host);
215180
let _ = fs::remove_dir_all(&sysroot);
216181
t!(fs::create_dir_all(&sysroot));
217182

218183
// Link in all dylibs to the libdir
219184
let sysroot_libdir = sysroot.join(libdir(host));
220185
t!(fs::create_dir_all(&sysroot_libdir));
221-
let src_libdir = build.sysroot_libdir(stage - 1, &build.config.build, host);
186+
let src_libdir = build.sysroot_libdir(stage, host, host);
222187
for f in t!(fs::read_dir(&src_libdir)).map(|f| t!(f)) {
223188
let filename = f.file_name().into_string().unwrap();
224189
if is_dylib(&filename) {
225190
t!(fs::hard_link(&f.path(), sysroot_libdir.join(&filename)));
226191
}
227192
}
228193

229-
let out_dir = build.cargo_out(stage - 1, &build.config.build, false, host);
230-
231194
// Link the compiler binary itself into place
232-
let rustc = out_dir.join(exe("rustc", host));
233195
let bindir = sysroot.join("bin");
234196
t!(fs::create_dir_all(&bindir));
235-
let compiler = build.compiler_path(&Compiler::new(stage, host));
197+
let compiler = build.compiler_path(&Compiler::new(stage + 1, host));
236198
let _ = fs::remove_file(&compiler);
237199
t!(fs::hard_link(rustc, compiler));
238200

239201
// See if rustdoc exists to link it into place
240-
let rustdoc = exe("rustdoc", host);
241-
let rustdoc_src = out_dir.join(&rustdoc);
242-
let rustdoc_dst = bindir.join(&rustdoc);
202+
let exe = exe("rustdoc", host);
203+
let rustdoc_src = rustc.parent().unwrap().join(&exe);
204+
let rustdoc_dst = bindir.join(exe);
243205
if fs::metadata(&rustdoc_src).is_ok() {
244206
let _ = fs::remove_file(&rustdoc_dst);
245207
t!(fs::hard_link(&rustdoc_src, &rustdoc_dst));

0 commit comments

Comments
 (0)