Skip to content

Commit 9cfb8b7

Browse files
committed
Merge branch 'master' into lint-attr-fix
2 parents 743535a + 93e70ec commit 9cfb8b7

File tree

577 files changed

+9604
-5569
lines changed

Some content is hidden

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

577 files changed

+9604
-5569
lines changed

.gitignore

+7-6
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ __pycache__/
7373
/obj/
7474
/rt/
7575
/rustllvm/
76-
/src/libunicode/DerivedCoreProperties.txt
77-
/src/libunicode/EastAsianWidth.txt
78-
/src/libunicode/HangulSyllableType.txt
79-
/src/libunicode/PropList.txt
80-
/src/libunicode/Scripts.txt
81-
/src/libunicode/UnicodeData.txt
76+
/src/libstd_unicode/DerivedCoreProperties.txt
77+
/src/libstd_unicode/DerivedNormalizationProps.txt
78+
/src/libstd_unicode/PropList.txt
79+
/src/libstd_unicode/ReadMe.txt
80+
/src/libstd_unicode/Scripts.txt
81+
/src/libstd_unicode/SpecialCasing.txt
82+
/src/libstd_unicode/UnicodeData.txt
8283
/stage[0-9]+/
8384
/target
8485
/test/

.mailmap

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ NAKASHIMA, Makoto <[email protected]>
152152
Nathan Wilson <[email protected]>
153153
Nathaniel Herman <[email protected]> Nathaniel Herman <[email protected]>
154154
155-
Nicholas Mazzuca <[email protected]> Nicholas <[email protected]>
155+
Nicole Mazzuca <[email protected]> Nicole <[email protected]>
156156
Nick Platt <[email protected]>
157157
158158
Oliver Schneider <[email protected]> oli-obk <[email protected]>

.travis.yml

+54-10
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ osx_image: xcode8.2
1313
matrix:
1414
include:
1515
# Linux builders, all docker images
16-
- env: IMAGE=arm-android
17-
- env: IMAGE=cross
18-
- env: IMAGE=i686-gnu
16+
- env: IMAGE=arm-android DEPLOY=1
17+
- env: IMAGE=cross DEPLOY=1
18+
- env: IMAGE=dist-arm-unknown-linux-gnueabi DEPLOY=1
19+
- env: IMAGE=dist-x86_64-unknown-freebsd DEPLOY=1
20+
- env: IMAGE=i686-gnu DEPLOY=1
1921
- env: IMAGE=i686-gnu-nopt
20-
- env: IMAGE=x86_64-freebsd
21-
- env: IMAGE=x86_64-gnu
22+
- env: IMAGE=x86_64-gnu DEPLOY=1
2223
- env: IMAGE=x86_64-gnu-full-bootstrap
2324
- env: IMAGE=x86_64-gnu-aux
2425
- env: IMAGE=x86_64-gnu-debug
2526
- env: IMAGE=x86_64-gnu-nopt
2627
- env: IMAGE=x86_64-gnu-make
2728
- env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1
28-
- env: IMAGE=x86_64-musl
29+
- env: IMAGE=x86_64-musl DEPLOY=1
2930
- env: IMAGE=x86_64-gnu-distcheck
3031

