Skip to content

Commit 8c31412

Browse files
committed
Merge branch 'master' into ty-placeholder
2 parents b83352e + 4c59c92 commit 8c31412

File tree

278 files changed

+7310
-3329
lines changed

Some content is hidden

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

278 files changed

+7310
-3329
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
url = https://github.com/rust-lang-nursery/reference.git
2626
[submodule "book"]
2727
path = src/doc/book
28-
url = https://github.com/rust-lang/book
28+
url = https://github.com/rust-lang/book.git

.travis.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ matrix:
1515
- env: IMAGE=arm-android
1616
- env: IMAGE=armhf-gnu
1717
- env: IMAGE=cross DEPLOY=1
18+
- env: IMAGE=dist-aarch64-linux DEPLOY=1
1819
- env: IMAGE=dist-android DEPLOY=1
1920
- env: IMAGE=dist-arm-linux DEPLOY=1
20-
- env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
21-
- env: IMAGE=dist-freebsd DEPLOY=1
22-
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
21+
- env: IMAGE=dist-armhf-linux DEPLOY=1
22+
- env: IMAGE=dist-armv7-linux DEPLOY=1
2323
- env: IMAGE=dist-fuchsia DEPLOY=1
24+
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
25+
- env: IMAGE=dist-i686-freebsd DEPLOY=1
26+
- env: IMAGE=dist-i686-linux DEPLOY=1
2427
- env: IMAGE=dist-mips-linux DEPLOY=1
2528
- env: IMAGE=dist-mips64-linux DEPLOY=1
29+
- env: IMAGE=dist-mips64el-linux DEPLOY=1
30+
- env: IMAGE=dist-mipsel-linux DEPLOY=1
2631
- env: IMAGE=dist-powerpc-linux DEPLOY=1
2732
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
28-
- env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
29-
- env: IMAGE=dist-x86-linux DEPLOY=1
33+
- env: IMAGE=dist-powerpc64le-linux DEPLOY=1
34+
- env: IMAGE=dist-s390x-linux DEPLOY=1
35+
- env: IMAGE=dist-x86_64-freebsd DEPLOY=1
36+
- env: IMAGE=dist-x86_64-linux DEPLOY=1
3037
- env: IMAGE=dist-x86_64-musl DEPLOY=1
38+
- env: IMAGE=dist-x86_64-netbsd DEPLOY=1
3139
- env: IMAGE=emscripten
3240
- env: IMAGE=i686-gnu
3341
- env: IMAGE=i686-gnu-nopt
@@ -55,7 +63,7 @@ matrix:
5563
os: osx
5664
osx_image: xcode8.2
5765
install: &osx_install_sccache >
58-
travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-apple-darwin &&
66+
travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-04-sccache-x86_64-apple-darwin &&
5967
chmod +x /usr/local/bin/sccache &&
6068
travis_retry curl -o /usr/local/bin/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin &&
6169
chmod +x /usr/local/bin/stamp
@@ -104,7 +112,7 @@ matrix:
104112
# turned on, they're deployed to a different location primarily for projects
105113
# which are stuck on nightly and don't want llvm assertions in the artifacts
106114
# that they use.
107-
- env: IMAGE=dist-x86-linux DEPLOY_ALT=1
115+
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
108116
- env: >
109117
RUST_CHECK_TARGET=dist
110118
RUST_CONFIGURE_ARGS="--enable-extended"

appveyor.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ install:
115115
- set PATH=C:\Python27;%PATH%
116116

117117
# Download and install sccache
118-
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-pc-windows-msvc
119-
- mv 2017-03-24-sccache-x86_64-pc-windows-msvc sccache.exe
118+
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-04-sccache-x86_64-pc-windows-msvc
119+
- mv 2017-04-04-sccache-x86_64-pc-windows-msvc sccache.exe
120120
- set PATH=%PATH%;%CD%
121121

122122
# Download and install ninja

src/bootstrap/bootstrap.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,13 @@ def download_stage0(self):
163163
if not os.path.exists(rustc_cache):
164164
os.makedirs(rustc_cache)
165165

166+
channel = self.stage0_rustc_channel()
167+
166168
if self.rustc().startswith(self.bin_root()) and \
167169
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
168170
self.print_what_it_means_to_bootstrap()
169171
if os.path.exists(self.bin_root()):
170172
shutil.rmtree(self.bin_root())
171-
channel = self.stage0_rustc_channel()
172173
filename = "rust-std-{}-{}.tar.gz".format(channel, self.build)
173174
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
174175
tarball = os.path.join(rustc_cache, filename)
@@ -189,6 +190,14 @@ def download_stage0(self):
189190
with open(self.rustc_stamp(), 'w') as f:
190191
f.write(self.stage0_rustc_date())
191192

193+
if "pc-windows-gnu" in self.build:
194+
filename = "rust-mingw-{}-{}.tar.gz".format(channel, self.build)
195+
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
196+
tarball = os.path.join(rustc_cache, filename)
197+
if not os.path.exists(tarball):
198+
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
199+
unpack(tarball, self.bin_root(), match="rust-mingw", verbose=self.verbose)
200+
192201
if self.cargo().startswith(self.bin_root()) and \
193202
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
194203
self.print_what_it_means_to_bootstrap()
@@ -591,16 +600,19 @@ def bootstrap():
591600

592601
def main():
593602
start_time = time()
603+
help_triggered = ('-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
594604
try:
595605
bootstrap()
596-
print("Build completed successfully in %s" % format_build_time(time() - start_time))
606+
if not help_triggered:
607+
print("Build completed successfully in %s" % format_build_time(time() - start_time))
597608
except (SystemExit, KeyboardInterrupt) as e:
598609
if hasattr(e, 'code') and isinstance(e.code, int):
599610
exit_code = e.code
600611
else:
601612
exit_code = 1
602613
print(e)
603-
print("Build completed unsuccessfully in %s" % format_build_time(time() - start_time))
614+
if not help_triggered:
615+
print("Build completed unsuccessfully in %s" % format_build_time(time() - start_time))
604616
sys.exit(exit_code)
605617

606618
if __name__ == '__main__':

src/bootstrap/clean.rs

+22-20
Original file line numberDiff line numberDiff line change
@@ -44,36 +44,38 @@ pub fn clean(build: &Build) {
4444
}
4545

4646
fn rm_rf(path: &Path) {
47-
if !path.exists() {
48-
return
49-
}
50-
if path.is_file() {
51-
return do_op(path, "remove file", |p| fs::remove_file(p));
52-
}
53-
54-
for file in t!(fs::read_dir(path)) {
55-
let file = t!(file).path();
47+
match path.symlink_metadata() {
48+
Err(e) => {
49+
if e.kind() == ErrorKind::NotFound {
50+
return;
51+
}
52+
panic!("failed to get metadata for file {}: {}", path.display(), e);
53+
},
54+
Ok(metadata) => {
55+
if metadata.file_type().is_file() || metadata.file_type().is_symlink() {
56+
do_op(path, "remove file", |p| fs::remove_file(p));
57+
return;
58+
}
5659

57-
if file.is_dir() {
58-
rm_rf(&file);
59-
} else {
60-
// On windows we can't remove a readonly file, and git will
61-
// often clone files as readonly. As a result, we have some
62-
// special logic to remove readonly files on windows.
63-
do_op(&file, "remove file", |p| fs::remove_file(p));
64-
}
65-
}
66-
do_op(path, "remove dir", |p| fs::remove_dir(p));
60+
for file in t!(fs::read_dir(path)) {
61+
rm_rf(&t!(file).path());
62+
}
63+
do_op(path, "remove dir", |p| fs::remove_dir(p));
64+
},
65+
};
6766
}
6867

6968
fn do_op<F>(path: &Path, desc: &str, mut f: F)
7069
where F: FnMut(&Path) -> io::Result<()>
7170
{
7271
match f(path) {
7372
Ok(()) => {}
73+
// On windows we can't remove a readonly file, and git will often clone files as readonly.
74+
// As a result, we have some special logic to remove readonly files on windows.
75+
// This is also the reason that we can't use things like fs::remove_dir_all().
7476
Err(ref e) if cfg!(windows) &&
7577
e.kind() == ErrorKind::PermissionDenied => {
76-
let mut p = t!(path.metadata()).permissions();
78+
let mut p = t!(path.symlink_metadata()).permissions();
7779
p.set_readonly(false);
7880
t!(fs::set_permissions(path, p));
7981
f(path).unwrap_or_else(|e| {

0 commit comments

Comments
 (0)