3132
# OSX builders
@@ -34,27 +35,44 @@ matrix:
3435
RUST_CONFIGURE_ARGS=--build=x86_64-apple-darwin
3536
SRC=.
3637
os: osx
38+
before_script: &osx_before_script >
39+
ulimit -c unlimited
3740
install: &osx_install_sccache >
3841
curl -L https://api.pub.build.mozilla.org/tooltool/sha512/d0025b286468cc5ada83b23d3fafbc936b9f190eaa7d4a981715b18e8e3bf720a7bcee7bfe758cfdeb8268857f6098fd52dcdd8818232692a30ce91039936596 |
3942
tar xJf - -C /usr/local/bin --strip-components=1
43+
after_failure: &osx_after_failure >
44+
echo 'bt all' > cmds;
45+
for file in $(ls /cores); do
46+
echo core file $file;
47+
lldb -c $file `which ld` -b -s cmds;
48+
done
49+
4050
- env: >
41-
RUST_CHECK_TARGET=check
51+
SCRIPT="./x.py test && ./x.py dist"
4252
RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
4353
SRC=.
54+
DEPLOY=1
4455
os: osx
56+
before_script: *osx_before_script
4557
install: *osx_install_sccache
58+
after_failure: *osx_after_failure
4659
- env: >
4760
RUST_CHECK_TARGET=check
4861
RUST_CONFIGURE_ARGS=--build=x86_64-apple-darwin --disable-rustbuild
4962
SRC=.
5063
os: osx
64+
before_script: *osx_before_script
5165
install: *osx_install_sccache
66+
after_failure: *osx_after_failure
5267
- env: >
53-
RUST_CHECK_TARGET=
68+
RUST_CHECK_TARGET=dist
5469
RUST_CONFIGURE_ARGS=--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios
5570
SRC=.
71+
DEPLOY=1
5672
os: osx
73+
before_script: *osx_before_script
5774
install: *osx_install_sccache
75+
after_failure: *osx_after_failure
5876
5977
env:
6078
global:
@@ -68,10 +86,10 @@ script:
6886
if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
6987
echo skipping, not a full build;
7088
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
71-
git submodule update --init &&
89+
travis_retry git submodule update --init &&
7290
src/ci/run.sh;
7391
else
74-
git submodule update --init &&
92+
travis_retry git submodule update --init &&
7593
src/ci/docker/run.sh $IMAGE;
7694
fi
7795
@@ -90,3 +108,29 @@ notifications:
90108
cache:
91109
directories:
92110
- $HOME/docker
111+
112+
before_deploy:
113+
- mkdir -p deploy/$TRAVIS_COMMIT
114+
- >
115+
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
116+
cp build/dist/*.tar.gz deploy/$TRAVIS_COMMIT &&
117+
find "deploy/$TRAVIS_COMMIT" -maxdepth 1 -type f -exec sh -c 'shasum -a 256 -b "{}" > "{}.sha256"' \;;
118+
else
119+
cp obj/build/dist/*.tar.gz deploy/$TRAVIS_COMMIT &&
120+
find "deploy/$TRAVIS_COMMIT" -maxdepth 1 -type f -exec sh -c 'sha256sum -b "{}" > "{}.sha256"' \;;
121+
fi
122+
123+
deploy:
124+
- provider: s3
125+
bucket: rust-lang-ci
126+
skip_cleanup: true
127+
local_dir: deploy
128+
upload_dir: rustc-builds
129+
acl: public_read
130+
region: us-east-1
131+
access_key_id: AKIAIPQVNYF2T3DTYIWQ
132+
secret_access_key:
133+
secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
134+
on:
135+
branch: auto
136+
condition: $DEPLOY = 1

COMPILER_TESTS.md

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ whole, instead of just a few lines inside the test.
4545
* `should-fail` indicates that the test should fail; used for "meta testing",
4646
where we test the compiletest program itself to check that it will generate
4747
errors in appropriate scenarios. This header is ignored for pretty-printer tests.
48+
* `gate-test-X` where `X` is a feature marks the test as "gate test" for feature X.
49+
Such tests are supposed to ensure that the compiler errors when usage of a gated
50+
feature is attempted without the proper `#![feature(X)]` tag.
51+
Each unstable lang feature is required to have a gate test.
4852

4953
## Revisions
5054

appveyor.yml

+34-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ environment:
88
# 32/64 bit MSVC
99
- MSYS_BITS: 64
1010
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc
11-
RUST_CHECK_TARGET: check
11+
SCRIPT: python x.py test && python x.py dist
12+
DEPLOY: 1
1213
- MSYS_BITS: 32
1314
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-msvc
14-
RUST_CHECK_TARGET: check
15+
SCRIPT: python x.py test && python x.py dist
16+
DEPLOY: 1
1517

1618
# MSVC makefiles
1719
- MSYS_BITS: 64
@@ -50,10 +52,11 @@ environment:
5052
# too long on appveyor and this is tested by rustbuild below.
5153
- MSYS_BITS: 32
5254
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
53-
RUST_CHECK_TARGET: check
55+
SCRIPT: python x.py test && python x.py dist
5456
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
5557
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
5658
MINGW_DIR: mingw32
59+
DEPLOY: 1
5760

5861
- MSYS_BITS: 32
5962
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --disable-rustbuild
@@ -63,11 +66,12 @@ environment:
6366
MINGW_DIR: mingw32
6467

6568
- MSYS_BITS: 64
66-
RUST_CHECK_TARGET: check
69+
SCRIPT: python x.py test && python x.py dist
6770
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
6871
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
6972
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
7073
MINGW_DIR: mingw64
74+
DEPLOY: 1
7175

7276
clone_depth: 1
7377
build: false
@@ -123,6 +127,32 @@ branches:
123127
only:
124128
- auto
125129

130+
before_deploy:
131+
- ps: |
132+
New-Item -Path deploy -ItemType directory
133+
Get-ChildItem -Path build\dist -Filter '*.tar.gz' | Move-Item -Destination deploy
134+
Get-FileHash .\deploy\* | ForEach-Object {
135+
[io.file]::WriteAllText($_.Path + ".sha256", $_.Hash.ToLower() + "`n")
136+
}
137+
Get-ChildItem -Path deploy | Foreach-Object {
138+
Push-AppveyorArtifact $_.FullName -FileName ${env:APPVEYOR_REPO_COMMIT}/$_
139+
}
140+
141+
deploy:
142+
- provider: S3
143+
skip_cleanup: true
144+
access_key_id: AKIAIPQVNYF2T3DTYIWQ
145+
secret_access_key:
146+
secure: +11jsUNFTQ9dq5Ad1i2+PeUJaXluFJ0zIJAXESE1dFT3Kdjku4/eDdgyjgsB6GnV
147+
bucket: rust-lang-ci
148+
set_public: true
149+
region: us-east-1
150+
artifact: /.*\.(tar.gz|sha256)/
151+
folder: rustc-builds
152+
on:
153+
branch: auto
154+
DEPLOY: 1
155+
126156
# init:
127157
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
128158
# on_finish:

configure

+21-4
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,18 @@ case $CFG_CPUTYPE in
541541
CFG_CPUTYPE=x86_64
542542
;;
543543

544+
mips | mips64)
545+
if [ "$CFG_CPUTYPE" = "mips64" ]; then
546+
CFG_OSTYPE="${CFG_OSTYPE}abi64"
547+
fi
548+
ENDIAN=$(printf '\1' | od -dAn)
549+
if [ "$ENDIAN" -eq 1 ]; then
550+
CFG_CPUTYPE="${CFG_CPUTYPE}el"
551+
elif [ "$ENDIAN" -ne 256 ]; then
552+
err "unknown endianness: $ENDIAN (expecting 1 for little or 256 for big)"
553+
fi
554+
;;
555+
544556
BePC)
545557
CFG_CPUTYPE=i686
546558
;;
@@ -647,6 +659,7 @@ opt_nosave debug-assertions 0 "build with debugging assertions"
647659
opt_nosave llvm-release-debuginfo 0 "build LLVM with debugger metadata"
648660
opt_nosave debuginfo 0 "build with debugger metadata"
649661
opt_nosave debuginfo-lines 0 "build with line number debugger metadata"
662+
opt_nosave debuginfo-only-std 0 "build only libstd with debugging information"
650663
opt_nosave debug-jemalloc 0 "build jemalloc with --enable-debug --enable-fill"
651664

652665
valopt localstatedir "/var/lib" "local state directory"
@@ -733,23 +746,26 @@ case "$CFG_RELEASE_CHANNEL" in
733746
nightly )
734747
msg "overriding settings for $CFG_RELEASE_CHANNEL"
735748
CFG_ENABLE_LLVM_ASSERTIONS=1
736-
737-
# FIXME(#37364) shouldn't have to disable this on windows-gnu
749+
# FIXME(stage0) re-enable this on the next stage0 now that #35566 is
750+
# fixed
738751
case "$CFG_BUILD" in
739752
*-pc-windows-gnu)
740753
;;
741754
*)
742-
CFG_ENABLE_DEBUGINFO_LINES=1
755+
CFG_ENABLE_DEBUGINFO_LINES=1
756+
CFG_ENABLE_DEBUGINFO_ONLY_STD=1
743757
;;
744758
esac
759+
745760
;;
746761
beta | stable)
747762
msg "overriding settings for $CFG_RELEASE_CHANNEL"
748763
case "$CFG_BUILD" in
749764
*-pc-windows-gnu)
750765
;;
751766
*)
752-
CFG_ENABLE_DEBUGINFO_LINES=1
767+
CFG_ENABLE_DEBUGINFO_LINES=1
768+
CFG_ENABLE_DEBUGINFO_ONLY_STD=1
753769
;;
754770
esac
755771
;;
@@ -785,6 +801,7 @@ if [ -n "$CFG_ENABLE_DEBUG_ASSERTIONS" ]; then putvar CFG_ENABLE_DEBUG_ASSERTION
785801
if [ -n "$CFG_ENABLE_LLVM_RELEASE_DEBUGINFO" ]; then putvar CFG_ENABLE_LLVM_RELEASE_DEBUGINFO; fi
786802
if [ -n "$CFG_ENABLE_DEBUGINFO" ]; then putvar CFG_ENABLE_DEBUGINFO; fi
787803
if [ -n "$CFG_ENABLE_DEBUGINFO_LINES" ]; then putvar CFG_ENABLE_DEBUGINFO_LINES; fi
804+
if [ -n "$CFG_ENABLE_DEBUGINFO_ONLY_STD" ]; then putvar CFG_ENABLE_DEBUGINFO_ONLY_STD; fi
788805
if [ -n "$CFG_ENABLE_DEBUG_JEMALLOC" ]; then putvar CFG_ENABLE_DEBUG_JEMALLOC; fi
789806

790807
step_msg "looking for build programs"

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ endif
175175
# that the snapshot will be generated with a statically linked rustc so we only
176176
# have to worry about the distribution of one file (with its native dynamic
177177
# dependencies)
178-
RUSTFLAGS_STAGE0 += -C prefer-dynamic -C no-stack-check
178+
RUSTFLAGS_STAGE0 += -C prefer-dynamic
179179
RUSTFLAGS_STAGE1 += -C prefer-dynamic
180180
RUST_LIB_FLAGS_ST2 += -C prefer-dynamic
181181
RUST_LIB_FLAGS_ST3 += -C prefer-dynamic

src/Cargo.lock

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

src/bootstrap/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@ version = "0.0.0"
66
[lib]
77
name = "bootstrap"
88
path = "lib.rs"
9+
doctest = false
910

1011
[[bin]]
1112
name = "bootstrap"
1213
path = "bin/main.rs"
14+
test = false
1315

1416
[[bin]]
1517
name = "rustc"
1618
path = "bin/rustc.rs"
19+
test = false
1720

1821
[[bin]]
1922
name = "rustdoc"
2023
path = "bin/rustdoc.rs"
24+
test = false
2125

2226
[dependencies]
2327
build_helper = { path = "../build_helper" }

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def download(path, url, probably_big, verbose):
7272
option = "-#"
7373
else:
7474
option = "-s"
75-
run(["curl", option, "-Sf", "-o", path, url], verbose=verbose)
75+
run(["curl", option, "--retry", "3", "-Sf", "-o", path, url], verbose=verbose)
7676

7777

7878
def verify(path, sha_path, verbose):

src/bootstrap/check.rs

+14
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ fn krate_android(build: &Build,
457457

458458
let output = output(Command::new("adb").arg("shell").arg(&program));
459459
println!("{}", output);
460+
461+
t!(fs::create_dir_all(build.out.join("tmp")));
460462
build.run(Command::new("adb")
461463
.arg("pull")
462464
.arg(&log)
@@ -516,6 +518,7 @@ pub fn android_copy_libs(build: &Build,
516518
}
517519

518520
println!("Android copy libs to emulator ({})", target);
521+
build.run(Command::new("adb").arg("wait-for-device"));
519522
build.run(Command::new("adb").arg("remount"));
520523
build.run(Command::new("adb").args(&["shell", "rm", "-r", ADB_TEST_DIR]));
521524
build.run(Command::new("adb").args(&["shell", "mkdir", ADB_TEST_DIR]));
@@ -568,3 +571,14 @@ pub fn distcheck(build: &Build) {
568571
.arg("check")
569572
.current_dir(&dir));
570573
}
574+
575+
/// Test the build system itself
576+
pub fn bootstrap(build: &Build) {
577+
let mut cmd = Command::new(&build.cargo);
578+
cmd.arg("test")
579+
.current_dir(build.src.join("src/bootstrap"))
580+
.env("CARGO_TARGET_DIR", build.out.join("bootstrap"))
581+
.env("RUSTC", &build.rustc);
582+
cmd.arg("--").args(&build.flags.cmd.test_args());
583+
build.run(&mut cmd);
584+
}

0 commit comments

Comments
 (0)