Merge remote-tracking branch 'rust-lang/master' into iss29367-windows-docs
This commit is contained in:
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -22,11 +22,14 @@
|
|||||||
path = src/doc/nomicon
|
path = src/doc/nomicon
|
||||||
url = https://github.com/rust-lang-nursery/nomicon.git
|
url = https://github.com/rust-lang-nursery/nomicon.git
|
||||||
[submodule "src/tools/cargo"]
|
[submodule "src/tools/cargo"]
|
||||||
path = cargo
|
path = src/tools/cargo
|
||||||
url = https://github.com/rust-lang/cargo.git
|
url = https://github.com/rust-lang/cargo
|
||||||
[submodule "reference"]
|
[submodule "reference"]
|
||||||
path = src/doc/reference
|
path = src/doc/reference
|
||||||
url = https://github.com/rust-lang-nursery/reference.git
|
url = https://github.com/rust-lang-nursery/reference.git
|
||||||
[submodule "book"]
|
[submodule "book"]
|
||||||
path = src/doc/book
|
path = src/doc/book
|
||||||
url = https://github.com/rust-lang/book
|
url = https://github.com/rust-lang/book.git
|
||||||
|
[submodule "src/tools/rls"]
|
||||||
|
path = src/tools/rls
|
||||||
|
url = https://github.com/rust-lang-nursery/rls
|
||||||
|
|||||||
1
.mailmap
1
.mailmap
@@ -139,6 +139,7 @@ Margaret Meyerhofer <mmeyerho@andrew.cmu.edu> <mmeyerho@andrew>
|
|||||||
Mark Sinclair <mark.edward.x@gmail.com>
|
Mark Sinclair <mark.edward.x@gmail.com>
|
||||||
Mark Sinclair <mark.edward.x@gmail.com> =Mark Sinclair <=125axel125@gmail.com>
|
Mark Sinclair <mark.edward.x@gmail.com> =Mark Sinclair <=125axel125@gmail.com>
|
||||||
Markus Westerlind <marwes91@gmail.com> Markus <marwes91@gmail.com>
|
Markus Westerlind <marwes91@gmail.com> Markus <marwes91@gmail.com>
|
||||||
|
Martin Hafskjold Thoresen <martinhath@gmail.com>
|
||||||
Matej Lach <matej.lach@gmail.com> Matej Ľach <matej.lach@gmail.com>
|
Matej Lach <matej.lach@gmail.com> Matej Ľach <matej.lach@gmail.com>
|
||||||
Matt Brubeck <mbrubeck@limpet.net> <mbrubeck@cs.hmc.edu>
|
Matt Brubeck <mbrubeck@limpet.net> <mbrubeck@cs.hmc.edu>
|
||||||
Matthew Auld <matthew.auld@intel.com>
|
Matthew Auld <matthew.auld@intel.com>
|
||||||
|
|||||||
80
.travis.yml
80
.travis.yml
@@ -15,19 +15,27 @@ matrix:
|
|||||||
- env: IMAGE=arm-android
|
- env: IMAGE=arm-android
|
||||||
- env: IMAGE=armhf-gnu
|
- env: IMAGE=armhf-gnu
|
||||||
- env: IMAGE=cross DEPLOY=1
|
- env: IMAGE=cross DEPLOY=1
|
||||||
|
- env: IMAGE=dist-aarch64-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-android DEPLOY=1
|
- env: IMAGE=dist-android DEPLOY=1
|
||||||
- env: IMAGE=dist-arm-linux DEPLOY=1
|
- env: IMAGE=dist-arm-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
|
- env: IMAGE=dist-armhf-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-freebsd DEPLOY=1
|
- env: IMAGE=dist-armv7-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
|
|
||||||
- env: IMAGE=dist-fuchsia DEPLOY=1
|
- env: IMAGE=dist-fuchsia DEPLOY=1
|
||||||
|
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
|
||||||
|
- env: IMAGE=dist-i686-freebsd DEPLOY=1
|
||||||
|
- env: IMAGE=dist-i686-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-mips-linux DEPLOY=1
|
- env: IMAGE=dist-mips-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-mips64-linux DEPLOY=1
|
- env: IMAGE=dist-mips64-linux DEPLOY=1
|
||||||
|
- env: IMAGE=dist-mips64el-linux DEPLOY=1
|
||||||
|
- env: IMAGE=dist-mipsel-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-powerpc-linux DEPLOY=1
|
- env: IMAGE=dist-powerpc-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
|
- env: IMAGE=dist-powerpc64-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
|
- env: IMAGE=dist-powerpc64le-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-x86-linux DEPLOY=1
|
- env: IMAGE=dist-s390x-linux DEPLOY=1
|
||||||
|
- env: IMAGE=dist-x86_64-freebsd DEPLOY=1
|
||||||
|
- env: IMAGE=dist-x86_64-linux DEPLOY=1
|
||||||
- env: IMAGE=dist-x86_64-musl DEPLOY=1
|
- env: IMAGE=dist-x86_64-musl DEPLOY=1
|
||||||
|
- env: IMAGE=dist-x86_64-netbsd DEPLOY=1
|
||||||
- env: IMAGE=emscripten
|
- env: IMAGE=emscripten
|
||||||
- env: IMAGE=i686-gnu
|
- env: IMAGE=i686-gnu
|
||||||
- env: IMAGE=i686-gnu-nopt
|
- env: IMAGE=i686-gnu-nopt
|
||||||
@@ -40,10 +48,13 @@ matrix:
|
|||||||
- env: IMAGE=x86_64-gnu-distcheck
|
- env: IMAGE=x86_64-gnu-distcheck
|
||||||
- env: IMAGE=x86_64-gnu-incremental
|
- env: IMAGE=x86_64-gnu-incremental
|
||||||
|
|
||||||
# OSX builders
|
# OSX builders running tests, these run the full test suite.
|
||||||
|
#
|
||||||
|
# Note that the compiler is compiled to target 10.8 here because the Xcode
|
||||||
|
# version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
|
||||||
- env: >
|
- env: >
|
||||||
RUST_CHECK_TARGET=check
|
RUST_CHECK_TARGET=check
|
||||||
RUST_CONFIGURE_ARGS=--build=x86_64-apple-darwin
|
RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers"
|
||||||
SRC=.
|
SRC=.
|
||||||
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
||||||
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
||||||
@@ -52,7 +63,7 @@ matrix:
|
|||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode8.2
|
||||||
install: &osx_install_sccache >
|
install: &osx_install_sccache >
|
||||||
travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-apple-darwin &&
|
travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-apple-darwin &&
|
||||||
chmod +x /usr/local/bin/sccache &&
|
chmod +x /usr/local/bin/sccache &&
|
||||||
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 &&
|
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 &&
|
||||||
chmod +x /usr/local/bin/stamp
|
chmod +x /usr/local/bin/stamp
|
||||||
@@ -68,6 +79,12 @@ matrix:
|
|||||||
osx_image: xcode8.2
|
osx_image: xcode8.2
|
||||||
install: *osx_install_sccache
|
install: *osx_install_sccache
|
||||||
|
|
||||||
|
# OSX builders producing releases. These do not run the full test suite and
|
||||||
|
# just produce a bunch of artifacts.
|
||||||
|
#
|
||||||
|
# Note that these are running in the `xcode7` image instead of the
|
||||||
|
# `xcode8.2` image as above. That's because we want to build releases for
|
||||||
|
# OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
|
||||||
- env: >
|
- env: >
|
||||||
RUST_CHECK_TARGET=dist
|
RUST_CHECK_TARGET=dist
|
||||||
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
|
RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
|
||||||
@@ -75,29 +92,33 @@ matrix:
|
|||||||
DEPLOY=1
|
DEPLOY=1
|
||||||
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
||||||
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.8
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
MACOSX_STD_DEPLOYMENT_TARGET=10.7
|
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode7
|
||||||
install: *osx_install_sccache
|
install:
|
||||||
|
- travis_retry brew update
|
||||||
|
- travis_retry brew install xz
|
||||||
|
- *osx_install_sccache
|
||||||
- env: >
|
- env: >
|
||||||
RUST_CHECK_TARGET=dist
|
RUST_CHECK_TARGET=dist
|
||||||
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended"
|
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers"
|
||||||
SRC=.
|
SRC=.
|
||||||
DEPLOY=1
|
DEPLOY=1
|
||||||
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
||||||
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.8
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
MACOSX_STD_DEPLOYMENT_TARGET=10.7
|
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode7
|
||||||
install: *osx_install_sccache
|
install:
|
||||||
|
- travis_retry brew update
|
||||||
|
- travis_retry brew install xz
|
||||||
|
- *osx_install_sccache
|
||||||
|
|
||||||
# "alternate" deployments, these are "nightlies" but don't have assertions
|
# "alternate" deployments, these are "nightlies" but don't have assertions
|
||||||
# turned on, they're deployed to a different location primarily for projects
|
# turned on, they're deployed to a different location primarily for projects
|
||||||
# which are stuck on nightly and don't want llvm assertions in the artifacts
|
# which are stuck on nightly and don't want llvm assertions in the artifacts
|
||||||
# that they use.
|
# that they use.
|
||||||
- env: IMAGE=dist-x86-linux DEPLOY_ALT=1
|
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
|
||||||
- env: >
|
- env: >
|
||||||
RUST_CHECK_TARGET=dist
|
RUST_CHECK_TARGET=dist
|
||||||
RUST_CONFIGURE_ARGS="--enable-extended"
|
RUST_CONFIGURE_ARGS="--enable-extended"
|
||||||
@@ -105,11 +126,13 @@ matrix:
|
|||||||
DEPLOY_ALT=1
|
DEPLOY_ALT=1
|
||||||
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
|
||||||
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
SCCACHE_ERROR_LOG=/tmp/sccache.log
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.8
|
MACOSX_DEPLOYMENT_TARGET=10.7
|
||||||
MACOSX_STD_DEPLOYMENT_TARGET=10.7
|
|
||||||
os: osx
|
os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode7
|
||||||
install: *osx_install_sccache
|
install:
|
||||||
|
- travis_retry brew update
|
||||||
|
- travis_retry brew install xz
|
||||||
|
- *osx_install_sccache
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
@@ -133,14 +156,15 @@ before_script:
|
|||||||
script:
|
script:
|
||||||
- >
|
- >
|
||||||
if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
|
if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
|
||||||
echo skipping, not a full build;
|
echo skipping, not a full build
|
||||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
else
|
||||||
travis_retry stamp sh -c 'git submodule deinit -f . && git submodule update --init' &&
|
stamp src/ci/init_repo.sh . "$HOME/rustsrc" &&
|
||||||
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
stamp src/ci/run.sh;
|
stamp src/ci/run.sh;
|
||||||
else
|
else
|
||||||
travis_retry stamp sh -c 'git submodule deinit -f . && git submodule update --init' &&
|
|
||||||
stamp src/ci/docker/run.sh $IMAGE;
|
stamp src/ci/docker/run.sh $IMAGE;
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- >
|
- >
|
||||||
@@ -169,6 +193,9 @@ after_failure:
|
|||||||
- dmesg | grep -i kill
|
- dmesg | grep -i kill
|
||||||
|
|
||||||
# Save tagged docker images we created and load them if they're available
|
# Save tagged docker images we created and load them if they're available
|
||||||
|
# Travis saves caches whether the build failed or not, nuke rustsrc if
|
||||||
|
# the failure was while updating it (as it may be in an bad state)
|
||||||
|
# https://github.com/travis-ci/travis-ci/issues/4472
|
||||||
before_cache:
|
before_cache:
|
||||||
- docker history -q rust-ci |
|
- docker history -q rust-ci |
|
||||||
grep -v missing |
|
grep -v missing |
|
||||||
@@ -176,6 +203,7 @@ before_cache:
|
|||||||
gzip > $HOME/docker/rust-ci.tar.gz
|
gzip > $HOME/docker/rust-ci.tar.gz
|
||||||
before_install:
|
before_install:
|
||||||
- zcat $HOME/docker/rust-ci.tar.gz | docker load || true
|
- zcat $HOME/docker/rust-ci.tar.gz | docker load || true
|
||||||
|
- mkdir -p $HOME/rustsrc
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|||||||
@@ -198,8 +198,8 @@ The Rust community congregates in a few places:
|
|||||||
* [users.rust-lang.org] - General discussion and broader questions.
|
* [users.rust-lang.org] - General discussion and broader questions.
|
||||||
* [/r/rust] - News and general discussion.
|
* [/r/rust] - News and general discussion.
|
||||||
|
|
||||||
[Stack Overflow]: http://stackoverflow.com/questions/tagged/rust
|
[Stack Overflow]: https://stackoverflow.com/questions/tagged/rust
|
||||||
[/r/rust]: http://reddit.com/r/rust
|
[/r/rust]: https://reddit.com/r/rust
|
||||||
[users.rust-lang.org]: https://users.rust-lang.org/
|
[users.rust-lang.org]: https://users.rust-lang.org/
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
768
RELEASES.md
768
RELEASES.md
@@ -949,44 +949,33 @@ Version 1.12.0 (2016-09-29)
|
|||||||
Highlights
|
Highlights
|
||||||
----------
|
----------
|
||||||
|
|
||||||
* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)]
|
* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
|
||||||
(https://github.com/rust-lang/rust/pull/34096).
|
|
||||||
This translation pass is far simpler than the previous AST->LLVM pass, and
|
This translation pass is far simpler than the previous AST->LLVM pass, and
|
||||||
creates opportunities to perform new optimizations directly on the MIR. It
|
creates opportunities to perform new optimizations directly on the MIR. It
|
||||||
was previously described [on the Rust blog]
|
was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
|
||||||
(https://blog.rust-lang.org/2016/04/19/MIR.html).
|
|
||||||
* [`rustc` presents a new, more readable error format, along with
|
* [`rustc` presents a new, more readable error format, along with
|
||||||
machine-readable JSON error output for use by IDEs]
|
machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
|
||||||
(https://github.com/rust-lang/rust/pull/35401).
|
|
||||||
Most common editors supporting Rust have been updated to work with it. It was
|
Most common editors supporting Rust have been updated to work with it. It was
|
||||||
previously described [on the Rust blog]
|
previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
|
||||||
(https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
|
|
||||||
|
|
||||||
Compiler
|
Compiler
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)]
|
* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
|
||||||
(https://github.com/rust-lang/rust/pull/34096).
|
|
||||||
This translation pass is far simpler than the previous AST->LLVM pass, and
|
This translation pass is far simpler than the previous AST->LLVM pass, and
|
||||||
creates opportunities to perform new optimizations directly on the MIR. It
|
creates opportunities to perform new optimizations directly on the MIR. It
|
||||||
was previously described [on the Rust blog]
|
was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
|
||||||
(https://blog.rust-lang.org/2016/04/19/MIR.html).
|
|
||||||
* [Print the Rust target name, not the LLVM target name, with
|
* [Print the Rust target name, not the LLVM target name, with
|
||||||
`--print target-list`]
|
`--print target-list`](https://github.com/rust-lang/rust/pull/35489)
|
||||||
(https://github.com/rust-lang/rust/pull/35489)
|
|
||||||
* [The computation of `TypeId` is correct in some cases where it was previously
|
* [The computation of `TypeId` is correct in some cases where it was previously
|
||||||
producing inconsistent results]
|
producing inconsistent results](https://github.com/rust-lang/rust/pull/35267)
|
||||||
(https://github.com/rust-lang/rust/pull/35267)
|
* [The `mips-unknown-linux-gnu` target uses hardware floating point by default](https://github.com/rust-lang/rust/pull/34910)
|
||||||
* [The `mips-unknown-linux-gnu` target uses hardware floating point by default]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34910)
|
|
||||||
* [The `rustc` arguments, `--print target-cpus`, `--print target-features`,
|
* [The `rustc` arguments, `--print target-cpus`, `--print target-features`,
|
||||||
`--print relocation-models`, and `--print code-models` print the available
|
`--print relocation-models`, and `--print code-models` print the available
|
||||||
options to the `-C target-cpu`, `-C target-feature`, `-C relocation-model` and
|
options to the `-C target-cpu`, `-C target-feature`, `-C relocation-model` and
|
||||||
`-C code-model` code generation arguments]
|
`-C code-model` code generation arguments](https://github.com/rust-lang/rust/pull/34845)
|
||||||
(https://github.com/rust-lang/rust/pull/34845)
|
|
||||||
* [`rustc` supports three new MUSL targets on ARM: `arm-unknown-linux-musleabi`,
|
* [`rustc` supports three new MUSL targets on ARM: `arm-unknown-linux-musleabi`,
|
||||||
`arm-unknown-linux-musleabihf`, and `armv7-unknown-linux-musleabihf`]
|
`arm-unknown-linux-musleabihf`, and `armv7-unknown-linux-musleabihf`](https://github.com/rust-lang/rust/pull/35060).
|
||||||
(https://github.com/rust-lang/rust/pull/35060).
|
|
||||||
These targets produce statically-linked binaries. There are no binary release
|
These targets produce statically-linked binaries. There are no binary release
|
||||||
builds yet though.
|
builds yet though.
|
||||||
|
|
||||||
@@ -994,209 +983,134 @@ Diagnostics
|
|||||||
-----------
|
-----------
|
||||||
|
|
||||||
* [`rustc` presents a new, more readable error format, along with
|
* [`rustc` presents a new, more readable error format, along with
|
||||||
machine-readable JSON error output for use by IDEs]
|
machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
|
||||||
(https://github.com/rust-lang/rust/pull/35401).
|
|
||||||
Most common editors supporting Rust have been updated to work with it. It was
|
Most common editors supporting Rust have been updated to work with it. It was
|
||||||
previously described [on the Rust blog]
|
previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
|
||||||
(https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
|
|
||||||
* [In error descriptions, references are now described in plain English,
|
* [In error descriptions, references are now described in plain English,
|
||||||
instead of as "&-ptr"]
|
instead of as "&-ptr"](https://github.com/rust-lang/rust/pull/35611)
|
||||||
(https://github.com/rust-lang/rust/pull/35611)
|
|
||||||
* [In error type descriptions, unknown numeric types are named `{integer}` or
|
* [In error type descriptions, unknown numeric types are named `{integer}` or
|
||||||
`{float}` instead of `_`]
|
`{float}` instead of `_`](https://github.com/rust-lang/rust/pull/35080)
|
||||||
(https://github.com/rust-lang/rust/pull/35080)
|
* [`rustc` emits a clearer error when inner attributes follow a doc comment](https://github.com/rust-lang/rust/pull/34676)
|
||||||
* [`rustc` emits a clearer error when inner attributes follow a doc comment]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34676)
|
|
||||||
|
|
||||||
Language
|
Language
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* [`macro_rules!` invocations can be made within `macro_rules!` invocations]
|
* [`macro_rules!` invocations can be made within `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34925)
|
||||||
(https://github.com/rust-lang/rust/pull/34925)
|
* [`macro_rules!` meta-variables are hygienic](https://github.com/rust-lang/rust/pull/35453)
|
||||||
* [`macro_rules!` meta-variables are hygienic]
|
|
||||||
(https://github.com/rust-lang/rust/pull/35453)
|
|
||||||
* [`macro_rules!` `tt` matchers can be reparsed correctly, making them much more
|
* [`macro_rules!` `tt` matchers can be reparsed correctly, making them much more
|
||||||
useful]
|
useful](https://github.com/rust-lang/rust/pull/34908)
|
||||||
(https://github.com/rust-lang/rust/pull/34908)
|
|
||||||
* [`macro_rules!` `stmt` matchers correctly consume the entire contents when
|
* [`macro_rules!` `stmt` matchers correctly consume the entire contents when
|
||||||
inside non-braces invocations]
|
inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886)
|
||||||
(https://github.com/rust-lang/rust/pull/34886)
|
|
||||||
* [Semicolons are properly required as statement delimeters inside
|
* [Semicolons are properly required as statement delimeters inside
|
||||||
`macro_rules!` invocations]
|
`macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660)
|
||||||
(https://github.com/rust-lang/rust/pull/34660)
|
* [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546)
|
||||||
* [`cfg_attr` works on `path` attributes]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34546)
|
|
||||||
|
|
||||||
Stabilized APIs
|
Stabilized APIs
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
* [`Cell::as_ptr`]
|
* [`Cell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
|
||||||
(https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
|
* [`RefCell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
|
||||||
* [`RefCell::as_ptr`]
|
* [`IpAddr::is_unspecified`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_unspecified)
|
||||||
(https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
|
* [`IpAddr::is_loopback`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_loopback)
|
||||||
* [`IpAddr::is_unspecified`]
|
* [`IpAddr::is_multicast`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_multicast)
|
||||||
(https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_unspecified)
|
* [`Ipv4Addr::is_unspecified`](https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified)
|
||||||
* [`IpAddr::is_loopback`]
|
* [`Ipv6Addr::octets`](https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets)
|
||||||
(https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_loopback)
|
* [`LinkedList::contains`](https://doc.rust-lang.org/std/collections/linked_list/struct.LinkedList.html#method.contains)
|
||||||
* [`IpAddr::is_multicast`]
|
* [`VecDeque::contains`](https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.contains)
|
||||||
(https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_multicast)
|
* [`ExitStatusExt::from_raw`](https://doc.rust-lang.org/std/os/unix/process/trait.ExitStatusExt.html#tymethod.from_raw).
|
||||||
* [`Ipv4Addr::is_unspecified`]
|
|
||||||
(https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified)
|
|
||||||
* [`Ipv6Addr::octets`]
|
|
||||||
(https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets)
|
|
||||||
* [`LinkedList::contains`]
|
|
||||||
(https://doc.rust-lang.org/std/collections/linked_list/struct.LinkedList.html#method.contains)
|
|
||||||
* [`VecDeque::contains`]
|
|
||||||
(https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.contains)
|
|
||||||
* [`ExitStatusExt::from_raw`]
|
|
||||||
(https://doc.rust-lang.org/std/os/unix/process/trait.ExitStatusExt.html#tymethod.from_raw).
|
|
||||||
Both on Unix and Windows.
|
Both on Unix and Windows.
|
||||||
* [`Receiver::recv_timeout`]
|
* [`Receiver::recv_timeout`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv_timeout)
|
||||||
(https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv_timeout)
|
* [`RecvTimeoutError`](https://doc.rust-lang.org/std/sync/mpsc/enum.RecvTimeoutError.html)
|
||||||
* [`RecvTimeoutError`]
|
* [`BinaryHeap::peek_mut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.peek_mut)
|
||||||
(https://doc.rust-lang.org/std/sync/mpsc/enum.RecvTimeoutError.html)
|
* [`PeekMut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html)
|
||||||
* [`BinaryHeap::peek_mut`]
|
* [`iter::Product`](https://doc.rust-lang.org/std/iter/trait.Product.html)
|
||||||
(https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.peek_mut)
|
* [`iter::Sum`](https://doc.rust-lang.org/std/iter/trait.Sum.html)
|
||||||
* [`PeekMut`]
|
* [`OccupiedEntry::remove_entry`](https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedEntry.html#method.remove_entry)
|
||||||
(https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html)
|
* [`VacantEntry::into_key`](https://doc.rust-lang.org/std/collections/btree_map/struct.VacantEntry.html#method.into_key)
|
||||||
* [`iter::Product`]
|
|
||||||
(https://doc.rust-lang.org/std/iter/trait.Product.html)
|
|
||||||
* [`iter::Sum`]
|
|
||||||
(https://doc.rust-lang.org/std/iter/trait.Sum.html)
|
|
||||||
* [`OccupiedEntry::remove_entry`]
|
|
||||||
(https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedEntry.html#method.remove_entry)
|
|
||||||
* [`VacantEntry::into_key`]
|
|
||||||
(https://doc.rust-lang.org/std/collections/btree_map/struct.VacantEntry.html#method.into_key)
|
|
||||||
|
|
||||||
Libraries
|
Libraries
|
||||||
---------
|
---------
|
||||||
|
|
||||||
* [The `format!` macro and friends now allow a single argument to be formatted
|
* [The `format!` macro and friends now allow a single argument to be formatted
|
||||||
in multiple styles]
|
in multiple styles](https://github.com/rust-lang/rust/pull/33642)
|
||||||
(https://github.com/rust-lang/rust/pull/33642)
|
|
||||||
* [The lifetime bounds on `[T]::binary_search_by` and
|
* [The lifetime bounds on `[T]::binary_search_by` and
|
||||||
`[T]::binary_search_by_key` have been adjusted to be more flexible]
|
`[T]::binary_search_by_key` have been adjusted to be more flexible](https://github.com/rust-lang/rust/pull/34762)
|
||||||
(https://github.com/rust-lang/rust/pull/34762)
|
* [`Option` implements `From` for its contained type](https://github.com/rust-lang/rust/pull/34828)
|
||||||
* [`Option` implements `From` for its contained type]
|
* [`Cell`, `RefCell` and `UnsafeCell` implement `From` for their contained type](https://github.com/rust-lang/rust/pull/35392)
|
||||||
(https://github.com/rust-lang/rust/pull/34828)
|
* [`RwLock` panics if the reader count overflows](https://github.com/rust-lang/rust/pull/35378)
|
||||||
* [`Cell`, `RefCell` and `UnsafeCell` implement `From` for their contained type]
|
* [`vec_deque::Drain`, `hash_map::Drain` and `hash_set::Drain` are covariant](https://github.com/rust-lang/rust/pull/35354)
|
||||||
(https://github.com/rust-lang/rust/pull/35392)
|
* [`vec::Drain` and `binary_heap::Drain` are covariant](https://github.com/rust-lang/rust/pull/34951)
|
||||||
* [`RwLock` panics if the reader count overflows]
|
* [`Cow<str>` implements `FromIterator` for `char`, `&str` and `String`](https://github.com/rust-lang/rust/pull/35064)
|
||||||
(https://github.com/rust-lang/rust/pull/35378)
|
* [Sockets on Linux are correctly closed in subprocesses via `SOCK_CLOEXEC`](https://github.com/rust-lang/rust/pull/34946)
|
||||||
* [`vec_deque::Drain`, `hash_map::Drain` and `hash_set::Drain` are covariant]
|
|
||||||
(https://github.com/rust-lang/rust/pull/35354)
|
|
||||||
* [`vec::Drain` and `binary_heap::Drain` are covariant]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34951)
|
|
||||||
* [`Cow<str>` implements `FromIterator` for `char`, `&str` and `String`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/35064)
|
|
||||||
* [Sockets on Linux are correctly closed in subprocesses via `SOCK_CLOEXEC`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34946)
|
|
||||||
* [`hash_map::Entry`, `hash_map::VacantEntry` and `hash_map::OccupiedEntry`
|
* [`hash_map::Entry`, `hash_map::VacantEntry` and `hash_map::OccupiedEntry`
|
||||||
implement `Debug`]
|
implement `Debug`](https://github.com/rust-lang/rust/pull/34937)
|
||||||
(https://github.com/rust-lang/rust/pull/34937)
|
|
||||||
* [`btree_map::Entry`, `btree_map::VacantEntry` and `btree_map::OccupiedEntry`
|
* [`btree_map::Entry`, `btree_map::VacantEntry` and `btree_map::OccupiedEntry`
|
||||||
implement `Debug`]
|
implement `Debug`](https://github.com/rust-lang/rust/pull/34885)
|
||||||
(https://github.com/rust-lang/rust/pull/34885)
|
* [`String` implements `AddAssign`](https://github.com/rust-lang/rust/pull/34890)
|
||||||
* [`String` implements `AddAssign`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34890)
|
|
||||||
* [Variadic `extern fn` pointers implement the `Clone`, `PartialEq`, `Eq`,
|
* [Variadic `extern fn` pointers implement the `Clone`, `PartialEq`, `Eq`,
|
||||||
`PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and `fmt::Debug` traits]
|
`PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and `fmt::Debug` traits](https://github.com/rust-lang/rust/pull/34879)
|
||||||
(https://github.com/rust-lang/rust/pull/34879)
|
* [`FileType` implements `Debug`](https://github.com/rust-lang/rust/pull/34757)
|
||||||
* [`FileType` implements `Debug`]
|
* [References to `Mutex` and `RwLock` are unwind-safe](https://github.com/rust-lang/rust/pull/34756)
|
||||||
(https://github.com/rust-lang/rust/pull/34757)
|
|
||||||
* [References to `Mutex` and `RwLock` are unwind-safe]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34756)
|
|
||||||
* [`mpsc::sync_channel` `Receiver`s return any available message before
|
* [`mpsc::sync_channel` `Receiver`s return any available message before
|
||||||
reporting a disconnect]
|
reporting a disconnect](https://github.com/rust-lang/rust/pull/34731)
|
||||||
(https://github.com/rust-lang/rust/pull/34731)
|
* [Unicode definitions have been updated to 9.0](https://github.com/rust-lang/rust/pull/34599)
|
||||||
* [Unicode definitions have been updated to 9.0]
|
* [`env` iterators implement `DoubleEndedIterator`](https://github.com/rust-lang/rust/pull/33312)
|
||||||
(https://github.com/rust-lang/rust/pull/34599)
|
|
||||||
* [`env` iterators implement `DoubleEndedIterator`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33312)
|
|
||||||
|
|
||||||
Cargo
|
Cargo
|
||||||
-----
|
-----
|
||||||
|
|
||||||
* [Support local mirrors of registries]
|
* [Support local mirrors of registries](https://github.com/rust-lang/cargo/pull/2857)
|
||||||
(https://github.com/rust-lang/cargo/pull/2857)
|
* [Add support for command aliases](https://github.com/rust-lang/cargo/pull/2679)
|
||||||
* [Add support for command aliases]
|
* [Allow `opt-level="s"` / `opt-level="z"` in profile overrides](https://github.com/rust-lang/cargo/pull/3007)
|
||||||
(https://github.com/rust-lang/cargo/pull/2679)
|
* [Make `cargo doc --open --target` work as expected](https://github.com/rust-lang/cargo/pull/2988)
|
||||||
* [Allow `opt-level="s"` / `opt-level="z"` in profile overrides]
|
* [Speed up noop registry updates](https://github.com/rust-lang/cargo/pull/2974)
|
||||||
(https://github.com/rust-lang/cargo/pull/3007)
|
* [Update OpenSSL](https://github.com/rust-lang/cargo/pull/2971)
|
||||||
* [Make `cargo doc --open --target` work as expected]
|
* [Fix `--panic=abort` with plugins](https://github.com/rust-lang/cargo/pull/2954)
|
||||||
(https://github.com/rust-lang/cargo/pull/2988)
|
* [Always pass `-C metadata` to the compiler](https://github.com/rust-lang/cargo/pull/2946)
|
||||||
* [Speed up noop registry updates]
|
* [Fix depending on git repos with workspaces](https://github.com/rust-lang/cargo/pull/2938)
|
||||||
(https://github.com/rust-lang/cargo/pull/2974)
|
* [Add a `--lib` flag to `cargo new`](https://github.com/rust-lang/cargo/pull/2921)
|
||||||
* [Update OpenSSL]
|
* [Add `http.cainfo` for custom certs](https://github.com/rust-lang/cargo/pull/2917)
|
||||||
(https://github.com/rust-lang/cargo/pull/2971)
|
* [Indicate the compilation profile after compiling](https://github.com/rust-lang/cargo/pull/2909)
|
||||||
* [Fix `--panic=abort` with plugins]
|
* [Allow enabling features for dependencies with `--features`](https://github.com/rust-lang/cargo/pull/2876)
|
||||||
(https://github.com/rust-lang/cargo/pull/2954)
|
* [Add `--jobs` flag to `cargo package`](https://github.com/rust-lang/cargo/pull/2867)
|
||||||
* [Always pass `-C metadata` to the compiler]
|
* [Add `--dry-run` to `cargo publish`](https://github.com/rust-lang/cargo/pull/2849)
|
||||||
(https://github.com/rust-lang/cargo/pull/2946)
|
* [Add support for `RUSTDOCFLAGS`](https://github.com/rust-lang/cargo/pull/2794)
|
||||||
* [Fix depending on git repos with workspaces]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2938)
|
|
||||||
* [Add a `--lib` flag to `cargo new`]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2921)
|
|
||||||
* [Add `http.cainfo` for custom certs]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2917)
|
|
||||||
* [Indicate the compilation profile after compiling]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2909)
|
|
||||||
* [Allow enabling features for dependencies with `--features`]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2876)
|
|
||||||
* [Add `--jobs` flag to `cargo package`]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2867)
|
|
||||||
* [Add `--dry-run` to `cargo publish`]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2849)
|
|
||||||
* [Add support for `RUSTDOCFLAGS`]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2794)
|
|
||||||
|
|
||||||
Performance
|
Performance
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
* [`panic::catch_unwind` is more optimized]
|
* [`panic::catch_unwind` is more optimized](https://github.com/rust-lang/rust/pull/35444)
|
||||||
(https://github.com/rust-lang/rust/pull/35444)
|
* [`panic::catch_unwind` no longer accesses thread-local storage on entry](https://github.com/rust-lang/rust/pull/34866)
|
||||||
* [`panic::catch_unwind` no longer accesses thread-local storage on entry]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34866)
|
|
||||||
|
|
||||||
Tooling
|
Tooling
|
||||||
-------
|
-------
|
||||||
|
|
||||||
* [Test binaries now support a `--test-threads` argument to specify the number
|
* [Test binaries now support a `--test-threads` argument to specify the number
|
||||||
of threads used to run tests, and which acts the same as the
|
of threads used to run tests, and which acts the same as the
|
||||||
`RUST_TEST_THREADS` environment variable]
|
`RUST_TEST_THREADS` environment variable](https://github.com/rust-lang/rust/pull/35414)
|
||||||
(https://github.com/rust-lang/rust/pull/35414)
|
* [The test runner now emits a warning when tests run over 60 seconds](https://github.com/rust-lang/rust/pull/35405)
|
||||||
* [The test runner now emits a warning when tests run over 60 seconds]
|
* [rustdoc: Fix methods in search results](https://github.com/rust-lang/rust/pull/34752)
|
||||||
(https://github.com/rust-lang/rust/pull/35405)
|
* [`rust-lldb` warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
|
||||||
* [rustdoc: Fix methods in search results]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34752)
|
|
||||||
* [`rust-lldb` warns about unsupported versions of LLDB]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34646)
|
|
||||||
* [Rust releases now come with source packages that can be installed by rustup
|
* [Rust releases now come with source packages that can be installed by rustup
|
||||||
via `rustup component add rust-src`]
|
via `rustup component add rust-src`](https://github.com/rust-lang/rust/pull/34366).
|
||||||
(https://github.com/rust-lang/rust/pull/34366).
|
|
||||||
The resulting source code can be used by tools and IDES, located in the
|
The resulting source code can be used by tools and IDES, located in the
|
||||||
sysroot under `lib/rustlib/src`.
|
sysroot under `lib/rustlib/src`.
|
||||||
|
|
||||||
Misc
|
Misc
|
||||||
----
|
----
|
||||||
|
|
||||||
* [The compiler can now be built against LLVM 3.9]
|
* [The compiler can now be built against LLVM 3.9](https://github.com/rust-lang/rust/pull/35594)
|
||||||
(https://github.com/rust-lang/rust/pull/35594)
|
|
||||||
* Many minor improvements to the documentation.
|
* Many minor improvements to the documentation.
|
||||||
* [The Rust exception handling "personality" routine is now written in Rust]
|
* [The Rust exception handling "personality" routine is now written in Rust](https://github.com/rust-lang/rust/pull/34832)
|
||||||
(https://github.com/rust-lang/rust/pull/34832)
|
|
||||||
|
|
||||||
Compatibility Notes
|
Compatibility Notes
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
* [When printing Windows `OsStr`s, unpaired surrogate codepoints are escaped
|
* [When printing Windows `OsStr`s, unpaired surrogate codepoints are escaped
|
||||||
with the lowercase format instead of the uppercase]
|
with the lowercase format instead of the uppercase](https://github.com/rust-lang/rust/pull/35084)
|
||||||
(https://github.com/rust-lang/rust/pull/35084)
|
|
||||||
* [When formatting strings, if "precision" is specified, the "fill",
|
* [When formatting strings, if "precision" is specified, the "fill",
|
||||||
"align" and "width" specifiers are no longer ignored]
|
"align" and "width" specifiers are no longer ignored](https://github.com/rust-lang/rust/pull/34544)
|
||||||
(https://github.com/rust-lang/rust/pull/34544)
|
* [The `Debug` impl for strings no longer escapes all non-ASCII characters](https://github.com/rust-lang/rust/pull/34485)
|
||||||
* [The `Debug` impl for strings no longer escapes all non-ASCII characters]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34485)
|
|
||||||
|
|
||||||
|
|
||||||
Version 1.11.0 (2016-08-18)
|
Version 1.11.0 (2016-08-18)
|
||||||
@@ -1205,142 +1119,92 @@ Version 1.11.0 (2016-08-18)
|
|||||||
Language
|
Language
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* [`cfg_attr` works on `path` attributes]
|
* [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546)
|
||||||
(https://github.com/rust-lang/rust/pull/34546)
|
* [Support nested `cfg_attr` attributes](https://github.com/rust-lang/rust/pull/34216)
|
||||||
* [Support nested `cfg_attr` attributes]
|
* [Allow statement-generating braced macro invocations at the end of blocks](https://github.com/rust-lang/rust/pull/34436)
|
||||||
(https://github.com/rust-lang/rust/pull/34216)
|
* [Macros can be expanded inside of trait definitions](https://github.com/rust-lang/rust/pull/34213)
|
||||||
* [Allow statement-generating braced macro invocations at the end of blocks]
|
* [`#[macro_use]` works properly when it is itself expanded from a macro](https://github.com/rust-lang/rust/pull/34032)
|
||||||
(https://github.com/rust-lang/rust/pull/34436)
|
|
||||||
* [Macros can be expanded inside of trait definitions]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34213)
|
|
||||||
* [`#[macro_use]` works properly when it is itself expanded from a macro]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34032)
|
|
||||||
|
|
||||||
Stabilized APIs
|
Stabilized APIs
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
* [`BinaryHeap::append`]
|
* [`BinaryHeap::append`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
|
||||||
(https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
|
* [`BTreeMap::append`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
|
||||||
* [`BTreeMap::append`]
|
* [`BTreeMap::split_off`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
|
||||||
(https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
|
* [`BTreeSet::append`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
|
||||||
* [`BTreeMap::split_off`]
|
* [`BTreeSet::split_off`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
|
||||||
(https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
|
* [`f32::to_degrees`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
|
||||||
* [`BTreeSet::append`]
|
|
||||||
(https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
|
|
||||||
* [`BTreeSet::split_off`]
|
|
||||||
(https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
|
|
||||||
* [`f32::to_degrees`]
|
|
||||||
(https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
|
|
||||||
(in libcore - previously stabilized in libstd)
|
(in libcore - previously stabilized in libstd)
|
||||||
* [`f32::to_radians`]
|
* [`f32::to_radians`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
|
||||||
(https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
|
|
||||||
(in libcore - previously stabilized in libstd)
|
(in libcore - previously stabilized in libstd)
|
||||||
* [`f64::to_degrees`]
|
* [`f64::to_degrees`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
|
||||||
(https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
|
|
||||||
(in libcore - previously stabilized in libstd)
|
(in libcore - previously stabilized in libstd)
|
||||||
* [`f64::to_radians`]
|
* [`f64::to_radians`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
|
||||||
(https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
|
|
||||||
(in libcore - previously stabilized in libstd)
|
(in libcore - previously stabilized in libstd)
|
||||||
* [`Iterator::sum`]
|
* [`Iterator::sum`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
|
||||||
(https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
|
* [`Iterator::product`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
|
||||||
* [`Iterator::product`]
|
* [`Cell::get_mut`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
|
||||||
(https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
|
* [`RefCell::get_mut`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
|
||||||
* [`Cell::get_mut`]
|
|
||||||
(https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
|
|
||||||
* [`RefCell::get_mut`]
|
|
||||||
(https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
|
|
||||||
|
|
||||||
Libraries
|
Libraries
|
||||||
---------
|
---------
|
||||||
|
|
||||||
* [The `thread_local!` macro supports multiple definitions in a single
|
* [The `thread_local!` macro supports multiple definitions in a single
|
||||||
invocation, and can apply attributes]
|
invocation, and can apply attributes](https://github.com/rust-lang/rust/pull/34077)
|
||||||
(https://github.com/rust-lang/rust/pull/34077)
|
* [`Cow` implements `Default`](https://github.com/rust-lang/rust/pull/34305)
|
||||||
* [`Cow` implements `Default`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34305)
|
|
||||||
* [`Wrapping` implements binary, octal, lower-hex and upper-hex
|
* [`Wrapping` implements binary, octal, lower-hex and upper-hex
|
||||||
`Display` formatting]
|
`Display` formatting](https://github.com/rust-lang/rust/pull/34190)
|
||||||
(https://github.com/rust-lang/rust/pull/34190)
|
* [The range types implement `Hash`](https://github.com/rust-lang/rust/pull/34180)
|
||||||
* [The range types implement `Hash`]
|
* [`lookup_host` ignores unknown address types](https://github.com/rust-lang/rust/pull/34067)
|
||||||
(https://github.com/rust-lang/rust/pull/34180)
|
* [`assert_eq!` accepts a custom error message, like `assert!` does](https://github.com/rust-lang/rust/pull/33976)
|
||||||
* [`lookup_host` ignores unknown address types]
|
* [The main thread is now called "main" instead of "<main>"](https://github.com/rust-lang/rust/pull/33803)
|
||||||
(https://github.com/rust-lang/rust/pull/34067)
|
|
||||||
* [`assert_eq!` accepts a custom error message, like `assert!` does]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33976)
|
|
||||||
* [The main thread is now called "main" instead of "<main>"]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33803)
|
|
||||||
|
|
||||||
Cargo
|
Cargo
|
||||||
-----
|
-----
|
||||||
|
|
||||||
* [Disallow specifying features of transitive deps]
|
* [Disallow specifying features of transitive deps](https://github.com/rust-lang/cargo/pull/2821)
|
||||||
(https://github.com/rust-lang/cargo/pull/2821)
|
* [Add color support for Windows consoles](https://github.com/rust-lang/cargo/pull/2804)
|
||||||
* [Add color support for Windows consoles]
|
* [Fix `harness = false` on `[lib]` sections](https://github.com/rust-lang/cargo/pull/2795)
|
||||||
(https://github.com/rust-lang/cargo/pull/2804)
|
* [Don't panic when `links` contains a '.'](https://github.com/rust-lang/cargo/pull/2787)
|
||||||
* [Fix `harness = false` on `[lib]` sections]
|
* [Build scripts can emit warnings](https://github.com/rust-lang/cargo/pull/2630),
|
||||||
(https://github.com/rust-lang/cargo/pull/2795)
|
|
||||||
* [Don't panic when `links` contains a '.']
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2787)
|
|
||||||
* [Build scripts can emit warnings]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2630),
|
|
||||||
and `-vv` prints warnings for all crates.
|
and `-vv` prints warnings for all crates.
|
||||||
* [Ignore file locks on OS X NFS mounts]
|
* [Ignore file locks on OS X NFS mounts](https://github.com/rust-lang/cargo/pull/2720)
|
||||||
(https://github.com/rust-lang/cargo/pull/2720)
|
* [Don't warn about `package.metadata` keys](https://github.com/rust-lang/cargo/pull/2668).
|
||||||
* [Don't warn about `package.metadata` keys]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2668).
|
|
||||||
This provides room for expansion by arbitrary tools.
|
This provides room for expansion by arbitrary tools.
|
||||||
* [Add support for cdylib crate types]
|
* [Add support for cdylib crate types](https://github.com/rust-lang/cargo/pull/2741)
|
||||||
(https://github.com/rust-lang/cargo/pull/2741)
|
* [Prevent publishing crates when files are dirty](https://github.com/rust-lang/cargo/pull/2781)
|
||||||
* [Prevent publishing crates when files are dirty]
|
* [Don't fetch all crates on clean](https://github.com/rust-lang/cargo/pull/2704)
|
||||||
(https://github.com/rust-lang/cargo/pull/2781)
|
* [Propagate --color option to rustc](https://github.com/rust-lang/cargo/pull/2779)
|
||||||
* [Don't fetch all crates on clean]
|
* [Fix `cargo doc --open` on Windows](https://github.com/rust-lang/cargo/pull/2780)
|
||||||
(https://github.com/rust-lang/cargo/pull/2704)
|
* [Improve autocompletion](https://github.com/rust-lang/cargo/pull/2772)
|
||||||
* [Propagate --color option to rustc]
|
* [Configure colors of stderr as well as stdout](https://github.com/rust-lang/cargo/pull/2739)
|
||||||
(https://github.com/rust-lang/cargo/pull/2779)
|
|
||||||
* [Fix `cargo doc --open` on Windows]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2780)
|
|
||||||
* [Improve autocompletion]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2772)
|
|
||||||
* [Configure colors of stderr as well as stdout]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2739)
|
|
||||||
|
|
||||||
Performance
|
Performance
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
* [Caching projections speeds up type check dramatically for some
|
* [Caching projections speeds up type check dramatically for some
|
||||||
workloads]
|
workloads](https://github.com/rust-lang/rust/pull/33816)
|
||||||
(https://github.com/rust-lang/rust/pull/33816)
|
* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4](https://github.com/rust-lang/rust/pull/33940)
|
||||||
* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33940)
|
|
||||||
This hasher is faster, but is believed to provide sufficient
|
This hasher is faster, but is believed to provide sufficient
|
||||||
protection from collision attacks.
|
protection from collision attacks.
|
||||||
* [Comparison of `Ipv4Addr` is 10x faster]
|
* [Comparison of `Ipv4Addr` is 10x faster](https://github.com/rust-lang/rust/pull/33891)
|
||||||
(https://github.com/rust-lang/rust/pull/33891)
|
|
||||||
|
|
||||||
Rustdoc
|
Rustdoc
|
||||||
-------
|
-------
|
||||||
|
|
||||||
* [Fix empty implementation section on some module pages]
|
* [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
|
||||||
(https://github.com/rust-lang/rust/pull/34536)
|
* [Fix inlined renamed reexports in import lists](https://github.com/rust-lang/rust/pull/34479)
|
||||||
* [Fix inlined renamed reexports in import lists]
|
* [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
|
||||||
(https://github.com/rust-lang/rust/pull/34479)
|
* [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
|
||||||
* [Fix search result layout for enum variants and struct fields]
|
* [Fix redirect pages for renamed reexports](https://github.com/rust-lang/rust/pull/34245)
|
||||||
(https://github.com/rust-lang/rust/pull/34477)
|
|
||||||
* [Fix issues with source links to external crates]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34387)
|
|
||||||
* [Fix redirect pages for renamed reexports]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34245)
|
|
||||||
|
|
||||||
Tooling
|
Tooling
|
||||||
-------
|
-------
|
||||||
|
|
||||||
* [rustc is better at finding the MSVC toolchain]
|
* [rustc is better at finding the MSVC toolchain](https://github.com/rust-lang/rust/pull/34492)
|
||||||
(https://github.com/rust-lang/rust/pull/34492)
|
|
||||||
* [When emitting debug info, rustc emits frame pointers for closures,
|
* [When emitting debug info, rustc emits frame pointers for closures,
|
||||||
shims and glue, as it does for all other functions]
|
shims and glue, as it does for all other functions](https://github.com/rust-lang/rust/pull/33909)
|
||||||
(https://github.com/rust-lang/rust/pull/33909)
|
* [rust-lldb warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
|
||||||
* [rust-lldb warns about unsupported versions of LLDB]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34646)
|
|
||||||
* Many more errors have been given error codes and extended
|
* Many more errors have been given error codes and extended
|
||||||
explanations
|
explanations
|
||||||
* API documentation continues to be improved, with many new examples
|
* API documentation continues to be improved, with many new examples
|
||||||
@@ -1349,30 +1213,22 @@ Misc
|
|||||||
----
|
----
|
||||||
|
|
||||||
* [rustc no longer hangs when dependencies recursively re-export
|
* [rustc no longer hangs when dependencies recursively re-export
|
||||||
submodules]
|
submodules](https://github.com/rust-lang/rust/pull/34542)
|
||||||
(https://github.com/rust-lang/rust/pull/34542)
|
* [rustc requires LLVM 3.7+](https://github.com/rust-lang/rust/pull/34104)
|
||||||
* [rustc requires LLVM 3.7+]
|
|
||||||
(https://github.com/rust-lang/rust/pull/34104)
|
|
||||||
* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
|
* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
|
||||||
rewritten]
|
rewritten](https://github.com/rust-lang/rust/pull/33895)
|
||||||
(https://github.com/rust-lang/rust/pull/33895)
|
* [rustc support 16-bit pointer sizes](https://github.com/rust-lang/rust/pull/33460).
|
||||||
* [rustc support 16-bit pointer sizes]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33460).
|
|
||||||
No targets use this yet, but it works toward AVR support.
|
No targets use this yet, but it works toward AVR support.
|
||||||
|
|
||||||
Compatibility Notes
|
Compatibility Notes
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
* [`const`s and `static`s may not have unsized types]
|
* [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443)
|
||||||
(https://github.com/rust-lang/rust/pull/34443)
|
|
||||||
* [The new follow-set rules that place restrictions on `macro_rules!`
|
* [The new follow-set rules that place restrictions on `macro_rules!`
|
||||||
in order to ensure syntax forward-compatibility have been enabled]
|
in order to ensure syntax forward-compatibility have been enabled](https://github.com/rust-lang/rust/pull/33982)
|
||||||
(https://github.com/rust-lang/rust/pull/33982)
|
This was an [ammendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384),
|
||||||
This was an [ammendment to RFC 550]
|
|
||||||
(https://github.com/rust-lang/rfcs/pull/1384),
|
|
||||||
and has been a warning since 1.10.
|
and has been a warning since 1.10.
|
||||||
* [`cfg` attribute process has been refactored to fix various bugs]
|
* [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706).
|
||||||
(https://github.com/rust-lang/rust/pull/33706).
|
|
||||||
This causes breakage in some corner cases.
|
This causes breakage in some corner cases.
|
||||||
|
|
||||||
|
|
||||||
@@ -1383,21 +1239,15 @@ Language
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
* [Allow `concat_idents!` in type positions as well as in expression
|
* [Allow `concat_idents!` in type positions as well as in expression
|
||||||
positions]
|
positions](https://github.com/rust-lang/rust/pull/33735).
|
||||||
(https://github.com/rust-lang/rust/pull/33735).
|
* [`Copy` types are required to have a trivial implementation of `Clone`](https://github.com/rust-lang/rust/pull/33420).
|
||||||
* [`Copy` types are required to have a trivial implementation of `Clone`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33420).
|
|
||||||
[RFC 1521](https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md).
|
[RFC 1521](https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md).
|
||||||
* [Single-variant enums support the `#[repr(..)]` attribute]
|
* [Single-variant enums support the `#[repr(..)]` attribute](https://github.com/rust-lang/rust/pull/33355).
|
||||||
(https://github.com/rust-lang/rust/pull/33355).
|
* [Fix `#[derive(RustcEncodable)]` in the presence of other `encode` methods](https://github.com/rust-lang/rust/pull/32908).
|
||||||
* [Fix `#[derive(RustcEncodable)]` in the presence of other `encode` methods]
|
|
||||||
(https://github.com/rust-lang/rust/pull/32908).
|
|
||||||
* [`panic!` can be converted to a runtime abort with the
|
* [`panic!` can be converted to a runtime abort with the
|
||||||
`-C panic=abort` flag]
|
`-C panic=abort` flag](https://github.com/rust-lang/rust/pull/32900).
|
||||||
(https://github.com/rust-lang/rust/pull/32900).
|
|
||||||
[RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
|
[RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
|
||||||
* [Add a new crate type, 'cdylib']
|
* [Add a new crate type, 'cdylib'](https://github.com/rust-lang/rust/pull/33553).
|
||||||
(https://github.com/rust-lang/rust/pull/33553).
|
|
||||||
cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
|
cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
|
||||||
[RFC 1510](https://github.com/rust-lang/rfcs/blob/master/text/1510-rdylib.md).
|
[RFC 1510](https://github.com/rust-lang/rfcs/blob/master/text/1510-rdylib.md).
|
||||||
Note that Cargo does not yet directly support cdylibs.
|
Note that Cargo does not yet directly support cdylibs.
|
||||||
@@ -1411,242 +1261,146 @@ Stabilized APIs
|
|||||||
* `os::windows::fs::OpenOptionsExt::attributes`
|
* `os::windows::fs::OpenOptionsExt::attributes`
|
||||||
* `os::windows::fs::OpenOptionsExt::security_qos_flags`
|
* `os::windows::fs::OpenOptionsExt::security_qos_flags`
|
||||||
* `os::unix::fs::OpenOptionsExt::custom_flags`
|
* `os::unix::fs::OpenOptionsExt::custom_flags`
|
||||||
* [`sync::Weak::new`]
|
* [`sync::Weak::new`](http://doc.rust-lang.org/alloc/arc/struct.Weak.html#method.new)
|
||||||
(http://doc.rust-lang.org/alloc/arc/struct.Weak.html#method.new)
|
|
||||||
* `Default for sync::Weak`
|
* `Default for sync::Weak`
|
||||||
* [`panic::set_hook`]
|
* [`panic::set_hook`](http://doc.rust-lang.org/std/panic/fn.set_hook.html)
|
||||||
(http://doc.rust-lang.org/std/panic/fn.set_hook.html)
|
* [`panic::take_hook`](http://doc.rust-lang.org/std/panic/fn.take_hook.html)
|
||||||
* [`panic::take_hook`]
|
* [`panic::PanicInfo`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html)
|
||||||
(http://doc.rust-lang.org/std/panic/fn.take_hook.html)
|
* [`panic::PanicInfo::payload`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.payload)
|
||||||
* [`panic::PanicInfo`]
|
* [`panic::PanicInfo::location`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.location)
|
||||||
(http://doc.rust-lang.org/std/panic/struct.PanicInfo.html)
|
* [`panic::Location`](http://doc.rust-lang.org/std/panic/struct.Location.html)
|
||||||
* [`panic::PanicInfo::payload`]
|
* [`panic::Location::file`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.file)
|
||||||
(http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.payload)
|
* [`panic::Location::line`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.line)
|
||||||
* [`panic::PanicInfo::location`]
|
* [`ffi::CStr::from_bytes_with_nul`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
|
||||||
(http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.location)
|
* [`ffi::CStr::from_bytes_with_nul_unchecked`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked)
|
||||||
* [`panic::Location`]
|
* [`ffi::FromBytesWithNulError`](http://doc.rust-lang.org/std/ffi/struct.FromBytesWithNulError.html)
|
||||||
(http://doc.rust-lang.org/std/panic/struct.Location.html)
|
* [`fs::Metadata::modified`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified)
|
||||||
* [`panic::Location::file`]
|
* [`fs::Metadata::accessed`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed)
|
||||||
(http://doc.rust-lang.org/std/panic/struct.Location.html#method.file)
|
* [`fs::Metadata::created`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created)
|
||||||
* [`panic::Location::line`]
|
|
||||||
(http://doc.rust-lang.org/std/panic/struct.Location.html#method.line)
|
|
||||||
* [`ffi::CStr::from_bytes_with_nul`]
|
|
||||||
(http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
|
|
||||||
* [`ffi::CStr::from_bytes_with_nul_unchecked`]
|
|
||||||
(http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked)
|
|
||||||
* [`ffi::FromBytesWithNulError`]
|
|
||||||
(http://doc.rust-lang.org/std/ffi/struct.FromBytesWithNulError.html)
|
|
||||||
* [`fs::Metadata::modified`]
|
|
||||||
(http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified)
|
|
||||||
* [`fs::Metadata::accessed`]
|
|
||||||
(http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed)
|
|
||||||
* [`fs::Metadata::created`]
|
|
||||||
(http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created)
|
|
||||||
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
|
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
|
||||||
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
|
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
|
||||||
* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
|
* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
|
||||||
* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
|
* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
|
||||||
* [`SocketAddr::is_unnamed`]
|
* [`SocketAddr::is_unnamed`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.is_unnamed)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.is_unnamed)
|
* [`SocketAddr::as_pathname`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.as_pathname)
|
||||||
* [`SocketAddr::as_pathname`]
|
* [`UnixStream::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.connect)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.as_pathname)
|
* [`UnixStream::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.pair)
|
||||||
* [`UnixStream::connect`]
|
* [`UnixStream::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.try_clone)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.connect)
|
* [`UnixStream::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.local_addr)
|
||||||
* [`UnixStream::pair`]
|
* [`UnixStream::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.peer_addr)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.pair)
|
* [`UnixStream::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
|
||||||
* [`UnixStream::try_clone`]
|
* [`UnixStream::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.try_clone)
|
* [`UnixStream::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
|
||||||
* [`UnixStream::local_addr`]
|
* [`UnixStream::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.local_addr)
|
* [`UnixStream::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.set_nonblocking)
|
||||||
* [`UnixStream::peer_addr`]
|
* [`UnixStream::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.take_error)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.peer_addr)
|
* [`UnixStream::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.shutdown)
|
||||||
* [`UnixStream::set_read_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
|
|
||||||
* [`UnixStream::set_write_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
|
|
||||||
* [`UnixStream::read_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
|
|
||||||
* [`UnixStream::write_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
|
|
||||||
* [`UnixStream::set_nonblocking`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.set_nonblocking)
|
|
||||||
* [`UnixStream::take_error`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.take_error)
|
|
||||||
* [`UnixStream::shutdown`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.shutdown)
|
|
||||||
* Read/Write/RawFd impls for `UnixStream`
|
* Read/Write/RawFd impls for `UnixStream`
|
||||||
* [`UnixListener::bind`]
|
* [`UnixListener::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.bind)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.bind)
|
* [`UnixListener::accept`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.accept)
|
||||||
* [`UnixListener::accept`]
|
* [`UnixListener::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.try_clone)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.accept)
|
* [`UnixListener::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.local_addr)
|
||||||
* [`UnixListener::try_clone`]
|
* [`UnixListener::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.set_nonblocking)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.try_clone)
|
* [`UnixListener::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.take_error)
|
||||||
* [`UnixListener::local_addr`]
|
* [`UnixListener::incoming`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.incoming)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.local_addr)
|
|
||||||
* [`UnixListener::set_nonblocking`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.set_nonblocking)
|
|
||||||
* [`UnixListener::take_error`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.take_error)
|
|
||||||
* [`UnixListener::incoming`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.incoming)
|
|
||||||
* RawFd impls for `UnixListener`
|
* RawFd impls for `UnixListener`
|
||||||
* [`UnixDatagram::bind`]
|
* [`UnixDatagram::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.bind)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.bind)
|
* [`UnixDatagram::unbound`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.unbound)
|
||||||
* [`UnixDatagram::unbound`]
|
* [`UnixDatagram::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.pair)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.unbound)
|
* [`UnixDatagram::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.connect)
|
||||||
* [`UnixDatagram::pair`]
|
* [`UnixDatagram::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.try_clone)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.pair)
|
* [`UnixDatagram::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.local_addr)
|
||||||
* [`UnixDatagram::connect`]
|
* [`UnixDatagram::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.peer_addr)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.connect)
|
* [`UnixDatagram::recv_from`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv_from)
|
||||||
* [`UnixDatagram::try_clone`]
|
* [`UnixDatagram::recv`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.try_clone)
|
* [`UnixDatagram::send_to`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send_to)
|
||||||
* [`UnixDatagram::local_addr`]
|
* [`UnixDatagram::send`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.local_addr)
|
* [`UnixDatagram::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_read_timeout)
|
||||||
* [`UnixDatagram::peer_addr`]
|
* [`UnixDatagram::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_write_timeout)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.peer_addr)
|
* [`UnixDatagram::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.read_timeout)
|
||||||
* [`UnixDatagram::recv_from`]
|
* [`UnixDatagram::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.write_timeout)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv_from)
|
* [`UnixDatagram::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_nonblocking)
|
||||||
* [`UnixDatagram::recv`]
|
* [`UnixDatagram::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.take_error)
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv)
|
* [`UnixDatagram::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.shutdown)
|
||||||
* [`UnixDatagram::send_to`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send_to)
|
|
||||||
* [`UnixDatagram::send`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send)
|
|
||||||
* [`UnixDatagram::set_read_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_read_timeout)
|
|
||||||
* [`UnixDatagram::set_write_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_write_timeout)
|
|
||||||
* [`UnixDatagram::read_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.read_timeout)
|
|
||||||
* [`UnixDatagram::write_timeout`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.write_timeout)
|
|
||||||
* [`UnixDatagram::set_nonblocking`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_nonblocking)
|
|
||||||
* [`UnixDatagram::take_error`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.take_error)
|
|
||||||
* [`UnixDatagram::shutdown`]
|
|
||||||
(http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.shutdown)
|
|
||||||
* RawFd impls for `UnixDatagram`
|
* RawFd impls for `UnixDatagram`
|
||||||
* `{BTree,Hash}Map::values_mut`
|
* `{BTree,Hash}Map::values_mut`
|
||||||
* [`<[_]>::binary_search_by_key`]
|
* [`<[_]>::binary_search_by_key`](http://doc.rust-lang.org/beta/std/primitive.slice.html#method.binary_search_by_key)
|
||||||
(http://doc.rust-lang.org/beta/std/primitive.slice.html#method.binary_search_by_key)
|
|
||||||
|
|
||||||
Libraries
|
Libraries
|
||||||
---------
|
---------
|
||||||
|
|
||||||
* [The `abs_sub` method of floats is deprecated]
|
* [The `abs_sub` method of floats is deprecated](https://github.com/rust-lang/rust/pull/33664).
|
||||||
(https://github.com/rust-lang/rust/pull/33664).
|
|
||||||
The semantics of this minor method are subtle and probably not what
|
The semantics of this minor method are subtle and probably not what
|
||||||
most people want.
|
most people want.
|
||||||
* [Add implementation of Ord for Cell<T> and RefCell<T> where T: Ord]
|
* [Add implementation of Ord for Cell<T> and RefCell<T> where T: Ord](https://github.com/rust-lang/rust/pull/33306).
|
||||||
(https://github.com/rust-lang/rust/pull/33306).
|
|
||||||
* [On Linux, if `HashMap`s can't be initialized with `getrandom` they
|
* [On Linux, if `HashMap`s can't be initialized with `getrandom` they
|
||||||
will fall back to `/dev/urandom` temporarily to avoid blocking
|
will fall back to `/dev/urandom` temporarily to avoid blocking
|
||||||
during early boot]
|
during early boot](https://github.com/rust-lang/rust/pull/33086).
|
||||||
(https://github.com/rust-lang/rust/pull/33086).
|
* [Implemented negation for wrapping numerals](https://github.com/rust-lang/rust/pull/33067).
|
||||||
* [Implemented negation for wrapping numerals]
|
* [Implement `Clone` for `binary_heap::IntoIter`](https://github.com/rust-lang/rust/pull/33050).
|
||||||
(https://github.com/rust-lang/rust/pull/33067).
|
* [Implement `Display` and `Hash` for `std::num::Wrapping`](https://github.com/rust-lang/rust/pull/33023).
|
||||||
* [Implement `Clone` for `binary_heap::IntoIter`]
|
* [Add `Default` implementation for `&CStr`, `CString`](https://github.com/rust-lang/rust/pull/32990).
|
||||||
(https://github.com/rust-lang/rust/pull/33050).
|
* [Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`](https://github.com/rust-lang/rust/pull/32866).
|
||||||
* [Implement `Display` and `Hash` for `std::num::Wrapping`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33023).
|
|
||||||
* [Add `Default` implementation for `&CStr`, `CString`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/32990).
|
|
||||||
* [Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/32866).
|
|
||||||
* [Implement `Default` for `UnsafeCell`, `fmt::Error`, `Condvar`,
|
* [Implement `Default` for `UnsafeCell`, `fmt::Error`, `Condvar`,
|
||||||
`Mutex`, `RwLock`]
|
`Mutex`, `RwLock`](https://github.com/rust-lang/rust/pull/32785).
|
||||||
(https://github.com/rust-lang/rust/pull/32785).
|
|
||||||
|
|
||||||
Cargo
|
Cargo
|
||||||
-----
|
-----
|
||||||
* [Cargo.toml supports the `profile.*.panic` option]
|
* [Cargo.toml supports the `profile.*.panic` option](https://github.com/rust-lang/cargo/pull/2687).
|
||||||
(https://github.com/rust-lang/cargo/pull/2687).
|
|
||||||
This controls the runtime behavior of the `panic!` macro
|
This controls the runtime behavior of the `panic!` macro
|
||||||
and can be either "unwind" (the default), or "abort".
|
and can be either "unwind" (the default), or "abort".
|
||||||
[RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
|
[RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
|
||||||
* [Don't throw away errors with `-p` arguments]
|
* [Don't throw away errors with `-p` arguments](https://github.com/rust-lang/cargo/pull/2723).
|
||||||
(https://github.com/rust-lang/cargo/pull/2723).
|
* [Report status to stderr instead of stdout](https://github.com/rust-lang/cargo/pull/2693).
|
||||||
* [Report status to stderr instead of stdout]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2693).
|
|
||||||
* [Build scripts are passed a `CARGO_MANIFEST_LINKS` environment
|
* [Build scripts are passed a `CARGO_MANIFEST_LINKS` environment
|
||||||
variable that corresponds to the `links` field of the manifest]
|
variable that corresponds to the `links` field of the manifest](https://github.com/rust-lang/cargo/pull/2710).
|
||||||
(https://github.com/rust-lang/cargo/pull/2710).
|
* [Ban keywords from crate names](https://github.com/rust-lang/cargo/pull/2707).
|
||||||
* [Ban keywords from crate names]
|
* [Canonicalize `CARGO_HOME` on Windows](https://github.com/rust-lang/cargo/pull/2604).
|
||||||
(https://github.com/rust-lang/cargo/pull/2707).
|
* [Retry network requests](https://github.com/rust-lang/cargo/pull/2396).
|
||||||
* [Canonicalize `CARGO_HOME` on Windows]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2604).
|
|
||||||
* [Retry network requests]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2396).
|
|
||||||
By default they are retried twice, which can be customized with the
|
By default they are retried twice, which can be customized with the
|
||||||
`net.retry` value in `.cargo/config`.
|
`net.retry` value in `.cargo/config`.
|
||||||
* [Don't print extra error info for failing subcommands]
|
* [Don't print extra error info for failing subcommands](https://github.com/rust-lang/cargo/pull/2674).
|
||||||
(https://github.com/rust-lang/cargo/pull/2674).
|
* [Add `--force` flag to `cargo install`](https://github.com/rust-lang/cargo/pull/2405).
|
||||||
* [Add `--force` flag to `cargo install`]
|
* [Don't use `flock` on NFS mounts](https://github.com/rust-lang/cargo/pull/2623).
|
||||||
(https://github.com/rust-lang/cargo/pull/2405).
|
* [Prefer building `cargo install` artifacts in temporary directories](https://github.com/rust-lang/cargo/pull/2610).
|
||||||
* [Don't use `flock` on NFS mounts]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2623).
|
|
||||||
* [Prefer building `cargo install` artifacts in temporary directories]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2610).
|
|
||||||
Makes it possible to install multiple crates in parallel.
|
Makes it possible to install multiple crates in parallel.
|
||||||
* [Add `cargo test --doc`]
|
* [Add `cargo test --doc`](https://github.com/rust-lang/cargo/pull/2578).
|
||||||
(https://github.com/rust-lang/cargo/pull/2578).
|
* [Add `cargo --explain`](https://github.com/rust-lang/cargo/pull/2551).
|
||||||
* [Add `cargo --explain`]
|
* [Don't print warnings when `-q` is passed](https://github.com/rust-lang/cargo/pull/2576).
|
||||||
(https://github.com/rust-lang/cargo/pull/2551).
|
* [Add `cargo doc --lib` and `--bin`](https://github.com/rust-lang/cargo/pull/2577).
|
||||||
* [Don't print warnings when `-q` is passed]
|
* [Don't require build script output to be UTF-8](https://github.com/rust-lang/cargo/pull/2560).
|
||||||
(https://github.com/rust-lang/cargo/pull/2576).
|
* [Correctly attempt multiple git usernames](https://github.com/rust-lang/cargo/pull/2584).
|
||||||
* [Add `cargo doc --lib` and `--bin`]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2577).
|
|
||||||
* [Don't require build script output to be UTF-8]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2560).
|
|
||||||
* [Correctly attempt multiple git usernames]
|
|
||||||
(https://github.com/rust-lang/cargo/pull/2584).
|
|
||||||
|
|
||||||
Performance
|
Performance
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
* [rustc memory usage was reduced by refactoring the context used for
|
* [rustc memory usage was reduced by refactoring the context used for
|
||||||
type checking]
|
type checking](https://github.com/rust-lang/rust/pull/33425).
|
||||||
(https://github.com/rust-lang/rust/pull/33425).
|
|
||||||
* [Speed up creation of `HashMap`s by caching the random keys used
|
* [Speed up creation of `HashMap`s by caching the random keys used
|
||||||
to initialize the hash state]
|
to initialize the hash state](https://github.com/rust-lang/rust/pull/33318).
|
||||||
(https://github.com/rust-lang/rust/pull/33318).
|
* [The `find` implementation for `Chain` iterators is 2x faster](https://github.com/rust-lang/rust/pull/33289).
|
||||||
* [The `find` implementation for `Chain` iterators is 2x faster]
|
* [Trait selection optimizations speed up type checking by 15%](https://github.com/rust-lang/rust/pull/33138).
|
||||||
(https://github.com/rust-lang/rust/pull/33289).
|
* [Efficient trie lookup for boolean Unicode properties](https://github.com/rust-lang/rust/pull/33098).
|
||||||
* [Trait selection optimizations speed up type checking by 15%]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33138).
|
|
||||||
* [Efficient trie lookup for boolean Unicode properties]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33098).
|
|
||||||
10x faster than the previous lookup tables.
|
10x faster than the previous lookup tables.
|
||||||
* [Special case `#[derive(Copy, Clone)]` to avoid bloat]
|
* [Special case `#[derive(Copy, Clone)]` to avoid bloat](https://github.com/rust-lang/rust/pull/31414).
|
||||||
(https://github.com/rust-lang/rust/pull/31414).
|
|
||||||
|
|
||||||
Usability
|
Usability
|
||||||
---------
|
---------
|
||||||
|
|
||||||
* Many incremental improvements to documentation and rustdoc.
|
* Many incremental improvements to documentation and rustdoc.
|
||||||
* [rustdoc: List blanket trait impls]
|
* [rustdoc: List blanket trait impls](https://github.com/rust-lang/rust/pull/33514).
|
||||||
(https://github.com/rust-lang/rust/pull/33514).
|
* [rustdoc: Clean up ABI rendering](https://github.com/rust-lang/rust/pull/33151).
|
||||||
* [rustdoc: Clean up ABI rendering]
|
* [Indexing with the wrong type produces a more informative error](https://github.com/rust-lang/rust/pull/33401).
|
||||||
(https://github.com/rust-lang/rust/pull/33151).
|
* [Improve diagnostics for constants being used in irrefutable patterns](https://github.com/rust-lang/rust/pull/33406).
|
||||||
* [Indexing with the wrong type produces a more informative error]
|
* [When many method candidates are in scope limit the suggestions to 10](https://github.com/rust-lang/rust/pull/33338).
|
||||||
(https://github.com/rust-lang/rust/pull/33401).
|
* [Remove confusing suggestion when calling a `fn` type](https://github.com/rust-lang/rust/pull/33325).
|
||||||
* [Improve diagnostics for constants being used in irrefutable patterns]
|
* [Do not suggest changing `&mut self` to `&mut mut self`](https://github.com/rust-lang/rust/pull/33319).
|
||||||
(https://github.com/rust-lang/rust/pull/33406).
|
|
||||||
* [When many method candidates are in scope limit the suggestions to 10]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33338).
|
|
||||||
* [Remove confusing suggestion when calling a `fn` type]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33325).
|
|
||||||
* [Do not suggest changing `&mut self` to `&mut mut self`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33319).
|
|
||||||
|
|
||||||
Misc
|
Misc
|
||||||
----
|
----
|
||||||
|
|
||||||
* [Update i686-linux-android features to match Android ABI]
|
* [Update i686-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33651).
|
||||||
(https://github.com/rust-lang/rust/pull/33651).
|
* [Update aarch64-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33500).
|
||||||
* [Update aarch64-linux-android features to match Android ABI]
|
|
||||||
(https://github.com/rust-lang/rust/pull/33500).
|
|
||||||
* [`std` no longer prints backtraces on platforms where the running
|
* [`std` no longer prints backtraces on platforms where the running
|
||||||
module must be loaded with `env::current_exe`, which can't be relied
|
module must be loaded with `env::current_exe`, which can't be relied
|
||||||
on](https://github.com/rust-lang/rust/pull/33554).
|
on](https://github.com/rust-lang/rust/pull/33554).
|
||||||
@@ -1657,34 +1411,24 @@ Misc
|
|||||||
* [The `rust-gdb` and `rust-lldb` scripts are distributed on all
|
* [The `rust-gdb` and `rust-lldb` scripts are distributed on all
|
||||||
Unix platforms](https://github.com/rust-lang/rust/pull/32835).
|
Unix platforms](https://github.com/rust-lang/rust/pull/32835).
|
||||||
* [On Unix the runtime aborts by calling `libc::abort` instead of
|
* [On Unix the runtime aborts by calling `libc::abort` instead of
|
||||||
generating an illegal instruction]
|
generating an illegal instruction](https://github.com/rust-lang/rust/pull/31457).
|
||||||
(https://github.com/rust-lang/rust/pull/31457).
|
|
||||||
* [Rust is now bootstrapped from the previous release of Rust,
|
* [Rust is now bootstrapped from the previous release of Rust,
|
||||||
instead of a snapshot from an arbitrary commit]
|
instead of a snapshot from an arbitrary commit](https://github.com/rust-lang/rust/pull/32942).
|
||||||
(https://github.com/rust-lang/rust/pull/32942).
|
|
||||||
|
|
||||||
Compatibility Notes
|
Compatibility Notes
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
* [`AtomicBool` is now bool-sized, not word-sized]
|
* [`AtomicBool` is now bool-sized, not word-sized](https://github.com/rust-lang/rust/pull/33579).
|
||||||
(https://github.com/rust-lang/rust/pull/33579).
|
|
||||||
* [`target_env` for Linux ARM targets is just `gnu`, not
|
* [`target_env` for Linux ARM targets is just `gnu`, not
|
||||||
`gnueabihf`, `gnueabi`, etc]
|
`gnueabihf`, `gnueabi`, etc](https://github.com/rust-lang/rust/pull/33403).
|
||||||
(https://github.com/rust-lang/rust/pull/33403).
|
* [Consistently panic on overflow in `Duration::new`](https://github.com/rust-lang/rust/pull/33072).
|
||||||
* [Consistently panic on overflow in `Duration::new`]
|
* [Change `String::truncate` to panic less](https://github.com/rust-lang/rust/pull/32977).
|
||||||
(https://github.com/rust-lang/rust/pull/33072).
|
* [Add `:block` to the follow set for `:ty` and `:path`](https://github.com/rust-lang/rust/pull/32945).
|
||||||
* [Change `String::truncate` to panic less]
|
|
||||||
(https://github.com/rust-lang/rust/pull/32977).
|
|
||||||
* [Add `:block` to the follow set for `:ty` and `:path`]
|
|
||||||
(https://github.com/rust-lang/rust/pull/32945).
|
|
||||||
Affects how macros are parsed.
|
Affects how macros are parsed.
|
||||||
* [Fix macro hygiene bug]
|
* [Fix macro hygiene bug](https://github.com/rust-lang/rust/pull/32923).
|
||||||
(https://github.com/rust-lang/rust/pull/32923).
|
|
||||||
* [Feature-gated attributes on macro-generated macro invocations are
|
* [Feature-gated attributes on macro-generated macro invocations are
|
||||||
now rejected]
|
now rejected](https://github.com/rust-lang/rust/pull/32791).
|
||||||
(https://github.com/rust-lang/rust/pull/32791).
|
* [Suppress fallback and ambiguity errors during type inference](https://github.com/rust-lang/rust/pull/32258).
|
||||||
* [Suppress fallback and ambiguity errors during type inference]
|
|
||||||
(https://github.com/rust-lang/rust/pull/32258).
|
|
||||||
This caused some minor changes to type inference.
|
This caused some minor changes to type inference.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
73
appveyor.yml
73
appveyor.yml
@@ -20,39 +20,28 @@ environment:
|
|||||||
|
|
||||||
# 32/64-bit MinGW builds.
|
# 32/64-bit MinGW builds.
|
||||||
#
|
#
|
||||||
# The MinGW builds unfortunately have to both download a custom toolchain and
|
# We are using MinGW with posix threads since LLVM does not compile with
|
||||||
# avoid the one installed by AppVeyor by default. Interestingly, though, for
|
# the win32 threads version due to missing support for C++'s std::thread.
|
||||||
# different reasons!
|
|
||||||
#
|
#
|
||||||
# For 32-bit the installed gcc toolchain on AppVeyor uses the pthread
|
# Instead of relying on the MinGW version installed on appveryor we download
|
||||||
# threading model. This is unfortunately not what we want, and if we compile
|
# and install one ourselves so we won't be surprised by changes to appveyor's
|
||||||
# with it then there's lots of link errors in the standard library (undefined
|
# build image.
|
||||||
# references to pthread symbols).
|
|
||||||
#
|
|
||||||
# For 64-bit the installed gcc toolchain is currently 5.3.0 which
|
|
||||||
# unfortunately segfaults on Windows with --enable-llvm-assertions (segfaults
|
|
||||||
# in LLVM). See rust-lang/rust#28445 for more information, but to work around
|
|
||||||
# this we go back in time to 4.9.2 specifically.
|
|
||||||
#
|
#
|
||||||
# Finally, note that the downloads below are all in the `rust-lang-ci` S3
|
# Finally, note that the downloads below are all in the `rust-lang-ci` S3
|
||||||
# bucket, but they cleraly didn't originate there! The downloads originally
|
# bucket, but they cleraly didn't originate there! The downloads originally
|
||||||
# came from the mingw-w64 SourceForge download site. Unfortunately
|
# came from the mingw-w64 SourceForge download site. Unfortunately
|
||||||
# SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
|
# SourceForge is notoriously flaky, so we mirror it on our own infrastructure.
|
||||||
#
|
|
||||||
# And as a final point of note, the 32-bit MinGW build using the makefiles do
|
|
||||||
# *not* use debug assertions and llvm assertions. This is because they take
|
|
||||||
# too long on appveyor and this is tested by rustbuild below.
|
|
||||||
- MSYS_BITS: 32
|
- MSYS_BITS: 32
|
||||||
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-ninja
|
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu
|
||||||
SCRIPT: python x.py test
|
SCRIPT: python x.py test
|
||||||
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
||||||
MINGW_ARCHIVE: i686-6.3.0-release-win32-dwarf-rt_v5-rev1.7z
|
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
|
||||||
MINGW_DIR: mingw32
|
MINGW_DIR: mingw32
|
||||||
- MSYS_BITS: 64
|
- MSYS_BITS: 64
|
||||||
SCRIPT: python x.py test
|
SCRIPT: python x.py test
|
||||||
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-ninja
|
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu
|
||||||
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
||||||
MINGW_ARCHIVE: x86_64-6.3.0-release-win32-seh-rt_v5-rev1.7z
|
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
|
||||||
MINGW_DIR: mingw64
|
MINGW_DIR: mingw64
|
||||||
|
|
||||||
# 32/64 bit MSVC and GNU deployment
|
# 32/64 bit MSVC and GNU deployment
|
||||||
@@ -68,17 +57,17 @@ environment:
|
|||||||
SCRIPT: python x.py dist
|
SCRIPT: python x.py dist
|
||||||
DEPLOY: 1
|
DEPLOY: 1
|
||||||
- MSYS_BITS: 32
|
- MSYS_BITS: 32
|
||||||
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended --enable-ninja
|
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended
|
||||||
SCRIPT: python x.py dist
|
SCRIPT: python x.py dist
|
||||||
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
||||||
MINGW_ARCHIVE: i686-6.3.0-release-win32-dwarf-rt_v5-rev1.7z
|
MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z
|
||||||
MINGW_DIR: mingw32
|
MINGW_DIR: mingw32
|
||||||
DEPLOY: 1
|
DEPLOY: 1
|
||||||
- MSYS_BITS: 64
|
- MSYS_BITS: 64
|
||||||
SCRIPT: python x.py dist
|
SCRIPT: python x.py dist
|
||||||
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended --enable-ninja
|
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended
|
||||||
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
|
||||||
MINGW_ARCHIVE: x86_64-6.3.0-release-win32-seh-rt_v5-rev1.7z
|
MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z
|
||||||
MINGW_DIR: mingw64
|
MINGW_DIR: mingw64
|
||||||
DEPLOY: 1
|
DEPLOY: 1
|
||||||
|
|
||||||
@@ -107,6 +96,26 @@ install:
|
|||||||
- if defined MINGW_URL 7z x -y %MINGW_ARCHIVE% > nul
|
- if defined MINGW_URL 7z x -y %MINGW_ARCHIVE% > nul
|
||||||
- if defined MINGW_URL set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
|
- if defined MINGW_URL set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
|
# Here we do a pretty heinous thing which is to mangle the MinGW installation
|
||||||
|
# we just had above. Currently, as of this writing, we're using MinGW-w64
|
||||||
|
# builds of gcc, and that's currently at 6.3.0. We use 6.3.0 as it appears to
|
||||||
|
# be the first version which contains a fix for #40546, builds randomly
|
||||||
|
# failing during LLVM due to ar.exe/ranlib.exe failures.
|
||||||
|
#
|
||||||
|
# Unfortunately, though, 6.3.0 *also* is the first version of MinGW-w64 builds
|
||||||
|
# to contain a regression in gdb (#40184). As a result if we were to use the
|
||||||
|
# gdb provided (7.11.1) then we would fail all debuginfo tests.
|
||||||
|
#
|
||||||
|
# In order to fix spurious failures (pretty high priority) we use 6.3.0. To
|
||||||
|
# avoid disabling gdb tests we download an *old* version of gdb, specifically
|
||||||
|
# that found inside the 6.2.0 distribution. We then overwrite the 6.3.0 gdb
|
||||||
|
# with the 6.2.0 gdb to get tests passing.
|
||||||
|
#
|
||||||
|
# Note that we don't literally overwrite the gdb.exe binary because it appears
|
||||||
|
# to just use gdborig.exe, so that's the binary we deal with instead.
|
||||||
|
- if defined MINGW_URL appveyor-retry appveyor DownloadFile %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe
|
||||||
|
- if defined MINGW_URL mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%\bin\gdborig.exe
|
||||||
|
|
||||||
# Otherwise pull in the MinGW installed on appveyor
|
# Otherwise pull in the MinGW installed on appveyor
|
||||||
- if NOT defined MINGW_URL set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
|
- if NOT defined MINGW_URL set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
|
||||||
|
|
||||||
@@ -115,8 +124,8 @@ install:
|
|||||||
- set PATH=C:\Python27;%PATH%
|
- set PATH=C:\Python27;%PATH%
|
||||||
|
|
||||||
# Download and install sccache
|
# Download and install sccache
|
||||||
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-pc-windows-msvc
|
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-pc-windows-msvc
|
||||||
- mv 2017-03-22-sccache-x86_64-pc-windows-msvc sccache.exe
|
- mv 2017-04-29-sccache-x86_64-pc-windows-msvc sccache.exe
|
||||||
- set PATH=%PATH%;%CD%
|
- set PATH=%PATH%;%CD%
|
||||||
|
|
||||||
# Download and install ninja
|
# Download and install ninja
|
||||||
@@ -124,6 +133,7 @@ install:
|
|||||||
# Note that this is originally from the github releases patch of Ninja
|
# Note that this is originally from the github releases patch of Ninja
|
||||||
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-15-ninja-win.zip
|
- appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-15-ninja-win.zip
|
||||||
- 7z x 2017-03-15-ninja-win.zip
|
- 7z x 2017-03-15-ninja-win.zip
|
||||||
|
- set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja
|
||||||
# - set PATH=%PATH%;%CD% -- this already happens above for sccache
|
# - set PATH=%PATH%;%CD% -- this already happens above for sccache
|
||||||
|
|
||||||
# Install InnoSetup to get `iscc` used to produce installers
|
# Install InnoSetup to get `iscc` used to produce installers
|
||||||
@@ -141,19 +151,14 @@ install:
|
|||||||
- set SCCACHE_ERROR_LOG=%CD%/sccache.log
|
- set SCCACHE_ERROR_LOG=%CD%/sccache.log
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- appveyor-retry sh -c 'git submodule deinit -f . && git submodule update --init'
|
- if not exist C:\cache\rustsrc\NUL mkdir C:\cache\rustsrc
|
||||||
|
- sh src/ci/init_repo.sh . /c/cache/rustsrc
|
||||||
- set SRC=.
|
- set SRC=.
|
||||||
- set NO_CCACHE=1
|
- set NO_CCACHE=1
|
||||||
- sh src/ci/run.sh
|
- sh src/ci/run.sh
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
- cat %CD%/sccache.log
|
- cat %CD%\sccache.log || exit 0
|
||||||
|
|
||||||
cache:
|
|
||||||
- "build/i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
|
||||||
- "build/x86_64-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
|
||||||
- "i686-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
|
||||||
- "x86_64-pc-windows-msvc/llvm -> src/rustllvm/llvm-rebuild-trigger"
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|||||||
1
cargo
1
cargo
Submodule cargo deleted from c995e9eb5a
4
configure
vendored
4
configure
vendored
@@ -445,7 +445,6 @@ opt dist-host-only 0 "only install bins for the host architecture"
|
|||||||
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
|
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
|
||||||
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
|
opt llvm-version-check 1 "check if the LLVM version is supported, build anyway"
|
||||||
opt codegen-tests 1 "run the src/test/codegen tests"
|
opt codegen-tests 1 "run the src/test/codegen tests"
|
||||||
opt save-analysis 0 "save API analysis data"
|
|
||||||
opt option-checking 1 "complain about unrecognized options in this configure script"
|
opt option-checking 1 "complain about unrecognized options in this configure script"
|
||||||
opt ninja 0 "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)"
|
opt ninja 0 "build LLVM using the Ninja generator (for MSVC, requires building in the correct environment)"
|
||||||
opt locked-deps 0 "force Cargo.lock to be up to date"
|
opt locked-deps 0 "force Cargo.lock to be up to date"
|
||||||
@@ -480,6 +479,7 @@ valopt i686-linux-android-ndk "" "i686-linux-android NDK standalone path"
|
|||||||
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
|
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
|
||||||
valopt armv7-linux-androideabi-ndk "" "armv7-linux-androideabi NDK standalone path"
|
valopt armv7-linux-androideabi-ndk "" "armv7-linux-androideabi NDK standalone path"
|
||||||
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
|
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
|
||||||
|
valopt x86_64-linux-android-ndk "" "x86_64-linux-android NDK standalone path"
|
||||||
valopt nacl-cross-path "" "NaCl SDK path (Pepper Canary is recommended). Must be absolute!"
|
valopt nacl-cross-path "" "NaCl SDK path (Pepper Canary is recommended). Must be absolute!"
|
||||||
valopt musl-root "/usr/local" "MUSL root installation directory (deprecated)"
|
valopt musl-root "/usr/local" "MUSL root installation directory (deprecated)"
|
||||||
valopt musl-root-x86_64 "" "x86_64-unknown-linux-musl install directory"
|
valopt musl-root-x86_64 "" "x86_64-unknown-linux-musl install directory"
|
||||||
@@ -510,7 +510,6 @@ valopt default-ar "ar" "the default ar"
|
|||||||
opt_nosave manage-submodules 1 "let the build manage the git submodules"
|
opt_nosave manage-submodules 1 "let the build manage the git submodules"
|
||||||
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
|
opt_nosave clang 0 "prefer clang to gcc for building the runtime"
|
||||||
opt_nosave jemalloc 1 "build liballoc with jemalloc"
|
opt_nosave jemalloc 1 "build liballoc with jemalloc"
|
||||||
opt elf-tls 1 "elf thread local storage on platforms where supported"
|
|
||||||
opt full-bootstrap 0 "build three compilers instead of two"
|
opt full-bootstrap 0 "build three compilers instead of two"
|
||||||
opt extended 0 "build an extended rust tool set"
|
opt extended 0 "build an extended rust tool set"
|
||||||
|
|
||||||
@@ -747,6 +746,7 @@ putvar CFG_AARCH64_LINUX_ANDROID_NDK
|
|||||||
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
|
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
|
||||||
putvar CFG_ARMV7_LINUX_ANDROIDEABI_NDK
|
putvar CFG_ARMV7_LINUX_ANDROIDEABI_NDK
|
||||||
putvar CFG_I686_LINUX_ANDROID_NDK
|
putvar CFG_I686_LINUX_ANDROID_NDK
|
||||||
|
putvar CFG_X86_64_LINUX_ANDROID_NDK
|
||||||
putvar CFG_NACL_CROSS_PATH
|
putvar CFG_NACL_CROSS_PATH
|
||||||
putvar CFG_MANDIR
|
putvar CFG_MANDIR
|
||||||
putvar CFG_DOCDIR
|
putvar CFG_DOCDIR
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Comma separated list of types of crates for the compiler to emit.
|
|||||||
\fB\-\-crate\-name\fR \fINAME\fR
|
\fB\-\-crate\-name\fR \fINAME\fR
|
||||||
Specify the name of the crate being built.
|
Specify the name of the crate being built.
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-emit\fR [asm|llvm\-bc|llvm\-ir|obj|link|dep\-info][=\fIPATH\fR]
|
\fB\-\-emit\fR [asm|llvm\-bc|llvm\-ir|obj|link|dep\-info|mir][=\fIPATH\fR]
|
||||||
Configure the output that \fBrustc\fR will produce. Each emission may also have
|
Configure the output that \fBrustc\fR will produce. Each emission may also have
|
||||||
an optional explicit output \fIPATH\fR specified for that particular emission
|
an optional explicit output \fIPATH\fR specified for that particular emission
|
||||||
kind. This path takes precedence over the \fB-o\fR option.
|
kind. This path takes precedence over the \fB-o\fR option.
|
||||||
|
|||||||
150
src/Cargo.lock
generated
150
src/Cargo.lock
generated
@@ -8,7 +8,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "aho-corasick"
|
name = "aho-corasick"
|
||||||
version = "0.6.2"
|
version = "0.6.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -27,7 +27,7 @@ version = "0.0.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"build_helper 0.1.0",
|
"build_helper 0.1.0",
|
||||||
"core 0.0.0",
|
"core 0.0.0",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.0.0",
|
"libc 0.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "0.8.0"
|
version = "0.8.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -75,10 +75,10 @@ dependencies = [
|
|||||||
"build_helper 0.1.0",
|
"build_helper 0.1.0",
|
||||||
"cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
"num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@@ -104,12 +104,12 @@ version = "0.1.0"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "2.21.1"
|
version = "2.22.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bitflags 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -122,7 +122,7 @@ name = "cmake"
|
|||||||
version = "0.1.22"
|
version = "0.1.22"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -140,14 +140,15 @@ version = "0.0.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"build_helper 0.1.0",
|
"build_helper 0.1.0",
|
||||||
"core 0.0.0",
|
"core 0.0.0",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "compiletest"
|
name = "compiletest"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -158,17 +159,14 @@ name = "core"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dtoa"
|
name = "diff"
|
||||||
version = "0.4.1"
|
version = "0.1.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "env_logger"
|
name = "dtoa"
|
||||||
version = "0.3.5"
|
version = "0.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "env_logger"
|
name = "env_logger"
|
||||||
@@ -196,7 +194,7 @@ name = "flate"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build_helper 0.1.0",
|
"build_helper 0.1.0",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -205,7 +203,7 @@ version = "0.0.0"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gcc"
|
name = "gcc"
|
||||||
version = "0.3.44"
|
version = "0.3.45"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -223,10 +221,10 @@ version = "0.0.0"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "handlebars"
|
name = "handlebars"
|
||||||
version = "0.25.1"
|
version = "0.25.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -251,7 +249,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "0.2.4"
|
version = "0.2.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -270,10 +268,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
name = "linkchecker"
|
name = "linkchecker"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "log"
|
|
||||||
version = "0.0.0"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.3.7"
|
version = "0.3.7"
|
||||||
@@ -281,12 +275,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mdbook"
|
name = "mdbook"
|
||||||
version = "0.0.18"
|
version = "0.0.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"handlebars 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"handlebars 0.25.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
"pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -311,7 +305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num_cpus"
|
name = "num_cpus"
|
||||||
version = "0.2.13"
|
version = "1.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -371,12 +365,12 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "qemu-test-client"
|
name = "pulldown-cmark"
|
||||||
version = "0.1.0"
|
version = "0.0.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
[[package]]
|
dependencies = [
|
||||||
name = "qemu-test-server"
|
"bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
version = "0.1.0"
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quick-error"
|
name = "quick-error"
|
||||||
@@ -395,7 +389,7 @@ name = "regex"
|
|||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex-syntax 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
"thread_local 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
@@ -407,6 +401,14 @@ name = "regex-syntax"
|
|||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "remote-test-client"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "remote-test-server"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rls-data"
|
name = "rls-data"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@@ -428,8 +430,8 @@ dependencies = [
|
|||||||
name = "rustbook"
|
name = "rustbook"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mdbook 0.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
"mdbook 0.0.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -439,7 +441,7 @@ dependencies = [
|
|||||||
"arena 0.0.0",
|
"arena 0.0.0",
|
||||||
"fmt_macros 0.0.0",
|
"fmt_macros 0.0.0",
|
||||||
"graphviz 0.0.0",
|
"graphviz 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
"rustc_bitflags 0.0.0",
|
"rustc_bitflags 0.0.0",
|
||||||
"rustc_const_math 0.0.0",
|
"rustc_const_math 0.0.0",
|
||||||
@@ -479,7 +481,7 @@ dependencies = [
|
|||||||
name = "rustc_back"
|
name = "rustc_back"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serialize 0.0.0",
|
"serialize 0.0.0",
|
||||||
"syntax 0.0.0",
|
"syntax 0.0.0",
|
||||||
]
|
]
|
||||||
@@ -493,7 +495,7 @@ name = "rustc_borrowck"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"graphviz 0.0.0",
|
"graphviz 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_data_structures 0.0.0",
|
"rustc_data_structures 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
@@ -507,8 +509,7 @@ name = "rustc_const_eval"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arena 0.0.0",
|
"arena 0.0.0",
|
||||||
"graphviz 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.0.0",
|
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
"rustc_const_math 0.0.0",
|
"rustc_const_math 0.0.0",
|
||||||
@@ -530,7 +531,7 @@ dependencies = [
|
|||||||
name = "rustc_data_structures"
|
name = "rustc_data_structures"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"serialize 0.0.0",
|
"serialize 0.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -539,8 +540,9 @@ name = "rustc_driver"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arena 0.0.0",
|
"arena 0.0.0",
|
||||||
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"graphviz 0.0.0",
|
"graphviz 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"proc_macro_plugin 0.0.0",
|
"proc_macro_plugin 0.0.0",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
@@ -579,7 +581,7 @@ name = "rustc_incremental"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"graphviz 0.0.0",
|
"graphviz 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_data_structures 0.0.0",
|
"rustc_data_structures 0.0.0",
|
||||||
"serialize 0.0.0",
|
"serialize 0.0.0",
|
||||||
@@ -591,7 +593,7 @@ dependencies = [
|
|||||||
name = "rustc_lint"
|
name = "rustc_lint"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
"rustc_const_eval 0.0.0",
|
"rustc_const_eval 0.0.0",
|
||||||
@@ -604,7 +606,7 @@ name = "rustc_llvm"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build_helper 0.1.0",
|
"build_helper 0.1.0",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc_bitflags 0.0.0",
|
"rustc_bitflags 0.0.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -623,7 +625,7 @@ name = "rustc_metadata"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"flate 0.0.0",
|
"flate 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"proc_macro 0.0.0",
|
"proc_macro 0.0.0",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
@@ -642,7 +644,7 @@ name = "rustc_mir"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"graphviz 0.0.0",
|
"graphviz 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_bitflags 0.0.0",
|
"rustc_bitflags 0.0.0",
|
||||||
"rustc_const_eval 0.0.0",
|
"rustc_const_eval 0.0.0",
|
||||||
@@ -666,7 +668,7 @@ dependencies = [
|
|||||||
name = "rustc_passes"
|
name = "rustc_passes"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_const_eval 0.0.0",
|
"rustc_const_eval 0.0.0",
|
||||||
"rustc_const_math 0.0.0",
|
"rustc_const_math 0.0.0",
|
||||||
@@ -705,7 +707,7 @@ name = "rustc_resolve"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arena 0.0.0",
|
"arena 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
"syntax 0.0.0",
|
"syntax 0.0.0",
|
||||||
@@ -716,11 +718,12 @@ dependencies = [
|
|||||||
name = "rustc_save_analysis"
|
name = "rustc_save_analysis"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rls-data 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rls-data 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rls-span 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rls-span 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rustc-serialize 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"rustc_typeck 0.0.0",
|
||||||
"syntax 0.0.0",
|
"syntax 0.0.0",
|
||||||
"syntax_pos 0.0.0",
|
"syntax_pos 0.0.0",
|
||||||
]
|
]
|
||||||
@@ -730,11 +733,10 @@ name = "rustc_trans"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"flate 0.0.0",
|
"flate 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
"rustc_bitflags 0.0.0",
|
"rustc_bitflags 0.0.0",
|
||||||
"rustc_const_eval 0.0.0",
|
|
||||||
"rustc_const_math 0.0.0",
|
"rustc_const_math 0.0.0",
|
||||||
"rustc_data_structures 0.0.0",
|
"rustc_data_structures 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
@@ -762,10 +764,9 @@ version = "0.0.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"arena 0.0.0",
|
"arena 0.0.0",
|
||||||
"fmt_macros 0.0.0",
|
"fmt_macros 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
"rustc_const_eval 0.0.0",
|
|
||||||
"rustc_const_math 0.0.0",
|
"rustc_const_math 0.0.0",
|
||||||
"rustc_data_structures 0.0.0",
|
"rustc_data_structures 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
@@ -780,11 +781,12 @@ version = "0.0.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"arena 0.0.0",
|
"arena 0.0.0",
|
||||||
"build_helper 0.1.0",
|
"build_helper 0.1.0",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.0.0",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc 0.0.0",
|
"rustc 0.0.0",
|
||||||
"rustc_back 0.0.0",
|
"rustc_back 0.0.0",
|
||||||
"rustc_const_eval 0.0.0",
|
|
||||||
"rustc_data_structures 0.0.0",
|
"rustc_data_structures 0.0.0",
|
||||||
"rustc_driver 0.0.0",
|
"rustc_driver 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
@@ -792,6 +794,7 @@ dependencies = [
|
|||||||
"rustc_metadata 0.0.0",
|
"rustc_metadata 0.0.0",
|
||||||
"rustc_resolve 0.0.0",
|
"rustc_resolve 0.0.0",
|
||||||
"rustc_trans 0.0.0",
|
"rustc_trans 0.0.0",
|
||||||
|
"rustc_typeck 0.0.0",
|
||||||
"serialize 0.0.0",
|
"serialize 0.0.0",
|
||||||
"syntax 0.0.0",
|
"syntax 0.0.0",
|
||||||
"syntax_pos 0.0.0",
|
"syntax_pos 0.0.0",
|
||||||
@@ -828,7 +831,7 @@ dependencies = [
|
|||||||
"collections 0.0.0",
|
"collections 0.0.0",
|
||||||
"compiler_builtins 0.0.0",
|
"compiler_builtins 0.0.0",
|
||||||
"core 0.0.0",
|
"core 0.0.0",
|
||||||
"gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.0.0",
|
"libc 0.0.0",
|
||||||
"panic_abort 0.0.0",
|
"panic_abort 0.0.0",
|
||||||
"panic_unwind 0.0.0",
|
"panic_unwind 0.0.0",
|
||||||
@@ -857,7 +860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
name = "syntax"
|
name = "syntax"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"rustc_bitflags 0.0.0",
|
"rustc_bitflags 0.0.0",
|
||||||
"rustc_data_structures 0.0.0",
|
"rustc_data_structures 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
@@ -870,7 +873,7 @@ name = "syntax_ext"
|
|||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fmt_macros 0.0.0",
|
"fmt_macros 0.0.0",
|
||||||
"log 0.0.0",
|
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"proc_macro 0.0.0",
|
"proc_macro 0.0.0",
|
||||||
"rustc_errors 0.0.0",
|
"rustc_errors 0.0.0",
|
||||||
"syntax 0.0.0",
|
"syntax 0.0.0",
|
||||||
@@ -988,31 +991,32 @@ version = "0.1.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
"checksum aho-corasick 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0638fd549427caa90c499814196d1b9e3725eb4d15d7339d6de073a680ed0ca2"
|
"checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"
|
||||||
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
|
"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"
|
||||||
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
|
"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"
|
||||||
"checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
|
"checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
|
||||||
"checksum bitflags 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e1ab483fc81a8143faa7203c4a3c02888ebd1a782e37e41fa34753ba9a162"
|
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
|
||||||
"checksum clap 2.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "74a80f603221c9cd9aa27a28f52af452850051598537bb6b359c38a7d61e5cda"
|
"checksum clap 2.22.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e17a4a72ffea176f77d6e2db609c6c919ef221f23862c9915e687fb54d833485"
|
||||||
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
|
"checksum cmake 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "d18d68987ed4c516dcc3e7913659bfa4076f5182eea4a7e0038bb060953e76ac"
|
||||||
|
"checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472"
|
||||||
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
|
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
|
||||||
"checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f"
|
|
||||||
"checksum env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e3856f1697098606fc6cb97a93de88ca3f3bc35bb878c725920e6e82ecf05e83"
|
"checksum env_logger 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e3856f1697098606fc6cb97a93de88ca3f3bc35bb878c725920e6e82ecf05e83"
|
||||||
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
|
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
|
||||||
"checksum gcc 0.3.44 (registry+https://github.com/rust-lang/crates.io-index)" = "a32cd40070d7611ab76343dcb3204b2bb28c8a9450989a83a3d590248142f439"
|
"checksum gcc 0.3.45 (registry+https://github.com/rust-lang/crates.io-index)" = "40899336fb50db0c78710f53e87afc54d8c7266fb76262fecc78ca1a7f09deae"
|
||||||
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
|
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
|
||||||
"checksum handlebars 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b2249f6f0dc5a3bb2b3b1a8f797dfccbc4b053344d773d654ad565e51427d335"
|
"checksum handlebars 0.25.2 (registry+https://github.com/rust-lang/crates.io-index)" = "663e1728d8037fb0d4e13bcd1b1909fb5d913690a9929eb385922df157c2ff8f"
|
||||||
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
|
"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c"
|
||||||
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
|
||||||
"checksum lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7291b1dd97d331f752620b02dfdbc231df7fc01bf282a00769e1cdb963c460dc"
|
"checksum lazy_static 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4732c563b9a21a406565c4747daa7b46742f082911ae4753f390dc9ec7ee1a97"
|
||||||
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
|
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
|
||||||
"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad"
|
"checksum log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5141eca02775a762cc6cd564d8d2c50f67c0ea3a372cbf1c51592b3e029e10ad"
|
||||||
"checksum mdbook 0.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "06a68e8738e42b38a02755d3ce5fa12d559e17acb238e4326cbc3cc056e65280"
|
"checksum mdbook 0.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "f1e2e9d848514dcfad4195788d0d42ae5153a477c191d75d5b84fab10f222fbd"
|
||||||
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
|
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
|
||||||
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
|
"checksum num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "e1cbfa3781f3fe73dc05321bed52a06d2d491eaa764c52335cf4399f046ece99"
|
||||||
"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3"
|
"checksum num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca313f1862c7ec3e0dfe8ace9fa91b1d9cb5c84ace3d00f5ec4216238e93c167"
|
||||||
"checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
|
"checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842"
|
||||||
"checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8"
|
"checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8"
|
||||||
|
"checksum pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab1e588ef8efd702c7ed9d2bd774db5e6f4d878bb5a1a9f371828fbdff6973"
|
||||||
"checksum pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1058d7bb927ca067656537eec4e02c2b4b70eaaa129664c5b90c111e20326f41"
|
"checksum pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1058d7bb927ca067656537eec4e02c2b4b70eaaa129664c5b90c111e20326f41"
|
||||||
"checksum quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0aad603e8d7fb67da22dbdf1f4b826ce8829e406124109e73cf1b2454b93a71c"
|
"checksum quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0aad603e8d7fb67da22dbdf1f4b826ce8829e406124109e73cf1b2454b93a71c"
|
||||||
"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01"
|
"checksum regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4278c17d0f6d62dfef0ab00028feb45bd7d2102843f80763474eeb1be8a10c01"
|
||||||
|
|||||||
@@ -11,8 +11,14 @@ members = [
|
|||||||
"tools/rustbook",
|
"tools/rustbook",
|
||||||
"tools/tidy",
|
"tools/tidy",
|
||||||
"tools/build-manifest",
|
"tools/build-manifest",
|
||||||
"tools/qemu-test-client",
|
"tools/remote-test-client",
|
||||||
"tools/qemu-test-server",
|
"tools/remote-test-server",
|
||||||
|
]
|
||||||
|
|
||||||
|
# These projects have their own Cargo.lock
|
||||||
|
exclude = [
|
||||||
|
"tools/cargo",
|
||||||
|
"tools/rls",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
|
# Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit
|
||||||
|
|||||||
@@ -23,11 +23,16 @@ name = "rustdoc"
|
|||||||
path = "bin/rustdoc.rs"
|
path = "bin/rustdoc.rs"
|
||||||
test = false
|
test = false
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "sccache-plus-cl"
|
||||||
|
path = "bin/sccache-plus-cl.rs"
|
||||||
|
test = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
build_helper = { path = "../build_helper" }
|
build_helper = { path = "../build_helper" }
|
||||||
cmake = "0.1.17"
|
cmake = "0.1.17"
|
||||||
filetime = "0.1"
|
filetime = "0.1"
|
||||||
num_cpus = "0.2"
|
num_cpus = "1.0"
|
||||||
toml = "0.1"
|
toml = "0.1"
|
||||||
getopts = "0.2"
|
getopts = "0.2"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ This is an in-progress README which is targeted at helping to explain how Rust
|
|||||||
is bootstrapped and in general some of the technical details of the build
|
is bootstrapped and in general some of the technical details of the build
|
||||||
system.
|
system.
|
||||||
|
|
||||||
> **Note**: This build system is currently under active development and is not
|
|
||||||
> intended to be the primarily used one just yet. The makefiles are currently
|
|
||||||
> the ones that are still "guaranteed to work" as much as possible at least.
|
|
||||||
|
|
||||||
## Using rustbuild
|
## Using rustbuild
|
||||||
|
|
||||||
The rustbuild build system has a primary entry point, a top level `x.py` script:
|
The rustbuild build system has a primary entry point, a top level `x.py` script:
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ fn main() {
|
|||||||
.arg(sysroot)
|
.arg(sysroot)
|
||||||
.env(bootstrap::util::dylib_path_var(),
|
.env(bootstrap::util::dylib_path_var(),
|
||||||
env::join_paths(&dylib_path).unwrap());
|
env::join_paths(&dylib_path).unwrap());
|
||||||
|
|
||||||
|
// Pass the `rustbuild` feature flag to crates which rustbuild is
|
||||||
|
// building. See the comment in bootstrap/lib.rs where this env var is
|
||||||
|
// set for more details.
|
||||||
|
if env::var_os("RUSTBUILD_UNSTABLE").is_some() {
|
||||||
|
cmd.arg("--cfg").arg("rustbuild");
|
||||||
|
}
|
||||||
|
|
||||||
std::process::exit(match cmd.status() {
|
std::process::exit(match cmd.status() {
|
||||||
Ok(s) => s.code().unwrap_or(1),
|
Ok(s) => s.code().unwrap_or(1),
|
||||||
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
|
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
|
||||||
|
|||||||
43
src/bootstrap/bin/sccache-plus-cl.rs
Normal file
43
src/bootstrap/bin/sccache-plus-cl.rs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
// file at the top-level directory of this distribution and at
|
||||||
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
extern crate gcc;
|
||||||
|
|
||||||
|
use std::env;
|
||||||
|
use std::process::{self, Command};
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let target = env::var("SCCACHE_TARGET").unwrap();
|
||||||
|
// Locate the actual compiler that we're invoking
|
||||||
|
env::remove_var("CC");
|
||||||
|
env::remove_var("CXX");
|
||||||
|
let mut cfg = gcc::Config::new();
|
||||||
|
cfg.cargo_metadata(false)
|
||||||
|
.out_dir("/")
|
||||||
|
.target(&target)
|
||||||
|
.host(&target)
|
||||||
|
.opt_level(0)
|
||||||
|
.debug(false);
|
||||||
|
let compiler = cfg.get_compiler();
|
||||||
|
|
||||||
|
// Invoke sccache with said compiler
|
||||||
|
let sccache_path = env::var_os("SCCACHE_PATH").unwrap();
|
||||||
|
let mut cmd = Command::new(&sccache_path);
|
||||||
|
cmd.arg(compiler.path());
|
||||||
|
for &(ref k, ref v) in compiler.env() {
|
||||||
|
cmd.env(k, v);
|
||||||
|
}
|
||||||
|
for arg in env::args().skip(1) {
|
||||||
|
cmd.arg(arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
let status = cmd.status().expect("failed to spawn");
|
||||||
|
process::exit(status.code().unwrap_or(2))
|
||||||
|
}
|
||||||
@@ -159,21 +159,20 @@ def format_build_time(duration):
|
|||||||
class RustBuild(object):
|
class RustBuild(object):
|
||||||
def download_stage0(self):
|
def download_stage0(self):
|
||||||
cache_dst = os.path.join(self.build_dir, "cache")
|
cache_dst = os.path.join(self.build_dir, "cache")
|
||||||
rustc_cache = os.path.join(cache_dst, self.stage0_rustc_date())
|
rustc_cache = os.path.join(cache_dst, self.stage0_date())
|
||||||
cargo_cache = os.path.join(cache_dst, self.stage0_cargo_rev())
|
|
||||||
if not os.path.exists(rustc_cache):
|
if not os.path.exists(rustc_cache):
|
||||||
os.makedirs(rustc_cache)
|
os.makedirs(rustc_cache)
|
||||||
if not os.path.exists(cargo_cache):
|
|
||||||
os.makedirs(cargo_cache)
|
rustc_channel = self.stage0_rustc_channel()
|
||||||
|
cargo_channel = self.stage0_cargo_channel()
|
||||||
|
|
||||||
if self.rustc().startswith(self.bin_root()) and \
|
if self.rustc().startswith(self.bin_root()) and \
|
||||||
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
|
(not os.path.exists(self.rustc()) or self.rustc_out_of_date()):
|
||||||
self.print_what_it_means_to_bootstrap()
|
self.print_what_it_means_to_bootstrap()
|
||||||
if os.path.exists(self.bin_root()):
|
if os.path.exists(self.bin_root()):
|
||||||
shutil.rmtree(self.bin_root())
|
shutil.rmtree(self.bin_root())
|
||||||
channel = self.stage0_rustc_channel()
|
filename = "rust-std-{}-{}.tar.gz".format(rustc_channel, self.build)
|
||||||
filename = "rust-std-{}-{}.tar.gz".format(channel, self.build)
|
url = self._download_url + "/dist/" + self.stage0_date()
|
||||||
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
|
|
||||||
tarball = os.path.join(rustc_cache, filename)
|
tarball = os.path.join(rustc_cache, filename)
|
||||||
if not os.path.exists(tarball):
|
if not os.path.exists(tarball):
|
||||||
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
||||||
@@ -181,8 +180,8 @@ class RustBuild(object):
|
|||||||
match="rust-std-" + self.build,
|
match="rust-std-" + self.build,
|
||||||
verbose=self.verbose)
|
verbose=self.verbose)
|
||||||
|
|
||||||
filename = "rustc-{}-{}.tar.gz".format(channel, self.build)
|
filename = "rustc-{}-{}.tar.gz".format(rustc_channel, self.build)
|
||||||
url = "https://static.rust-lang.org/dist/" + self.stage0_rustc_date()
|
url = self._download_url + "/dist/" + self.stage0_date()
|
||||||
tarball = os.path.join(rustc_cache, filename)
|
tarball = os.path.join(rustc_cache, filename)
|
||||||
if not os.path.exists(tarball):
|
if not os.path.exists(tarball):
|
||||||
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
||||||
@@ -190,20 +189,28 @@ class RustBuild(object):
|
|||||||
self.fix_executable(self.bin_root() + "/bin/rustc")
|
self.fix_executable(self.bin_root() + "/bin/rustc")
|
||||||
self.fix_executable(self.bin_root() + "/bin/rustdoc")
|
self.fix_executable(self.bin_root() + "/bin/rustdoc")
|
||||||
with open(self.rustc_stamp(), 'w') as f:
|
with open(self.rustc_stamp(), 'w') as f:
|
||||||
f.write(self.stage0_rustc_date())
|
f.write(self.stage0_date())
|
||||||
|
|
||||||
|
if "pc-windows-gnu" in self.build:
|
||||||
|
filename = "rust-mingw-{}-{}.tar.gz".format(rustc_channel, self.build)
|
||||||
|
url = self._download_url + "/dist/" + self.stage0_date()
|
||||||
|
tarball = os.path.join(rustc_cache, filename)
|
||||||
|
if not os.path.exists(tarball):
|
||||||
|
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
||||||
|
unpack(tarball, self.bin_root(), match="rust-mingw", verbose=self.verbose)
|
||||||
|
|
||||||
if self.cargo().startswith(self.bin_root()) and \
|
if self.cargo().startswith(self.bin_root()) and \
|
||||||
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
|
(not os.path.exists(self.cargo()) or self.cargo_out_of_date()):
|
||||||
self.print_what_it_means_to_bootstrap()
|
self.print_what_it_means_to_bootstrap()
|
||||||
filename = "cargo-nightly-{}.tar.gz".format(self.build)
|
filename = "cargo-{}-{}.tar.gz".format(cargo_channel, self.build)
|
||||||
url = "https://s3.amazonaws.com/rust-lang-ci/cargo-builds/" + self.stage0_cargo_rev()
|
url = self._download_url + "/dist/" + self.stage0_date()
|
||||||
tarball = os.path.join(cargo_cache, filename)
|
tarball = os.path.join(rustc_cache, filename)
|
||||||
if not os.path.exists(tarball):
|
if not os.path.exists(tarball):
|
||||||
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
get("{}/{}".format(url, filename), tarball, verbose=self.verbose)
|
||||||
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
|
unpack(tarball, self.bin_root(), match="cargo", verbose=self.verbose)
|
||||||
self.fix_executable(self.bin_root() + "/bin/cargo")
|
self.fix_executable(self.bin_root() + "/bin/cargo")
|
||||||
with open(self.cargo_stamp(), 'w') as f:
|
with open(self.cargo_stamp(), 'w') as f:
|
||||||
f.write(self.stage0_cargo_rev())
|
f.write(self.stage0_date())
|
||||||
|
|
||||||
def fix_executable(self, fname):
|
def fix_executable(self, fname):
|
||||||
# If we're on NixOS we need to change the path to the dynamic loader
|
# If we're on NixOS we need to change the path to the dynamic loader
|
||||||
@@ -258,15 +265,15 @@ class RustBuild(object):
|
|||||||
print("warning: failed to call patchelf: %s" % e)
|
print("warning: failed to call patchelf: %s" % e)
|
||||||
return
|
return
|
||||||
|
|
||||||
def stage0_cargo_rev(self):
|
def stage0_date(self):
|
||||||
return self._cargo_rev
|
return self._date
|
||||||
|
|
||||||
def stage0_rustc_date(self):
|
|
||||||
return self._rustc_date
|
|
||||||
|
|
||||||
def stage0_rustc_channel(self):
|
def stage0_rustc_channel(self):
|
||||||
return self._rustc_channel
|
return self._rustc_channel
|
||||||
|
|
||||||
|
def stage0_cargo_channel(self):
|
||||||
|
return self._cargo_channel
|
||||||
|
|
||||||
def rustc_stamp(self):
|
def rustc_stamp(self):
|
||||||
return os.path.join(self.bin_root(), '.rustc-stamp')
|
return os.path.join(self.bin_root(), '.rustc-stamp')
|
||||||
|
|
||||||
@@ -277,13 +284,13 @@ class RustBuild(object):
|
|||||||
if not os.path.exists(self.rustc_stamp()) or self.clean:
|
if not os.path.exists(self.rustc_stamp()) or self.clean:
|
||||||
return True
|
return True
|
||||||
with open(self.rustc_stamp(), 'r') as f:
|
with open(self.rustc_stamp(), 'r') as f:
|
||||||
return self.stage0_rustc_date() != f.read()
|
return self.stage0_date() != f.read()
|
||||||
|
|
||||||
def cargo_out_of_date(self):
|
def cargo_out_of_date(self):
|
||||||
if not os.path.exists(self.cargo_stamp()) or self.clean:
|
if not os.path.exists(self.cargo_stamp()) or self.clean:
|
||||||
return True
|
return True
|
||||||
with open(self.cargo_stamp(), 'r') as f:
|
with open(self.cargo_stamp(), 'r') as f:
|
||||||
return self.stage0_cargo_rev() != f.read()
|
return self.stage0_date() != f.read()
|
||||||
|
|
||||||
def bin_root(self):
|
def bin_root(self):
|
||||||
return os.path.join(self.build_dir, self.build, "stage0")
|
return os.path.join(self.build_dir, self.build, "stage0")
|
||||||
@@ -364,6 +371,9 @@ class RustBuild(object):
|
|||||||
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
|
env["DYLD_LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
|
||||||
(os.pathsep + env["DYLD_LIBRARY_PATH"]) \
|
(os.pathsep + env["DYLD_LIBRARY_PATH"]) \
|
||||||
if "DYLD_LIBRARY_PATH" in env else ""
|
if "DYLD_LIBRARY_PATH" in env else ""
|
||||||
|
env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \
|
||||||
|
(os.pathsep + env["LIBRARY_PATH"]) \
|
||||||
|
if "LIBRARY_PATH" in env else ""
|
||||||
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
|
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
|
||||||
os.pathsep + env["PATH"]
|
os.pathsep + env["PATH"]
|
||||||
if not os.path.isfile(self.cargo()):
|
if not os.path.isfile(self.cargo()):
|
||||||
@@ -401,17 +411,13 @@ class RustBuild(object):
|
|||||||
raise Exception(err)
|
raise Exception(err)
|
||||||
sys.exit(err)
|
sys.exit(err)
|
||||||
|
|
||||||
# Darwin's `uname -s` lies and always returns i386. We have to use
|
|
||||||
# sysctl instead.
|
|
||||||
if ostype == 'Darwin' and cputype == 'i686':
|
|
||||||
args = ['sysctl', 'hw.optional.x86_64']
|
|
||||||
sysctl = subprocess.check_output(args).decode(default_encoding)
|
|
||||||
if ': 1' in sysctl:
|
|
||||||
cputype = 'x86_64'
|
|
||||||
|
|
||||||
# The goal here is to come up with the same triple as LLVM would,
|
# The goal here is to come up with the same triple as LLVM would,
|
||||||
# at least for the subset of platforms we're willing to target.
|
# at least for the subset of platforms we're willing to target.
|
||||||
if ostype == 'Linux':
|
if ostype == 'Linux':
|
||||||
|
os_from_sp = subprocess.check_output(['uname', '-o']).strip().decode(default_encoding)
|
||||||
|
if os_from_sp == 'Android':
|
||||||
|
ostype = 'linux-android'
|
||||||
|
else:
|
||||||
ostype = 'unknown-linux-gnu'
|
ostype = 'unknown-linux-gnu'
|
||||||
elif ostype == 'FreeBSD':
|
elif ostype == 'FreeBSD':
|
||||||
ostype = 'unknown-freebsd'
|
ostype = 'unknown-freebsd'
|
||||||
@@ -469,15 +475,21 @@ class RustBuild(object):
|
|||||||
cputype = 'i686'
|
cputype = 'i686'
|
||||||
elif cputype in {'xscale', 'arm'}:
|
elif cputype in {'xscale', 'arm'}:
|
||||||
cputype = 'arm'
|
cputype = 'arm'
|
||||||
elif cputype in {'armv6l', 'armv7l', 'armv8l'}:
|
if ostype == 'linux-android':
|
||||||
|
ostype = 'linux-androideabi'
|
||||||
|
elif cputype == 'armv6l':
|
||||||
cputype = 'arm'
|
cputype = 'arm'
|
||||||
|
if ostype == 'linux-android':
|
||||||
|
ostype = 'linux-androideabi'
|
||||||
|
else:
|
||||||
ostype += 'eabihf'
|
ostype += 'eabihf'
|
||||||
elif cputype == 'armv7l':
|
elif cputype in {'armv7l', 'armv8l'}:
|
||||||
cputype = 'armv7'
|
cputype = 'armv7'
|
||||||
|
if ostype == 'linux-android':
|
||||||
|
ostype = 'linux-androideabi'
|
||||||
|
else:
|
||||||
ostype += 'eabihf'
|
ostype += 'eabihf'
|
||||||
elif cputype == 'aarch64':
|
elif cputype in {'aarch64', 'arm64'}:
|
||||||
cputype = 'aarch64'
|
|
||||||
elif cputype == 'arm64':
|
|
||||||
cputype = 'aarch64'
|
cputype = 'aarch64'
|
||||||
elif cputype == 'mips':
|
elif cputype == 'mips':
|
||||||
if sys.byteorder == 'big':
|
if sys.byteorder == 'big':
|
||||||
@@ -577,8 +589,13 @@ def bootstrap():
|
|||||||
shutil.rmtree('.cargo')
|
shutil.rmtree('.cargo')
|
||||||
|
|
||||||
data = stage0_data(rb.rust_root)
|
data = stage0_data(rb.rust_root)
|
||||||
rb._rustc_channel, rb._rustc_date = data['rustc'].split('-', 1)
|
rb._date = data['date']
|
||||||
rb._cargo_rev = data['cargo']
|
rb._rustc_channel = data['rustc']
|
||||||
|
rb._cargo_channel = data['cargo']
|
||||||
|
if 'dev' in data:
|
||||||
|
rb._download_url = 'https://dev-static.rust-lang.org'
|
||||||
|
else:
|
||||||
|
rb._download_url = 'https://static.rust-lang.org'
|
||||||
|
|
||||||
# Fetch/build the bootstrap
|
# Fetch/build the bootstrap
|
||||||
rb.build = rb.build_triple()
|
rb.build = rb.build_triple()
|
||||||
@@ -598,8 +615,10 @@ def bootstrap():
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
start_time = time()
|
start_time = time()
|
||||||
|
help_triggered = ('-h' in sys.argv) or ('--help' in sys.argv) or (len(sys.argv) == 1)
|
||||||
try:
|
try:
|
||||||
bootstrap()
|
bootstrap()
|
||||||
|
if not help_triggered:
|
||||||
print("Build completed successfully in %s" % format_build_time(time() - start_time))
|
print("Build completed successfully in %s" % format_build_time(time() - start_time))
|
||||||
except (SystemExit, KeyboardInterrupt) as e:
|
except (SystemExit, KeyboardInterrupt) as e:
|
||||||
if hasattr(e, 'code') and isinstance(e.code, int):
|
if hasattr(e, 'code') and isinstance(e.code, int):
|
||||||
@@ -607,6 +626,7 @@ def main():
|
|||||||
else:
|
else:
|
||||||
exit_code = 1
|
exit_code = 1
|
||||||
print(e)
|
print(e)
|
||||||
|
if not help_triggered:
|
||||||
print("Build completed unsuccessfully in %s" % format_build_time(time() - start_time))
|
print("Build completed unsuccessfully in %s" % format_build_time(time() - start_time))
|
||||||
sys.exit(exit_code)
|
sys.exit(exit_code)
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ use build_helper::output;
|
|||||||
use Build;
|
use Build;
|
||||||
|
|
||||||
// The version number
|
// The version number
|
||||||
pub const CFG_RELEASE_NUM: &'static str = "1.17.0";
|
pub const CFG_RELEASE_NUM: &'static str = "1.19.0";
|
||||||
|
|
||||||
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
|
// An optional number to put after the label, e.g. '.2' -> '-beta.2'
|
||||||
// Be sure to make this starts with a dot to conform to semver pre-release
|
// Be sure to make this starts with a dot to conform to semver pre-release
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ use {Build, Compiler, Mode};
|
|||||||
use dist;
|
use dist;
|
||||||
use util::{self, dylib_path, dylib_path_var, exe};
|
use util::{self, dylib_path, dylib_path_var, exe};
|
||||||
|
|
||||||
const ADB_TEST_DIR: &'static str = "/data/tmp";
|
const ADB_TEST_DIR: &'static str = "/data/tmp/work";
|
||||||
|
|
||||||
/// The two modes of the test runner; tests or benchmarks.
|
/// The two modes of the test runner; tests or benchmarks.
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
@@ -78,14 +78,6 @@ pub fn linkcheck(build: &Build, host: &str) {
|
|||||||
pub fn cargotest(build: &Build, stage: u32, host: &str) {
|
pub fn cargotest(build: &Build, stage: u32, host: &str) {
|
||||||
let ref compiler = Compiler::new(stage, host);
|
let ref compiler = Compiler::new(stage, host);
|
||||||
|
|
||||||
// Configure PATH to find the right rustc. NB. we have to use PATH
|
|
||||||
// and not RUSTC because the Cargo test suite has tests that will
|
|
||||||
// fail if rustc is not spelled `rustc`.
|
|
||||||
let path = build.sysroot(compiler).join("bin");
|
|
||||||
let old_path = ::std::env::var("PATH").expect("");
|
|
||||||
let sep = if cfg!(windows) { ";" } else {":" };
|
|
||||||
let ref newpath = format!("{}{}{}", path.display(), sep, old_path);
|
|
||||||
|
|
||||||
// Note that this is a short, cryptic, and not scoped directory name. This
|
// Note that this is a short, cryptic, and not scoped directory name. This
|
||||||
// is currently to minimize the length of path on Windows where we otherwise
|
// is currently to minimize the length of path on Windows where we otherwise
|
||||||
// quickly run into path name limit constraints.
|
// quickly run into path name limit constraints.
|
||||||
@@ -95,9 +87,35 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
|
|||||||
let _time = util::timeit();
|
let _time = util::timeit();
|
||||||
let mut cmd = Command::new(build.tool(&Compiler::new(0, host), "cargotest"));
|
let mut cmd = Command::new(build.tool(&Compiler::new(0, host), "cargotest"));
|
||||||
build.prepare_tool_cmd(compiler, &mut cmd);
|
build.prepare_tool_cmd(compiler, &mut cmd);
|
||||||
build.run(cmd.env("PATH", newpath)
|
build.run(cmd.arg(&build.cargo)
|
||||||
.arg(&build.cargo)
|
.arg(&out_dir)
|
||||||
.arg(&out_dir));
|
.env("RUSTC", build.compiler_path(compiler))
|
||||||
|
.env("RUSTDOC", build.rustdoc(compiler)))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Runs `cargo test` for `cargo` packaged with Rust.
|
||||||
|
pub fn cargo(build: &Build, stage: u32, host: &str) {
|
||||||
|
let ref compiler = Compiler::new(stage, host);
|
||||||
|
|
||||||
|
// Configure PATH to find the right rustc. NB. we have to use PATH
|
||||||
|
// and not RUSTC because the Cargo test suite has tests that will
|
||||||
|
// fail if rustc is not spelled `rustc`.
|
||||||
|
let path = build.sysroot(compiler).join("bin");
|
||||||
|
let old_path = ::std::env::var("PATH").expect("");
|
||||||
|
let sep = if cfg!(windows) { ";" } else {":" };
|
||||||
|
let ref newpath = format!("{}{}{}", path.display(), sep, old_path);
|
||||||
|
|
||||||
|
let mut cargo = build.cargo(compiler, Mode::Tool, host, "test");
|
||||||
|
cargo.arg("--manifest-path").arg(build.src.join("src/tools/cargo/Cargo.toml"));
|
||||||
|
|
||||||
|
// Don't build tests dynamically, just a pain to work with
|
||||||
|
cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
|
||||||
|
|
||||||
|
// Don't run cross-compile tests, we may not have cross-compiled libstd libs
|
||||||
|
// available.
|
||||||
|
cargo.env("CFG_DISABLE_CROSS_TESTS", "1");
|
||||||
|
|
||||||
|
build.run(cargo.env("PATH", newpath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Runs the `tidy` tool as compiled in `stage` by the `host` compiler.
|
/// Runs the `tidy` tool as compiled in `stage` by the `host` compiler.
|
||||||
@@ -225,10 +243,10 @@ pub fn compiletest(build: &Build,
|
|||||||
.arg("--llvm-cxxflags").arg("");
|
.arg("--llvm-cxxflags").arg("");
|
||||||
}
|
}
|
||||||
|
|
||||||
if build.qemu_rootfs(target).is_some() {
|
if build.remote_tested(target) {
|
||||||
cmd.arg("--qemu-test-client")
|
cmd.arg("--remote-test-client")
|
||||||
.arg(build.tool(&Compiler::new(0, &build.config.build),
|
.arg(build.tool(&Compiler::new(0, &build.config.build),
|
||||||
"qemu-test-client"));
|
"remote-test-client"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Running a C compiler on MSVC requires a few env vars to be set, to be
|
// Running a C compiler on MSVC requires a few env vars to be set, to be
|
||||||
@@ -427,9 +445,7 @@ pub fn krate(build: &Build,
|
|||||||
dylib_path.insert(0, build.sysroot_libdir(&compiler, target));
|
dylib_path.insert(0, build.sysroot_libdir(&compiler, target));
|
||||||
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
|
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
|
||||||
|
|
||||||
if target.contains("android") ||
|
if target.contains("emscripten") || build.remote_tested(target) {
|
||||||
target.contains("emscripten") ||
|
|
||||||
build.qemu_rootfs(target).is_some() {
|
|
||||||
cargo.arg("--no-run");
|
cargo.arg("--no-run");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,75 +457,24 @@ pub fn krate(build: &Build,
|
|||||||
|
|
||||||
let _time = util::timeit();
|
let _time = util::timeit();
|
||||||
|
|
||||||
if target.contains("android") {
|
if target.contains("emscripten") {
|
||||||
build.run(&mut cargo);
|
|
||||||
krate_android(build, &compiler, target, mode);
|
|
||||||
} else if target.contains("emscripten") {
|
|
||||||
build.run(&mut cargo);
|
build.run(&mut cargo);
|
||||||
krate_emscripten(build, &compiler, target, mode);
|
krate_emscripten(build, &compiler, target, mode);
|
||||||
} else if build.qemu_rootfs(target).is_some() {
|
} else if build.remote_tested(target) {
|
||||||
build.run(&mut cargo);
|
build.run(&mut cargo);
|
||||||
krate_qemu(build, &compiler, target, mode);
|
krate_remote(build, &compiler, target, mode);
|
||||||
} else {
|
} else {
|
||||||
cargo.args(&build.flags.cmd.test_args());
|
cargo.args(&build.flags.cmd.test_args());
|
||||||
build.run(&mut cargo);
|
build.run(&mut cargo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn krate_android(build: &Build,
|
|
||||||
compiler: &Compiler,
|
|
||||||
target: &str,
|
|
||||||
mode: Mode) {
|
|
||||||
let mut tests = Vec::new();
|
|
||||||
let out_dir = build.cargo_out(compiler, mode, target);
|
|
||||||
find_tests(&out_dir, target, &mut tests);
|
|
||||||
find_tests(&out_dir.join("deps"), target, &mut tests);
|
|
||||||
|
|
||||||
for test in tests {
|
|
||||||
build.run(Command::new("adb").arg("push").arg(&test).arg(ADB_TEST_DIR));
|
|
||||||
|
|
||||||
let test_file_name = test.file_name().unwrap().to_string_lossy();
|
|
||||||
let log = format!("{}/check-stage{}-T-{}-H-{}-{}.log",
|
|
||||||
ADB_TEST_DIR,
|
|
||||||
compiler.stage,
|
|
||||||
target,
|
|
||||||
compiler.host,
|
|
||||||
test_file_name);
|
|
||||||
let quiet = if build.config.quiet_tests { "--quiet" } else { "" };
|
|
||||||
let program = format!("(cd {dir}; \
|
|
||||||
LD_LIBRARY_PATH=./{target} ./{test} \
|
|
||||||
--logfile {log} \
|
|
||||||
{quiet} \
|
|
||||||
{args})",
|
|
||||||
dir = ADB_TEST_DIR,
|
|
||||||
target = target,
|
|
||||||
test = test_file_name,
|
|
||||||
log = log,
|
|
||||||
quiet = quiet,
|
|
||||||
args = build.flags.cmd.test_args().join(" "));
|
|
||||||
|
|
||||||
let output = output(Command::new("adb").arg("shell").arg(&program));
|
|
||||||
println!("{}", output);
|
|
||||||
|
|
||||||
t!(fs::create_dir_all(build.out.join("tmp")));
|
|
||||||
build.run(Command::new("adb")
|
|
||||||
.arg("pull")
|
|
||||||
.arg(&log)
|
|
||||||
.arg(build.out.join("tmp")));
|
|
||||||
build.run(Command::new("adb").arg("shell").arg("rm").arg(&log));
|
|
||||||
if !output.contains("result: ok") {
|
|
||||||
panic!("some tests failed");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn krate_emscripten(build: &Build,
|
fn krate_emscripten(build: &Build,
|
||||||
compiler: &Compiler,
|
compiler: &Compiler,
|
||||||
target: &str,
|
target: &str,
|
||||||
mode: Mode) {
|
mode: Mode) {
|
||||||
let mut tests = Vec::new();
|
let mut tests = Vec::new();
|
||||||
let out_dir = build.cargo_out(compiler, mode, target);
|
let out_dir = build.cargo_out(compiler, mode, target);
|
||||||
find_tests(&out_dir, target, &mut tests);
|
|
||||||
find_tests(&out_dir.join("deps"), target, &mut tests);
|
find_tests(&out_dir.join("deps"), target, &mut tests);
|
||||||
|
|
||||||
for test in tests {
|
for test in tests {
|
||||||
@@ -525,17 +490,16 @@ fn krate_emscripten(build: &Build,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn krate_qemu(build: &Build,
|
fn krate_remote(build: &Build,
|
||||||
compiler: &Compiler,
|
compiler: &Compiler,
|
||||||
target: &str,
|
target: &str,
|
||||||
mode: Mode) {
|
mode: Mode) {
|
||||||
let mut tests = Vec::new();
|
let mut tests = Vec::new();
|
||||||
let out_dir = build.cargo_out(compiler, mode, target);
|
let out_dir = build.cargo_out(compiler, mode, target);
|
||||||
find_tests(&out_dir, target, &mut tests);
|
|
||||||
find_tests(&out_dir.join("deps"), target, &mut tests);
|
find_tests(&out_dir.join("deps"), target, &mut tests);
|
||||||
|
|
||||||
let tool = build.tool(&Compiler::new(0, &build.config.build),
|
let tool = build.tool(&Compiler::new(0, &build.config.build),
|
||||||
"qemu-test-client");
|
"remote-test-client");
|
||||||
for test in tests {
|
for test in tests {
|
||||||
let mut cmd = Command::new(&tool);
|
let mut cmd = Command::new(&tool);
|
||||||
cmd.arg("run")
|
cmd.arg("run")
|
||||||
@@ -548,7 +512,6 @@ fn krate_qemu(build: &Build,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn find_tests(dir: &Path,
|
fn find_tests(dir: &Path,
|
||||||
target: &str,
|
target: &str,
|
||||||
dst: &mut Vec<PathBuf>) {
|
dst: &mut Vec<PathBuf>) {
|
||||||
@@ -566,60 +529,29 @@ fn find_tests(dir: &Path,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn emulator_copy_libs(build: &Build, compiler: &Compiler, target: &str) {
|
pub fn remote_copy_libs(build: &Build, compiler: &Compiler, target: &str) {
|
||||||
if target.contains("android") {
|
if !build.remote_tested(target) {
|
||||||
android_copy_libs(build, compiler, target)
|
return
|
||||||
} else if let Some(s) = build.qemu_rootfs(target) {
|
|
||||||
qemu_copy_libs(build, compiler, target, s)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn android_copy_libs(build: &Build, compiler: &Compiler, target: &str) {
|
println!("REMOTE copy libs to emulator ({})", target);
|
||||||
println!("Android copy libs to emulator ({})", target);
|
|
||||||
build.run(Command::new("adb").arg("wait-for-device"));
|
|
||||||
build.run(Command::new("adb").arg("remount"));
|
|
||||||
build.run(Command::new("adb").args(&["shell", "rm", "-r", ADB_TEST_DIR]));
|
|
||||||
build.run(Command::new("adb").args(&["shell", "mkdir", ADB_TEST_DIR]));
|
|
||||||
build.run(Command::new("adb")
|
|
||||||
.arg("push")
|
|
||||||
.arg(build.src.join("src/etc/adb_run_wrapper.sh"))
|
|
||||||
.arg(ADB_TEST_DIR));
|
|
||||||
|
|
||||||
let target_dir = format!("{}/{}", ADB_TEST_DIR, target);
|
|
||||||
build.run(Command::new("adb").args(&["shell", "mkdir", &target_dir[..]]));
|
|
||||||
|
|
||||||
for f in t!(build.sysroot_libdir(compiler, target).read_dir()) {
|
|
||||||
let f = t!(f);
|
|
||||||
let name = f.file_name().into_string().unwrap();
|
|
||||||
if util::is_dylib(&name) {
|
|
||||||
build.run(Command::new("adb")
|
|
||||||
.arg("push")
|
|
||||||
.arg(f.path())
|
|
||||||
.arg(&target_dir));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn qemu_copy_libs(build: &Build,
|
|
||||||
compiler: &Compiler,
|
|
||||||
target: &str,
|
|
||||||
rootfs: &Path) {
|
|
||||||
println!("QEMU copy libs to emulator ({})", target);
|
|
||||||
assert!(target.starts_with("arm"), "only works with arm for now");
|
|
||||||
t!(fs::create_dir_all(build.out.join("tmp")));
|
t!(fs::create_dir_all(build.out.join("tmp")));
|
||||||
|
|
||||||
// Copy our freshly compiled test server over to the rootfs
|
|
||||||
let server = build.cargo_out(compiler, Mode::Tool, target)
|
let server = build.cargo_out(compiler, Mode::Tool, target)
|
||||||
.join(exe("qemu-test-server", target));
|
.join(exe("remote-test-server", target));
|
||||||
t!(fs::copy(&server, rootfs.join("testd")));
|
|
||||||
|
|
||||||
// Spawn the emulator and wait for it to come online
|
// Spawn the emulator and wait for it to come online
|
||||||
let tool = build.tool(&Compiler::new(0, &build.config.build),
|
let tool = build.tool(&Compiler::new(0, &build.config.build),
|
||||||
"qemu-test-client");
|
"remote-test-client");
|
||||||
build.run(Command::new(&tool)
|
let mut cmd = Command::new(&tool);
|
||||||
.arg("spawn-emulator")
|
cmd.arg("spawn-emulator")
|
||||||
.arg(rootfs)
|
.arg(target)
|
||||||
.arg(build.out.join("tmp")));
|
.arg(&server)
|
||||||
|
.arg(build.out.join("tmp"));
|
||||||
|
if let Some(rootfs) = build.qemu_rootfs(target) {
|
||||||
|
cmd.arg(rootfs);
|
||||||
|
}
|
||||||
|
build.run(&mut cmd);
|
||||||
|
|
||||||
// Push all our dylibs to the emulator
|
// Push all our dylibs to the emulator
|
||||||
for f in t!(build.sysroot_libdir(compiler, target).read_dir()) {
|
for f in t!(build.sysroot_libdir(compiler, target).read_dir()) {
|
||||||
@@ -645,6 +577,7 @@ pub fn distcheck(build: &Build) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println!("Distcheck");
|
||||||
let dir = build.out.join("tmp").join("distcheck");
|
let dir = build.out.join("tmp").join("distcheck");
|
||||||
let _ = fs::remove_dir_all(&dir);
|
let _ = fs::remove_dir_all(&dir);
|
||||||
t!(fs::create_dir_all(&dir));
|
t!(fs::create_dir_all(&dir));
|
||||||
@@ -662,6 +595,26 @@ pub fn distcheck(build: &Build) {
|
|||||||
build.run(Command::new(build_helper::make(&build.config.build))
|
build.run(Command::new(build_helper::make(&build.config.build))
|
||||||
.arg("check")
|
.arg("check")
|
||||||
.current_dir(&dir));
|
.current_dir(&dir));
|
||||||
|
|
||||||
|
// Now make sure that rust-src has all of libstd's dependencies
|
||||||
|
println!("Distcheck rust-src");
|
||||||
|
let dir = build.out.join("tmp").join("distcheck-src");
|
||||||
|
let _ = fs::remove_dir_all(&dir);
|
||||||
|
t!(fs::create_dir_all(&dir));
|
||||||
|
|
||||||
|
let mut cmd = Command::new("tar");
|
||||||
|
cmd.arg("-xzf")
|
||||||
|
.arg(dist::rust_src_installer(build))
|
||||||
|
.arg("--strip-components=1")
|
||||||
|
.current_dir(&dir);
|
||||||
|
build.run(&mut cmd);
|
||||||
|
|
||||||
|
let toml = dir.join("rust-src/lib/rustlib/src/rust/src/libstd/Cargo.toml");
|
||||||
|
build.run(Command::new(&build.cargo)
|
||||||
|
.arg("generate-lockfile")
|
||||||
|
.arg("--manifest-path")
|
||||||
|
.arg(&toml)
|
||||||
|
.current_dir(&dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Test the build system itself
|
/// Test the build system itself
|
||||||
|
|||||||
@@ -44,26 +44,25 @@ pub fn clean(build: &Build) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn rm_rf(path: &Path) {
|
fn rm_rf(path: &Path) {
|
||||||
if !path.exists() {
|
match path.symlink_metadata() {
|
||||||
return
|
Err(e) => {
|
||||||
|
if e.kind() == ErrorKind::NotFound {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if path.is_file() {
|
panic!("failed to get metadata for file {}: {}", path.display(), e);
|
||||||
return do_op(path, "remove file", |p| fs::remove_file(p));
|
},
|
||||||
|
Ok(metadata) => {
|
||||||
|
if metadata.file_type().is_file() || metadata.file_type().is_symlink() {
|
||||||
|
do_op(path, "remove file", |p| fs::remove_file(p));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for file in t!(fs::read_dir(path)) {
|
for file in t!(fs::read_dir(path)) {
|
||||||
let file = t!(file).path();
|
rm_rf(&t!(file).path());
|
||||||
|
|
||||||
if file.is_dir() {
|
|
||||||
rm_rf(&file);
|
|
||||||
} else {
|
|
||||||
// On windows we can't remove a readonly file, and git will
|
|
||||||
// often clone files as readonly. As a result, we have some
|
|
||||||
// special logic to remove readonly files on windows.
|
|
||||||
do_op(&file, "remove file", |p| fs::remove_file(p));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
do_op(path, "remove dir", |p| fs::remove_dir(p));
|
do_op(path, "remove dir", |p| fs::remove_dir(p));
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn do_op<F>(path: &Path, desc: &str, mut f: F)
|
fn do_op<F>(path: &Path, desc: &str, mut f: F)
|
||||||
@@ -71,9 +70,12 @@ fn do_op<F>(path: &Path, desc: &str, mut f: F)
|
|||||||
{
|
{
|
||||||
match f(path) {
|
match f(path) {
|
||||||
Ok(()) => {}
|
Ok(()) => {}
|
||||||
|
// On windows we can't remove a readonly file, and git will often clone files as readonly.
|
||||||
|
// As a result, we have some special logic to remove readonly files on windows.
|
||||||
|
// This is also the reason that we can't use things like fs::remove_dir_all().
|
||||||
Err(ref e) if cfg!(windows) &&
|
Err(ref e) if cfg!(windows) &&
|
||||||
e.kind() == ErrorKind::PermissionDenied => {
|
e.kind() == ErrorKind::PermissionDenied => {
|
||||||
let mut p = t!(path.metadata()).permissions();
|
let mut p = t!(path.symlink_metadata()).permissions();
|
||||||
p.set_readonly(false);
|
p.set_readonly(false);
|
||||||
t!(fs::set_permissions(path, p));
|
t!(fs::set_permissions(path, p));
|
||||||
f(path).unwrap_or_else(|e| {
|
f(path).unwrap_or_else(|e| {
|
||||||
|
|||||||
@@ -115,6 +115,13 @@ pub fn std_link(build: &Build,
|
|||||||
if target.contains("musl") && !target.contains("mips") {
|
if target.contains("musl") && !target.contains("mips") {
|
||||||
copy_musl_third_party_objects(build, target, &libdir);
|
copy_musl_third_party_objects(build, target, &libdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if build.config.sanitizers && compiler.stage != 0 && target == "x86_64-apple-darwin" {
|
||||||
|
// The sanitizers are only built in stage1 or above, so the dylibs will
|
||||||
|
// be missing in stage0 and causes panic. See the `std()` function above
|
||||||
|
// for reason why the sanitizers are not built in stage0.
|
||||||
|
copy_apple_sanitizer_dylibs(&build.native_dir(target), "osx", &libdir);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Copies the crt(1,i,n).o startup objects
|
/// Copies the crt(1,i,n).o startup objects
|
||||||
@@ -126,6 +133,18 @@ fn copy_musl_third_party_objects(build: &Build, target: &str, into: &Path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn copy_apple_sanitizer_dylibs(native_dir: &Path, platform: &str, into: &Path) {
|
||||||
|
for &sanitizer in &["asan", "tsan"] {
|
||||||
|
let filename = format!("libclang_rt.{}_{}_dynamic.dylib", sanitizer, platform);
|
||||||
|
let mut src_path = native_dir.join(sanitizer);
|
||||||
|
src_path.push("build");
|
||||||
|
src_path.push("lib");
|
||||||
|
src_path.push("darwin");
|
||||||
|
src_path.push(&filename);
|
||||||
|
copy(&src_path, &into.join(filename));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Build and prepare startup objects like rsbegin.o and rsend.o
|
/// Build and prepare startup objects like rsbegin.o and rsend.o
|
||||||
///
|
///
|
||||||
/// These are primarily used on Windows right now for linking executables/dlls.
|
/// These are primarily used on Windows right now for linking executables/dlls.
|
||||||
@@ -151,6 +170,7 @@ pub fn build_startup_objects(build: &Build, for_compiler: &Compiler, target: &st
|
|||||||
if !up_to_date(src_file, dst_file) {
|
if !up_to_date(src_file, dst_file) {
|
||||||
let mut cmd = Command::new(&compiler_path);
|
let mut cmd = Command::new(&compiler_path);
|
||||||
build.run(cmd.env("RUSTC_BOOTSTRAP", "1")
|
build.run(cmd.env("RUSTC_BOOTSTRAP", "1")
|
||||||
|
.arg("--cfg").arg(format!("stage{}", compiler.stage))
|
||||||
.arg("--target").arg(target)
|
.arg("--target").arg(target)
|
||||||
.arg("--emit=obj")
|
.arg("--emit=obj")
|
||||||
.arg("--out-dir").arg(dst_dir)
|
.arg("--out-dir").arg(dst_dir)
|
||||||
@@ -275,6 +295,7 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
|
|||||||
cargo.env("CFG_DEFAULT_AR", s);
|
cargo.env("CFG_DEFAULT_AR", s);
|
||||||
}
|
}
|
||||||
build.run(&mut cargo);
|
build.run(&mut cargo);
|
||||||
|
update_mtime(build, &librustc_stamp(build, compiler, target));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Same as `std_link`, only for librustc
|
/// Same as `std_link`, only for librustc
|
||||||
@@ -305,6 +326,12 @@ fn libtest_stamp(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
|
|||||||
build.cargo_out(compiler, Mode::Libtest, target).join(".libtest.stamp")
|
build.cargo_out(compiler, Mode::Libtest, target).join(".libtest.stamp")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Cargo's output path for librustc in a given stage, compiled by a particular
|
||||||
|
/// compiler for the specified target.
|
||||||
|
fn librustc_stamp(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
|
||||||
|
build.cargo_out(compiler, Mode::Librustc, target).join(".librustc.stamp")
|
||||||
|
}
|
||||||
|
|
||||||
fn compiler_file(compiler: &Path, file: &str) -> PathBuf {
|
fn compiler_file(compiler: &Path, file: &str) -> PathBuf {
|
||||||
let out = output(Command::new(compiler)
|
let out = output(Command::new(compiler)
|
||||||
.arg(format!("-print-file-name={}", file)));
|
.arg(format!("-print-file-name={}", file)));
|
||||||
@@ -407,6 +434,23 @@ fn add_to_sysroot(out_dir: &Path, sysroot_dst: &Path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Build a tool in `src/tools`
|
||||||
|
///
|
||||||
|
/// This will build the specified tool with the specified `host` compiler in
|
||||||
|
/// `stage` into the normal cargo output directory.
|
||||||
|
pub fn maybe_clean_tools(build: &Build, stage: u32, target: &str, mode: Mode) {
|
||||||
|
let compiler = Compiler::new(stage, &build.config.build);
|
||||||
|
|
||||||
|
let stamp = match mode {
|
||||||
|
Mode::Libstd => libstd_stamp(build, &compiler, target),
|
||||||
|
Mode::Libtest => libtest_stamp(build, &compiler, target),
|
||||||
|
Mode::Librustc => librustc_stamp(build, &compiler, target),
|
||||||
|
_ => panic!(),
|
||||||
|
};
|
||||||
|
let out_dir = build.cargo_out(&compiler, Mode::Tool, target);
|
||||||
|
build.clear_if_dirty(&out_dir, &stamp);
|
||||||
|
}
|
||||||
|
|
||||||
/// Build a tool in `src/tools`
|
/// Build a tool in `src/tools`
|
||||||
///
|
///
|
||||||
/// This will build the specified tool with the specified `host` compiler in
|
/// This will build the specified tool with the specified `host` compiler in
|
||||||
@@ -416,20 +460,8 @@ pub fn tool(build: &Build, stage: u32, target: &str, tool: &str) {
|
|||||||
|
|
||||||
let compiler = Compiler::new(stage, &build.config.build);
|
let compiler = Compiler::new(stage, &build.config.build);
|
||||||
|
|
||||||
// FIXME: need to clear out previous tool and ideally deps, may require
|
|
||||||
// isolating output directories or require a pseudo shim step to
|
|
||||||
// clear out all the info.
|
|
||||||
//
|
|
||||||
// Maybe when libstd is compiled it should clear out the rustc of the
|
|
||||||
// corresponding stage?
|
|
||||||
// let out_dir = build.cargo_out(stage, &host, Mode::Librustc, target);
|
|
||||||
// build.clear_if_dirty(&out_dir, &libstd_stamp(build, stage, &host, target));
|
|
||||||
|
|
||||||
let mut cargo = build.cargo(&compiler, Mode::Tool, target, "build");
|
let mut cargo = build.cargo(&compiler, Mode::Tool, target, "build");
|
||||||
let mut dir = build.src.join(tool);
|
let dir = build.src.join("src/tools").join(tool);
|
||||||
if !dir.exists() {
|
|
||||||
dir = build.src.join("src/tools").join(tool);
|
|
||||||
}
|
|
||||||
cargo.arg("--manifest-path").arg(dir.join("Cargo.toml"));
|
cargo.arg("--manifest-path").arg(dir.join("Cargo.toml"));
|
||||||
|
|
||||||
// We don't want to build tools dynamically as they'll be running across
|
// We don't want to build tools dynamically as they'll be running across
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ pub struct Config {
|
|||||||
pub rustc_default_ar: Option<String>,
|
pub rustc_default_ar: Option<String>,
|
||||||
pub rust_optimize_tests: bool,
|
pub rust_optimize_tests: bool,
|
||||||
pub rust_debuginfo_tests: bool,
|
pub rust_debuginfo_tests: bool,
|
||||||
pub rust_save_analysis: bool,
|
|
||||||
pub rust_dist_src: bool,
|
pub rust_dist_src: bool,
|
||||||
|
|
||||||
pub build: String,
|
pub build: String,
|
||||||
@@ -226,7 +225,6 @@ struct Rust {
|
|||||||
optimize_tests: Option<bool>,
|
optimize_tests: Option<bool>,
|
||||||
debuginfo_tests: Option<bool>,
|
debuginfo_tests: Option<bool>,
|
||||||
codegen_tests: Option<bool>,
|
codegen_tests: Option<bool>,
|
||||||
save_analysis: Option<bool>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TOML representation of how each build target is configured.
|
/// TOML representation of how each build target is configured.
|
||||||
@@ -352,7 +350,6 @@ impl Config {
|
|||||||
set(&mut config.rust_optimize_tests, rust.optimize_tests);
|
set(&mut config.rust_optimize_tests, rust.optimize_tests);
|
||||||
set(&mut config.rust_debuginfo_tests, rust.debuginfo_tests);
|
set(&mut config.rust_debuginfo_tests, rust.debuginfo_tests);
|
||||||
set(&mut config.codegen_tests, rust.codegen_tests);
|
set(&mut config.codegen_tests, rust.codegen_tests);
|
||||||
set(&mut config.rust_save_analysis, rust.save_analysis);
|
|
||||||
set(&mut config.rust_rpath, rust.rpath);
|
set(&mut config.rust_rpath, rust.rpath);
|
||||||
set(&mut config.debug_jemalloc, rust.debug_jemalloc);
|
set(&mut config.debug_jemalloc, rust.debug_jemalloc);
|
||||||
set(&mut config.use_jemalloc, rust.use_jemalloc);
|
set(&mut config.use_jemalloc, rust.use_jemalloc);
|
||||||
@@ -460,7 +457,6 @@ impl Config {
|
|||||||
("LOCAL_REBUILD", self.local_rebuild),
|
("LOCAL_REBUILD", self.local_rebuild),
|
||||||
("NINJA", self.ninja),
|
("NINJA", self.ninja),
|
||||||
("CODEGEN_TESTS", self.codegen_tests),
|
("CODEGEN_TESTS", self.codegen_tests),
|
||||||
("SAVE_ANALYSIS", self.rust_save_analysis),
|
|
||||||
("LOCKED_DEPS", self.locked_deps),
|
("LOCKED_DEPS", self.locked_deps),
|
||||||
("VENDOR", self.vendor),
|
("VENDOR", self.vendor),
|
||||||
("FULL_BOOTSTRAP", self.full_bootstrap),
|
("FULL_BOOTSTRAP", self.full_bootstrap),
|
||||||
@@ -574,6 +570,12 @@ impl Config {
|
|||||||
.or_insert(Target::default());
|
.or_insert(Target::default());
|
||||||
target.ndk = Some(parse_configure_path(value));
|
target.ndk = Some(parse_configure_path(value));
|
||||||
}
|
}
|
||||||
|
"CFG_X86_64_LINUX_ANDROID_NDK" if value.len() > 0 => {
|
||||||
|
let target = "x86_64-linux-android".to_string();
|
||||||
|
let target = self.target_config.entry(target)
|
||||||
|
.or_insert(Target::default());
|
||||||
|
target.ndk = Some(parse_configure_path(value));
|
||||||
|
}
|
||||||
"CFG_LOCAL_RUST_ROOT" if value.len() > 0 => {
|
"CFG_LOCAL_RUST_ROOT" if value.len() > 0 => {
|
||||||
let path = parse_configure_path(value);
|
let path = parse_configure_path(value);
|
||||||
self.rustc = Some(push_exe_path(path.clone(), &["bin", "rustc"]));
|
self.rustc = Some(push_exe_path(path.clone(), &["bin", "rustc"]));
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
# support. You'll need to write a target specification at least, and most
|
# support. You'll need to write a target specification at least, and most
|
||||||
# likely, teach rustc about the C ABI of the target. Get in touch with the
|
# likely, teach rustc about the C ABI of the target. Get in touch with the
|
||||||
# Rust team and file an issue if you need assistance in porting!
|
# Rust team and file an issue if you need assistance in porting!
|
||||||
#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX"
|
#targets = "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon"
|
||||||
|
|
||||||
# Cap the number of parallel linker invocations when compiling LLVM.
|
# Cap the number of parallel linker invocations when compiling LLVM.
|
||||||
# This can be useful when building LLVM with debug info, which significantly
|
# This can be useful when building LLVM with debug info, which significantly
|
||||||
@@ -234,9 +234,6 @@
|
|||||||
# saying that the FileCheck executable is missing, you may want to disable this.
|
# saying that the FileCheck executable is missing, you may want to disable this.
|
||||||
#codegen-tests = true
|
#codegen-tests = true
|
||||||
|
|
||||||
# Flag indicating whether the API analysis data should be saved.
|
|
||||||
#save-analysis = false
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# Options for specific targets
|
# Options for specific targets
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ use util::{cp_r, libdir, is_dylib, cp_filtered, copy, exe};
|
|||||||
fn pkgname(build: &Build, component: &str) -> String {
|
fn pkgname(build: &Build, component: &str) -> String {
|
||||||
if component == "cargo" {
|
if component == "cargo" {
|
||||||
format!("{}-{}", component, build.cargo_package_vers())
|
format!("{}-{}", component, build.cargo_package_vers())
|
||||||
|
} else if component == "rls" {
|
||||||
|
format!("{}-{}", component, build.package_vers(&build.release_num("rls")))
|
||||||
} else {
|
} else {
|
||||||
assert!(component.starts_with("rust"));
|
assert!(component.starts_with("rust"));
|
||||||
format!("{}-{}", component, build.rust_package_vers())
|
format!("{}-{}", component, build.rust_package_vers())
|
||||||
@@ -252,7 +254,12 @@ pub fn debugger_scripts(build: &Build,
|
|||||||
install(&build.src.join("src/etc/").join(file), &dst, 0o644);
|
install(&build.src.join("src/etc/").join(file), &dst, 0o644);
|
||||||
};
|
};
|
||||||
if host.contains("windows-msvc") {
|
if host.contains("windows-msvc") {
|
||||||
// no debugger scripts
|
// windbg debugger scripts
|
||||||
|
install(&build.src.join("src/etc/rust-windbg.cmd"), &sysroot.join("bin"),
|
||||||
|
0o755);
|
||||||
|
|
||||||
|
cp_debugger_script("natvis/libcore.natvis");
|
||||||
|
cp_debugger_script("natvis/libcollections.natvis");
|
||||||
} else {
|
} else {
|
||||||
cp_debugger_script("debugger_pretty_printers_common.py");
|
cp_debugger_script("debugger_pretty_printers_common.py");
|
||||||
|
|
||||||
@@ -308,22 +315,26 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) {
|
|||||||
t!(fs::remove_dir_all(&image));
|
t!(fs::remove_dir_all(&image));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The path to the complete rustc-src tarball
|
||||||
pub fn rust_src_location(build: &Build) -> PathBuf {
|
pub fn rust_src_location(build: &Build) -> PathBuf {
|
||||||
let plain_name = format!("rustc-{}-src", build.rust_package_vers());
|
let plain_name = format!("rustc-{}-src", build.rust_package_vers());
|
||||||
distdir(build).join(&format!("{}.tar.gz", plain_name))
|
distdir(build).join(&format!("{}.tar.gz", plain_name))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a tarball of save-analysis metadata, if available.
|
/// The path to the rust-src component installer
|
||||||
pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
|
pub fn rust_src_installer(build: &Build) -> PathBuf {
|
||||||
if !build.config.rust_save_analysis {
|
let name = pkgname(build, "rust-src");
|
||||||
return
|
distdir(build).join(&format!("{}.tar.gz", name))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates a tarball of save-analysis metadata, if available.
|
||||||
|
pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
|
||||||
|
assert!(build.config.extended);
|
||||||
println!("Dist analysis");
|
println!("Dist analysis");
|
||||||
|
|
||||||
if compiler.host != build.config.build {
|
if compiler.host != build.config.build {
|
||||||
println!("\tskipping, not a build host");
|
println!("\tskipping, not a build host");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Package save-analysis from stage1 if not doing a full bootstrap, as the
|
// Package save-analysis from stage1 if not doing a full bootstrap, as the
|
||||||
@@ -370,13 +381,11 @@ pub fn rust_src(build: &Build) {
|
|||||||
|
|
||||||
println!("Dist src");
|
println!("Dist src");
|
||||||
|
|
||||||
let name = pkgname(build, "rust-src");
|
// Make sure that the root folder of tarball has the correct name
|
||||||
let image = tmpdir(build).join(format!("{}-image", name));
|
let plain_name = format!("rustc-{}-src", build.rust_package_vers());
|
||||||
let _ = fs::remove_dir_all(&image);
|
let plain_dst_src = tmpdir(build).join(&plain_name);
|
||||||
|
let _ = fs::remove_dir_all(&plain_dst_src);
|
||||||
let dst = image.join("lib/rustlib/src");
|
t!(fs::create_dir_all(&plain_dst_src));
|
||||||
let dst_src = dst.join("rust");
|
|
||||||
t!(fs::create_dir_all(&dst_src));
|
|
||||||
|
|
||||||
// This is the set of root paths which will become part of the source package
|
// This is the set of root paths which will become part of the source package
|
||||||
let src_files = [
|
let src_files = [
|
||||||
@@ -392,7 +401,6 @@ pub fn rust_src(build: &Build) {
|
|||||||
let src_dirs = [
|
let src_dirs = [
|
||||||
"man",
|
"man",
|
||||||
"src",
|
"src",
|
||||||
"cargo",
|
|
||||||
];
|
];
|
||||||
|
|
||||||
let filter_fn = move |path: &Path| {
|
let filter_fn = move |path: &Path| {
|
||||||
@@ -424,15 +432,17 @@ pub fn rust_src(build: &Build) {
|
|||||||
|
|
||||||
// Copy the directories using our filter
|
// Copy the directories using our filter
|
||||||
for item in &src_dirs {
|
for item in &src_dirs {
|
||||||
let dst = &dst_src.join(item);
|
let dst = &plain_dst_src.join(item);
|
||||||
t!(fs::create_dir(dst));
|
t!(fs::create_dir(dst));
|
||||||
cp_filtered(&build.src.join(item), dst, &filter_fn);
|
cp_filtered(&build.src.join(item), dst, &filter_fn);
|
||||||
}
|
}
|
||||||
// Copy the files normally
|
// Copy the files normally
|
||||||
for item in &src_files {
|
for item in &src_files {
|
||||||
copy(&build.src.join(item), &dst_src.join(item));
|
copy(&build.src.join(item), &plain_dst_src.join(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're building from git sources, we need to vendor a complete distribution.
|
||||||
|
if build.src_is_git {
|
||||||
// Get cargo-vendor installed, if it isn't already.
|
// Get cargo-vendor installed, if it isn't already.
|
||||||
let mut has_cargo_vendor = false;
|
let mut has_cargo_vendor = false;
|
||||||
let mut cmd = Command::new(&build.cargo);
|
let mut cmd = Command::new(&build.cargo);
|
||||||
@@ -453,8 +463,62 @@ pub fn rust_src(build: &Build) {
|
|||||||
// Vendor all Cargo dependencies
|
// Vendor all Cargo dependencies
|
||||||
let mut cmd = Command::new(&build.cargo);
|
let mut cmd = Command::new(&build.cargo);
|
||||||
cmd.arg("vendor")
|
cmd.arg("vendor")
|
||||||
.current_dir(&dst_src.join("src"));
|
.current_dir(&plain_dst_src.join("src"));
|
||||||
build.run(&mut cmd);
|
build.run(&mut cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the version file
|
||||||
|
write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
|
||||||
|
|
||||||
|
// Create plain source tarball
|
||||||
|
let tarball = rust_src_location(build);
|
||||||
|
if let Some(dir) = tarball.parent() {
|
||||||
|
t!(fs::create_dir_all(dir));
|
||||||
|
}
|
||||||
|
let mut cmd = Command::new("tar");
|
||||||
|
cmd.arg("-czf").arg(sanitize_sh(&tarball))
|
||||||
|
.arg(&plain_name)
|
||||||
|
.current_dir(tmpdir(build));
|
||||||
|
build.run(&mut cmd);
|
||||||
|
|
||||||
|
|
||||||
|
let name = pkgname(build, "rust-src");
|
||||||
|
let image = tmpdir(build).join(format!("{}-image", name));
|
||||||
|
let _ = fs::remove_dir_all(&image);
|
||||||
|
|
||||||
|
let dst = image.join("lib/rustlib/src");
|
||||||
|
let dst_src = dst.join("rust");
|
||||||
|
t!(fs::create_dir_all(&dst_src));
|
||||||
|
|
||||||
|
// This is the reduced set of paths which will become the rust-src component
|
||||||
|
// (essentially libstd and all of its path dependencies)
|
||||||
|
let std_src_dirs = [
|
||||||
|
"src/build_helper",
|
||||||
|
"src/liballoc",
|
||||||
|
"src/liballoc_jemalloc",
|
||||||
|
"src/liballoc_system",
|
||||||
|
"src/libcollections",
|
||||||
|
"src/libcompiler_builtins",
|
||||||
|
"src/libcore",
|
||||||
|
"src/liblibc",
|
||||||
|
"src/libpanic_abort",
|
||||||
|
"src/libpanic_unwind",
|
||||||
|
"src/librand",
|
||||||
|
"src/librustc_asan",
|
||||||
|
"src/librustc_lsan",
|
||||||
|
"src/librustc_msan",
|
||||||
|
"src/librustc_tsan",
|
||||||
|
"src/libstd",
|
||||||
|
"src/libstd_unicode",
|
||||||
|
"src/libunwind",
|
||||||
|
"src/rustc/libc_shim",
|
||||||
|
];
|
||||||
|
|
||||||
|
for item in &std_src_dirs {
|
||||||
|
let dst = &dst_src.join(item);
|
||||||
|
t!(fs::create_dir_all(dst));
|
||||||
|
cp_r(&plain_dst_src.join(item), dst);
|
||||||
|
}
|
||||||
|
|
||||||
// Create source tarball in rust-installer format
|
// Create source tarball in rust-installer format
|
||||||
let mut cmd = Command::new(SH_CMD);
|
let mut cmd = Command::new(SH_CMD);
|
||||||
@@ -470,23 +534,6 @@ pub fn rust_src(build: &Build) {
|
|||||||
.arg("--legacy-manifest-dirs=rustlib,cargo");
|
.arg("--legacy-manifest-dirs=rustlib,cargo");
|
||||||
build.run(&mut cmd);
|
build.run(&mut cmd);
|
||||||
|
|
||||||
// Rename directory, so that root folder of tarball has the correct name
|
|
||||||
let plain_name = format!("rustc-{}-src", build.rust_package_vers());
|
|
||||||
let plain_dst_src = tmpdir(build).join(&plain_name);
|
|
||||||
let _ = fs::remove_dir_all(&plain_dst_src);
|
|
||||||
t!(fs::create_dir_all(&plain_dst_src));
|
|
||||||
cp_r(&dst_src, &plain_dst_src);
|
|
||||||
|
|
||||||
// Create the version file
|
|
||||||
write_file(&plain_dst_src.join("version"), build.rust_version().as_bytes());
|
|
||||||
|
|
||||||
// Create plain source tarball
|
|
||||||
let mut cmd = Command::new("tar");
|
|
||||||
cmd.arg("-czf").arg(sanitize_sh(&rust_src_location(build)))
|
|
||||||
.arg(&plain_name)
|
|
||||||
.current_dir(tmpdir(build));
|
|
||||||
build.run(&mut cmd);
|
|
||||||
|
|
||||||
t!(fs::remove_dir_all(&image));
|
t!(fs::remove_dir_all(&image));
|
||||||
t!(fs::remove_dir_all(&plain_dst_src));
|
t!(fs::remove_dir_all(&plain_dst_src));
|
||||||
}
|
}
|
||||||
@@ -534,9 +581,9 @@ pub fn cargo(build: &Build, stage: u32, target: &str) {
|
|||||||
println!("Dist cargo stage{} ({})", stage, target);
|
println!("Dist cargo stage{} ({})", stage, target);
|
||||||
let compiler = Compiler::new(stage, &build.config.build);
|
let compiler = Compiler::new(stage, &build.config.build);
|
||||||
|
|
||||||
let src = build.src.join("cargo");
|
let src = build.src.join("src/tools/cargo");
|
||||||
let etc = src.join("src/etc");
|
let etc = src.join("src/etc");
|
||||||
let release_num = build.cargo_release_num();
|
let release_num = build.release_num("cargo");
|
||||||
let name = pkgname(build, "cargo");
|
let name = pkgname(build, "cargo");
|
||||||
let version = build.cargo_info.version(build, &release_num);
|
let version = build.cargo_info.version(build, &release_num);
|
||||||
|
|
||||||
@@ -590,6 +637,55 @@ pub fn cargo(build: &Build, stage: u32, target: &str) {
|
|||||||
build.run(&mut cmd);
|
build.run(&mut cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn rls(build: &Build, stage: u32, target: &str) {
|
||||||
|
assert!(build.config.extended);
|
||||||
|
println!("Dist RLS stage{} ({})", stage, target);
|
||||||
|
let compiler = Compiler::new(stage, &build.config.build);
|
||||||
|
|
||||||
|
let src = build.src.join("src/tools/rls");
|
||||||
|
let release_num = build.release_num("rls");
|
||||||
|
let name = pkgname(build, "rls");
|
||||||
|
let version = build.rls_info.version(build, &release_num);
|
||||||
|
|
||||||
|
let tmp = tmpdir(build);
|
||||||
|
let image = tmp.join("rls-image");
|
||||||
|
drop(fs::remove_dir_all(&image));
|
||||||
|
t!(fs::create_dir_all(&image));
|
||||||
|
|
||||||
|
// Prepare the image directory
|
||||||
|
let rls = build.cargo_out(&compiler, Mode::Tool, target)
|
||||||
|
.join(exe("rls", target));
|
||||||
|
install(&rls, &image.join("bin"), 0o755);
|
||||||
|
let doc = image.join("share/doc/rls");
|
||||||
|
install(&src.join("README.md"), &doc, 0o644);
|
||||||
|
install(&src.join("LICENSE-MIT"), &doc, 0o644);
|
||||||
|
install(&src.join("LICENSE-APACHE"), &doc, 0o644);
|
||||||
|
|
||||||
|
// Prepare the overlay
|
||||||
|
let overlay = tmp.join("rls-overlay");
|
||||||
|
drop(fs::remove_dir_all(&overlay));
|
||||||
|
t!(fs::create_dir_all(&overlay));
|
||||||
|
install(&src.join("README.md"), &overlay, 0o644);
|
||||||
|
install(&src.join("LICENSE-MIT"), &overlay, 0o644);
|
||||||
|
install(&src.join("LICENSE-APACHE"), &overlay, 0o644);
|
||||||
|
t!(t!(File::create(overlay.join("version"))).write_all(version.as_bytes()));
|
||||||
|
|
||||||
|
// Generate the installer tarball
|
||||||
|
let mut cmd = Command::new("sh");
|
||||||
|
cmd.arg(sanitize_sh(&build.src.join("src/rust-installer/gen-installer.sh")))
|
||||||
|
.arg("--product-name=Rust")
|
||||||
|
.arg("--rel-manifest-dir=rustlib")
|
||||||
|
.arg("--success-message=RLS-ready-to-serve.")
|
||||||
|
.arg(format!("--image-dir={}", sanitize_sh(&image)))
|
||||||
|
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
|
||||||
|
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
|
||||||
|
.arg(format!("--non-installed-overlay={}", sanitize_sh(&overlay)))
|
||||||
|
.arg(format!("--package-name={}-{}", name, target))
|
||||||
|
.arg("--component-name=rls")
|
||||||
|
.arg("--legacy-manifest-dirs=rustlib,cargo");
|
||||||
|
build.run(&mut cmd);
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates a combined installer for the specified target in the provided stage.
|
/// Creates a combined installer for the specified target in the provided stage.
|
||||||
pub fn extended(build: &Build, stage: u32, target: &str) {
|
pub fn extended(build: &Build, stage: u32, target: &str) {
|
||||||
println!("Dist extended stage{} ({})", stage, target);
|
println!("Dist extended stage{} ({})", stage, target);
|
||||||
@@ -601,6 +697,12 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
|
|||||||
let cargo_installer = dist.join(format!("{}-{}.tar.gz",
|
let cargo_installer = dist.join(format!("{}-{}.tar.gz",
|
||||||
pkgname(build, "cargo"),
|
pkgname(build, "cargo"),
|
||||||
target));
|
target));
|
||||||
|
let rls_installer = dist.join(format!("{}-{}.tar.gz",
|
||||||
|
pkgname(build, "rls"),
|
||||||
|
target));
|
||||||
|
let analysis_installer = dist.join(format!("{}-{}.tar.gz",
|
||||||
|
pkgname(build, "rust-analysis"),
|
||||||
|
target));
|
||||||
let docs_installer = dist.join(format!("{}-{}.tar.gz",
|
let docs_installer = dist.join(format!("{}-{}.tar.gz",
|
||||||
pkgname(build, "rust-docs"),
|
pkgname(build, "rust-docs"),
|
||||||
target));
|
target));
|
||||||
@@ -628,9 +730,11 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
|
|||||||
// upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
|
// upgrades rustc was upgraded before rust-std. To avoid rustc clobbering
|
||||||
// the std files during uninstall. To do this ensure that rustc comes
|
// the std files during uninstall. To do this ensure that rustc comes
|
||||||
// before rust-std in the list below.
|
// before rust-std in the list below.
|
||||||
let mut input_tarballs = format!("{},{},{},{}",
|
let mut input_tarballs = format!("{},{},{},{},{},{}",
|
||||||
sanitize_sh(&rustc_installer),
|
sanitize_sh(&rustc_installer),
|
||||||
sanitize_sh(&cargo_installer),
|
sanitize_sh(&cargo_installer),
|
||||||
|
sanitize_sh(&rls_installer),
|
||||||
|
sanitize_sh(&analysis_installer),
|
||||||
sanitize_sh(&docs_installer),
|
sanitize_sh(&docs_installer),
|
||||||
sanitize_sh(&std_installer));
|
sanitize_sh(&std_installer));
|
||||||
if target.contains("pc-windows-gnu") {
|
if target.contains("pc-windows-gnu") {
|
||||||
@@ -943,7 +1047,8 @@ pub fn hash_and_sign(build: &Build) {
|
|||||||
cmd.arg(distdir(build));
|
cmd.arg(distdir(build));
|
||||||
cmd.arg(today.trim());
|
cmd.arg(today.trim());
|
||||||
cmd.arg(build.rust_package_vers());
|
cmd.arg(build.rust_package_vers());
|
||||||
cmd.arg(build.package_vers(&build.cargo_release_num()));
|
cmd.arg(build.package_vers(&build.release_num("cargo")));
|
||||||
|
cmd.arg(build.package_vers(&build.release_num("rls")));
|
||||||
cmd.arg(addr);
|
cmd.arg(addr);
|
||||||
|
|
||||||
t!(fs::create_dir_all(distdir(build)));
|
t!(fs::create_dir_all(distdir(build)));
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use std::fs;
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
|
||||||
use getopts::{Matches, Options};
|
use getopts::Options;
|
||||||
|
|
||||||
use Build;
|
use Build;
|
||||||
use config::Config;
|
use config::Config;
|
||||||
@@ -75,7 +75,22 @@ pub enum Subcommand {
|
|||||||
|
|
||||||
impl Flags {
|
impl Flags {
|
||||||
pub fn parse(args: &[String]) -> Flags {
|
pub fn parse(args: &[String]) -> Flags {
|
||||||
|
let mut extra_help = String::new();
|
||||||
|
let mut subcommand_help = format!("\
|
||||||
|
Usage: x.py <subcommand> [options] [<paths>...]
|
||||||
|
|
||||||
|
Subcommands:
|
||||||
|
build Compile either the compiler or libraries
|
||||||
|
test Build and run some test suites
|
||||||
|
bench Build and run some benchmarks
|
||||||
|
doc Build documentation
|
||||||
|
clean Clean out build directories
|
||||||
|
dist Build and/or install distribution artifacts
|
||||||
|
|
||||||
|
To learn more about a subcommand, run `./x.py <subcommand> -h`");
|
||||||
|
|
||||||
let mut opts = Options::new();
|
let mut opts = Options::new();
|
||||||
|
// Options common to all subcommands
|
||||||
opts.optflagmulti("v", "verbose", "use verbose output (-vv for very verbose)");
|
opts.optflagmulti("v", "verbose", "use verbose output (-vv for very verbose)");
|
||||||
opts.optflag("i", "incremental", "use incremental compilation");
|
opts.optflag("i", "incremental", "use incremental compilation");
|
||||||
opts.optopt("", "config", "TOML configuration file for build", "FILE");
|
opts.optopt("", "config", "TOML configuration file for build", "FILE");
|
||||||
@@ -89,21 +104,83 @@ impl Flags {
|
|||||||
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
|
opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS");
|
||||||
opts.optflag("h", "help", "print this help message");
|
opts.optflag("h", "help", "print this help message");
|
||||||
|
|
||||||
let usage = |n, opts: &Options| -> ! {
|
// fn usage()
|
||||||
let command = args.get(0).map(|s| &**s);
|
let usage = |exit_code: i32, opts: &Options, subcommand_help: &str, extra_help: &str| -> ! {
|
||||||
let brief = format!("Usage: x.py {} [options] [<args>...]",
|
println!("{}", opts.usage(subcommand_help));
|
||||||
command.unwrap_or("<command>"));
|
if !extra_help.is_empty() {
|
||||||
|
println!("{}", extra_help);
|
||||||
|
}
|
||||||
|
process::exit(exit_code);
|
||||||
|
};
|
||||||
|
|
||||||
println!("{}", opts.usage(&brief));
|
// We can't use getopt to parse the options until we have completed specifying which
|
||||||
match command {
|
// options are valid, but under the current implementation, some options are conditional on
|
||||||
Some("build") => {
|
// the subcommand. Therefore we must manually identify the subcommand first, so that we can
|
||||||
println!("\
|
// complete the definition of the options. Then we can use the getopt::Matches object from
|
||||||
|
// there on out.
|
||||||
|
let mut possible_subcommands = args.iter().collect::<Vec<_>>();
|
||||||
|
possible_subcommands.retain(|&s|
|
||||||
|
(s == "build")
|
||||||
|
|| (s == "test")
|
||||||
|
|| (s == "bench")
|
||||||
|
|| (s == "doc")
|
||||||
|
|| (s == "clean")
|
||||||
|
|| (s == "dist"));
|
||||||
|
let subcommand = match possible_subcommands.first() {
|
||||||
|
Some(s) => s,
|
||||||
|
None => {
|
||||||
|
// No subcommand -- show the general usage and subcommand help
|
||||||
|
println!("{}\n", subcommand_help);
|
||||||
|
process::exit(0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Some subcommands get extra options
|
||||||
|
match subcommand.as_str() {
|
||||||
|
"test" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
|
||||||
|
"bench" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); },
|
||||||
|
"dist" => { opts.optflag("", "install", "run installer as well"); },
|
||||||
|
_ => { },
|
||||||
|
};
|
||||||
|
|
||||||
|
// Done specifying what options are possible, so do the getopts parsing
|
||||||
|
let matches = opts.parse(&args[..]).unwrap_or_else(|e| {
|
||||||
|
// Invalid argument/option format
|
||||||
|
println!("\n{}\n", e);
|
||||||
|
usage(1, &opts, &subcommand_help, &extra_help);
|
||||||
|
});
|
||||||
|
// Extra sanity check to make sure we didn't hit this crazy corner case:
|
||||||
|
//
|
||||||
|
// ./x.py --frobulate clean build
|
||||||
|
// ^-- option ^ ^- actual subcommand
|
||||||
|
// \_ arg to option could be mistaken as subcommand
|
||||||
|
let mut pass_sanity_check = true;
|
||||||
|
match matches.free.get(0) {
|
||||||
|
Some(check_subcommand) => {
|
||||||
|
if &check_subcommand != subcommand {
|
||||||
|
pass_sanity_check = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
None => {
|
||||||
|
pass_sanity_check = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !pass_sanity_check {
|
||||||
|
println!("{}\n", subcommand_help);
|
||||||
|
println!("Sorry, I couldn't figure out which subcommand you were trying to specify.\n\
|
||||||
|
You may need to move some options to after the subcommand.\n");
|
||||||
|
process::exit(1);
|
||||||
|
}
|
||||||
|
// Extra help text for some commands
|
||||||
|
match subcommand.as_str() {
|
||||||
|
"build" => {
|
||||||
|
subcommand_help.push_str("\n
|
||||||
Arguments:
|
Arguments:
|
||||||
This subcommand accepts a number of positional arguments of directories to
|
This subcommand accepts a number of paths to directories to the crates
|
||||||
the crates and/or artifacts to compile. For example:
|
and/or artifacts to compile. For example:
|
||||||
|
|
||||||
./x.py build src/libcore
|
./x.py build src/libcore
|
||||||
./x.py build src/libproc_macro
|
./x.py build src/libcore src/libproc_macro
|
||||||
./x.py build src/libstd --stage 1
|
./x.py build src/libstd --stage 1
|
||||||
|
|
||||||
If no arguments are passed then the complete artifacts for that stage are
|
If no arguments are passed then the complete artifacts for that stage are
|
||||||
@@ -114,15 +191,13 @@ Arguments:
|
|||||||
|
|
||||||
For a quick build with a usable compile, you can pass:
|
For a quick build with a usable compile, you can pass:
|
||||||
|
|
||||||
./x.py build --stage 1 src/libtest
|
./x.py build --stage 1 src/libtest");
|
||||||
");
|
|
||||||
}
|
}
|
||||||
|
"test" => {
|
||||||
Some("test") => {
|
subcommand_help.push_str("\n
|
||||||
println!("\
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This subcommand accepts a number of positional arguments of directories to
|
This subcommand accepts a number of paths to directories to tests that
|
||||||
tests that should be compiled and run. For example:
|
should be compiled and run. For example:
|
||||||
|
|
||||||
./x.py test src/test/run-pass
|
./x.py test src/test/run-pass
|
||||||
./x.py test src/libstd --test-args hash_map
|
./x.py test src/libstd --test-args hash_map
|
||||||
@@ -132,139 +207,90 @@ Arguments:
|
|||||||
compiled and tested.
|
compiled and tested.
|
||||||
|
|
||||||
./x.py test
|
./x.py test
|
||||||
./x.py test --stage 1
|
./x.py test --stage 1");
|
||||||
");
|
|
||||||
}
|
}
|
||||||
|
"doc" => {
|
||||||
Some("doc") => {
|
subcommand_help.push_str("\n
|
||||||
println!("\
|
|
||||||
Arguments:
|
Arguments:
|
||||||
This subcommand accepts a number of positional arguments of directories of
|
This subcommand accepts a number of paths to directories of documentation
|
||||||
documentation to build. For example:
|
to build. For example:
|
||||||
|
|
||||||
./x.py doc src/doc/book
|
./x.py doc src/doc/book
|
||||||
./x.py doc src/doc/nomicon
|
./x.py doc src/doc/nomicon
|
||||||
./x.py doc src/libstd
|
./x.py doc src/doc/book src/libstd
|
||||||
|
|
||||||
If no arguments are passed then everything is documented:
|
If no arguments are passed then everything is documented:
|
||||||
|
|
||||||
./x.py doc
|
./x.py doc
|
||||||
./x.py doc --stage 1
|
./x.py doc --stage 1");
|
||||||
");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_ => { }
|
_ => { }
|
||||||
}
|
};
|
||||||
|
// Get any optional paths which occur after the subcommand
|
||||||
|
let cwd = t!(env::current_dir());
|
||||||
|
let paths = matches.free[1..].iter().map(|p| cwd.join(p)).collect::<Vec<_>>();
|
||||||
|
|
||||||
if let Some(command) = command {
|
|
||||||
if command == "build" ||
|
// All subcommands can have an optional "Available paths" section
|
||||||
command == "dist" ||
|
if matches.opt_present("verbose") {
|
||||||
command == "doc" ||
|
|
||||||
command == "test" ||
|
|
||||||
command == "bench" ||
|
|
||||||
command == "clean" {
|
|
||||||
println!("Available invocations:");
|
|
||||||
if args.iter().any(|a| a == "-v") {
|
|
||||||
let flags = Flags::parse(&["build".to_string()]);
|
let flags = Flags::parse(&["build".to_string()]);
|
||||||
let mut config = Config::default();
|
let mut config = Config::default();
|
||||||
config.build = flags.build.clone();
|
config.build = flags.build.clone();
|
||||||
let mut build = Build::new(flags, config);
|
let mut build = Build::new(flags, config);
|
||||||
metadata::build(&mut build);
|
metadata::build(&mut build);
|
||||||
step::build_rules(&build).print_help(command);
|
let maybe_rules_help = step::build_rules(&build).get_help(subcommand);
|
||||||
|
if maybe_rules_help.is_some() {
|
||||||
|
extra_help.push_str(maybe_rules_help.unwrap().as_str());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
println!(" ... elided, run `./x.py {} -h -v` to see",
|
extra_help.push_str(format!("Run `./x.py {} -h -v` to see a list of available paths.",
|
||||||
command);
|
subcommand).as_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("");
|
// User passed in -h/--help?
|
||||||
}
|
if matches.opt_present("help") {
|
||||||
|
usage(0, &opts, &subcommand_help, &extra_help);
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("\
|
let cmd = match subcommand.as_str() {
|
||||||
Subcommands:
|
|
||||||
build Compile either the compiler or libraries
|
|
||||||
test Build and run some test suites
|
|
||||||
bench Build and run some benchmarks
|
|
||||||
doc Build documentation
|
|
||||||
clean Clean out build directories
|
|
||||||
dist Build and/or install distribution artifacts
|
|
||||||
|
|
||||||
To learn more about a subcommand, run `./x.py <command> -h`
|
|
||||||
");
|
|
||||||
|
|
||||||
process::exit(n);
|
|
||||||
};
|
|
||||||
if args.len() == 0 {
|
|
||||||
println!("a command must be passed");
|
|
||||||
usage(1, &opts);
|
|
||||||
}
|
|
||||||
let parse = |opts: &Options| {
|
|
||||||
let m = opts.parse(&args[1..]).unwrap_or_else(|e| {
|
|
||||||
println!("failed to parse options: {}", e);
|
|
||||||
usage(1, opts);
|
|
||||||
});
|
|
||||||
if m.opt_present("h") {
|
|
||||||
usage(0, opts);
|
|
||||||
}
|
|
||||||
return m
|
|
||||||
};
|
|
||||||
|
|
||||||
let cwd = t!(env::current_dir());
|
|
||||||
let remaining_as_path = |m: &Matches| {
|
|
||||||
m.free.iter().map(|p| cwd.join(p)).collect::<Vec<_>>()
|
|
||||||
};
|
|
||||||
|
|
||||||
let m: Matches;
|
|
||||||
let cmd = match &args[0][..] {
|
|
||||||
"build" => {
|
"build" => {
|
||||||
m = parse(&opts);
|
Subcommand::Build { paths: paths }
|
||||||
Subcommand::Build { paths: remaining_as_path(&m) }
|
|
||||||
}
|
|
||||||
"doc" => {
|
|
||||||
m = parse(&opts);
|
|
||||||
Subcommand::Doc { paths: remaining_as_path(&m) }
|
|
||||||
}
|
}
|
||||||
"test" => {
|
"test" => {
|
||||||
opts.optmulti("", "test-args", "extra arguments", "ARGS");
|
|
||||||
m = parse(&opts);
|
|
||||||
Subcommand::Test {
|
Subcommand::Test {
|
||||||
paths: remaining_as_path(&m),
|
paths: paths,
|
||||||
test_args: m.opt_strs("test-args"),
|
test_args: matches.opt_strs("test-args"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"bench" => {
|
"bench" => {
|
||||||
opts.optmulti("", "test-args", "extra arguments", "ARGS");
|
|
||||||
m = parse(&opts);
|
|
||||||
Subcommand::Bench {
|
Subcommand::Bench {
|
||||||
paths: remaining_as_path(&m),
|
paths: paths,
|
||||||
test_args: m.opt_strs("test-args"),
|
test_args: matches.opt_strs("test-args"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"doc" => {
|
||||||
|
Subcommand::Doc { paths: paths }
|
||||||
|
}
|
||||||
"clean" => {
|
"clean" => {
|
||||||
m = parse(&opts);
|
if paths.len() > 0 {
|
||||||
if m.free.len() > 0 {
|
println!("\nclean takes no arguments\n");
|
||||||
println!("clean takes no arguments");
|
usage(1, &opts, &subcommand_help, &extra_help);
|
||||||
usage(1, &opts);
|
|
||||||
}
|
}
|
||||||
Subcommand::Clean
|
Subcommand::Clean
|
||||||
}
|
}
|
||||||
"dist" => {
|
"dist" => {
|
||||||
opts.optflag("", "install", "run installer as well");
|
|
||||||
m = parse(&opts);
|
|
||||||
Subcommand::Dist {
|
Subcommand::Dist {
|
||||||
paths: remaining_as_path(&m),
|
paths: paths,
|
||||||
install: m.opt_present("install"),
|
install: matches.opt_present("install"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"--help" => usage(0, &opts),
|
_ => {
|
||||||
cmd => {
|
usage(1, &opts, &subcommand_help, &extra_help);
|
||||||
println!("unknown command: {}", cmd);
|
|
||||||
usage(1, &opts);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
let cfg_file = m.opt_str("config").map(PathBuf::from).or_else(|| {
|
let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| {
|
||||||
if fs::metadata("config.toml").is_ok() {
|
if fs::metadata("config.toml").is_ok() {
|
||||||
Some(PathBuf::from("config.toml"))
|
Some(PathBuf::from("config.toml"))
|
||||||
} else {
|
} else {
|
||||||
@@ -272,31 +298,29 @@ To learn more about a subcommand, run `./x.py <command> -h`
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut stage = m.opt_str("stage").map(|j| j.parse().unwrap());
|
let mut stage = matches.opt_str("stage").map(|j| j.parse().unwrap());
|
||||||
|
|
||||||
let incremental = m.opt_present("i");
|
if matches.opt_present("incremental") {
|
||||||
|
|
||||||
if incremental {
|
|
||||||
if stage.is_none() {
|
if stage.is_none() {
|
||||||
stage = Some(1);
|
stage = Some(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Flags {
|
Flags {
|
||||||
verbose: m.opt_count("v"),
|
verbose: matches.opt_count("verbose"),
|
||||||
stage: stage,
|
stage: stage,
|
||||||
on_fail: m.opt_str("on-fail"),
|
on_fail: matches.opt_str("on-fail"),
|
||||||
keep_stage: m.opt_str("keep-stage").map(|j| j.parse().unwrap()),
|
keep_stage: matches.opt_str("keep-stage").map(|j| j.parse().unwrap()),
|
||||||
build: m.opt_str("build").unwrap_or_else(|| {
|
build: matches.opt_str("build").unwrap_or_else(|| {
|
||||||
env::var("BUILD").unwrap()
|
env::var("BUILD").unwrap()
|
||||||
}),
|
}),
|
||||||
host: split(m.opt_strs("host")),
|
host: split(matches.opt_strs("host")),
|
||||||
target: split(m.opt_strs("target")),
|
target: split(matches.opt_strs("target")),
|
||||||
config: cfg_file,
|
config: cfg_file,
|
||||||
src: m.opt_str("src").map(PathBuf::from),
|
src: matches.opt_str("src").map(PathBuf::from),
|
||||||
jobs: m.opt_str("jobs").map(|j| j.parse().unwrap()),
|
jobs: matches.opt_str("jobs").map(|j| j.parse().unwrap()),
|
||||||
cmd: cmd,
|
cmd: cmd,
|
||||||
incremental: incremental,
|
incremental: matches.opt_present("incremental"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,24 +46,32 @@ pub fn install(build: &Build, stage: u32, host: &str) {
|
|||||||
let empty_dir = build.out.join("tmp/empty_dir");
|
let empty_dir = build.out.join("tmp/empty_dir");
|
||||||
t!(fs::create_dir_all(&empty_dir));
|
t!(fs::create_dir_all(&empty_dir));
|
||||||
if build.config.docs {
|
if build.config.docs {
|
||||||
install_sh(&build, "docs", "rust-docs", stage, host, &prefix,
|
install_sh(&build, "docs", "rust-docs", &build.rust_package_vers(),
|
||||||
&docdir, &libdir, &mandir, &empty_dir);
|
stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
|
||||||
}
|
}
|
||||||
if build.config.rust_save_analysis {
|
|
||||||
install_sh(&build, "analysis", "rust-analysis", stage, host, &prefix,
|
for target in build.config.target.iter() {
|
||||||
&docdir, &libdir, &mandir, &empty_dir);
|
install_sh(&build, "std", "rust-std", &build.rust_package_vers(),
|
||||||
|
stage, target, &prefix, &docdir, &libdir, &mandir, &empty_dir);
|
||||||
}
|
}
|
||||||
install_sh(&build, "std", "rust-std", stage, host, &prefix,
|
|
||||||
&docdir, &libdir, &mandir, &empty_dir);
|
if build.config.extended {
|
||||||
install_sh(&build, "rustc", "rustc", stage, host, &prefix,
|
install_sh(&build, "cargo", "cargo", &build.cargo_package_vers(),
|
||||||
&docdir, &libdir, &mandir, &empty_dir);
|
stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
|
||||||
|
install_sh(&build, "rls", "rls", &build.rls_package_vers(),
|
||||||
|
stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
install_sh(&build, "rustc", "rustc", &build.rust_package_vers(),
|
||||||
|
stage, host, &prefix, &docdir, &libdir, &mandir, &empty_dir);
|
||||||
|
|
||||||
t!(fs::remove_dir_all(&empty_dir));
|
t!(fs::remove_dir_all(&empty_dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn install_sh(build: &Build, package: &str, name: &str, stage: u32, host: &str,
|
fn install_sh(build: &Build, package: &str, name: &str, version: &str, stage: u32, host: &str,
|
||||||
prefix: &Path, docdir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
|
prefix: &Path, docdir: &Path, libdir: &Path, mandir: &Path, empty_dir: &Path) {
|
||||||
println!("Install {} stage{} ({})", package, stage, host);
|
println!("Install {} stage{} ({})", package, stage, host);
|
||||||
let package_name = format!("{}-{}-{}", name, build.rust_package_vers(), host);
|
let package_name = format!("{}-{}-{}", name, version, host);
|
||||||
|
|
||||||
let mut cmd = Command::new("sh");
|
let mut cmd = Command::new("sh");
|
||||||
cmd.current_dir(empty_dir)
|
cmd.current_dir(empty_dir)
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ pub struct Build {
|
|||||||
out: PathBuf,
|
out: PathBuf,
|
||||||
rust_info: channel::GitInfo,
|
rust_info: channel::GitInfo,
|
||||||
cargo_info: channel::GitInfo,
|
cargo_info: channel::GitInfo,
|
||||||
|
rls_info: channel::GitInfo,
|
||||||
local_rebuild: bool,
|
local_rebuild: bool,
|
||||||
|
|
||||||
// Probed tools at runtime
|
// Probed tools at runtime
|
||||||
@@ -162,6 +163,7 @@ pub struct Build {
|
|||||||
cxx: HashMap<String, gcc::Tool>,
|
cxx: HashMap<String, gcc::Tool>,
|
||||||
crates: HashMap<String, Crate>,
|
crates: HashMap<String, Crate>,
|
||||||
is_sudo: bool,
|
is_sudo: bool,
|
||||||
|
src_is_git: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
@@ -232,7 +234,9 @@ impl Build {
|
|||||||
None => false,
|
None => false,
|
||||||
};
|
};
|
||||||
let rust_info = channel::GitInfo::new(&src);
|
let rust_info = channel::GitInfo::new(&src);
|
||||||
let cargo_info = channel::GitInfo::new(&src.join("cargo"));
|
let cargo_info = channel::GitInfo::new(&src.join("src/tools/cargo"));
|
||||||
|
let rls_info = channel::GitInfo::new(&src.join("src/tools/rls"));
|
||||||
|
let src_is_git = src.join(".git").exists();
|
||||||
|
|
||||||
Build {
|
Build {
|
||||||
flags: flags,
|
flags: flags,
|
||||||
@@ -244,6 +248,7 @@ impl Build {
|
|||||||
|
|
||||||
rust_info: rust_info,
|
rust_info: rust_info,
|
||||||
cargo_info: cargo_info,
|
cargo_info: cargo_info,
|
||||||
|
rls_info: rls_info,
|
||||||
local_rebuild: local_rebuild,
|
local_rebuild: local_rebuild,
|
||||||
cc: HashMap::new(),
|
cc: HashMap::new(),
|
||||||
cxx: HashMap::new(),
|
cxx: HashMap::new(),
|
||||||
@@ -251,6 +256,7 @@ impl Build {
|
|||||||
lldb_version: None,
|
lldb_version: None,
|
||||||
lldb_python_dir: None,
|
lldb_python_dir: None,
|
||||||
is_sudo: is_sudo,
|
is_sudo: is_sudo,
|
||||||
|
src_is_git: src_is_git,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,10 +313,7 @@ impl Build {
|
|||||||
OutOfSync,
|
OutOfSync,
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.config.submodules {
|
if !self.src_is_git || !self.config.submodules {
|
||||||
return
|
|
||||||
}
|
|
||||||
if fs::metadata(self.src.join(".git")).is_err() {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let git = || {
|
let git = || {
|
||||||
@@ -461,8 +464,6 @@ impl Build {
|
|||||||
.env("RUSTC", self.out.join("bootstrap/debug/rustc"))
|
.env("RUSTC", self.out.join("bootstrap/debug/rustc"))
|
||||||
.env("RUSTC_REAL", self.compiler_path(compiler))
|
.env("RUSTC_REAL", self.compiler_path(compiler))
|
||||||
.env("RUSTC_STAGE", stage.to_string())
|
.env("RUSTC_STAGE", stage.to_string())
|
||||||
.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string())
|
|
||||||
.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string())
|
|
||||||
.env("RUSTC_CODEGEN_UNITS",
|
.env("RUSTC_CODEGEN_UNITS",
|
||||||
self.config.rust_codegen_units.to_string())
|
self.config.rust_codegen_units.to_string())
|
||||||
.env("RUSTC_DEBUG_ASSERTIONS",
|
.env("RUSTC_DEBUG_ASSERTIONS",
|
||||||
@@ -474,6 +475,13 @@ impl Build {
|
|||||||
.env("RUSTDOC_REAL", self.rustdoc(compiler))
|
.env("RUSTDOC_REAL", self.rustdoc(compiler))
|
||||||
.env("RUSTC_FLAGS", self.rustc_flags(target).join(" "));
|
.env("RUSTC_FLAGS", self.rustc_flags(target).join(" "));
|
||||||
|
|
||||||
|
// Tools don't get debuginfo right now, e.g. cargo and rls don't get
|
||||||
|
// compiled with debuginfo.
|
||||||
|
if mode != Mode::Tool {
|
||||||
|
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string())
|
||||||
|
.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
|
||||||
|
}
|
||||||
|
|
||||||
// Enable usage of unstable features
|
// Enable usage of unstable features
|
||||||
cargo.env("RUSTC_BOOTSTRAP", "1");
|
cargo.env("RUSTC_BOOTSTRAP", "1");
|
||||||
self.add_rust_test_threads(&mut cargo);
|
self.add_rust_test_threads(&mut cargo);
|
||||||
@@ -545,10 +553,23 @@ impl Build {
|
|||||||
.env(format!("CFLAGS_{}", target), self.cflags(target).join(" "));
|
.env(format!("CFLAGS_{}", target), self.cflags(target).join(" "));
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.config.rust_save_analysis && compiler.is_final_stage(self) {
|
if self.config.extended && compiler.is_final_stage(self) {
|
||||||
cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());
|
cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// When being built Cargo will at some point call `nmake.exe` on Windows
|
||||||
|
// MSVC. Unfortunately `nmake` will read these two environment variables
|
||||||
|
// below and try to intepret them. We're likely being run, however, from
|
||||||
|
// MSYS `make` which uses the same variables.
|
||||||
|
//
|
||||||
|
// As a result, to prevent confusion and errors, we remove these
|
||||||
|
// variables from our environment to prevent passing MSYS make flags to
|
||||||
|
// nmake, causing it to blow up.
|
||||||
|
if cfg!(target_env = "msvc") {
|
||||||
|
cargo.env_remove("MAKE");
|
||||||
|
cargo.env_remove("MAKEFLAGS");
|
||||||
|
}
|
||||||
|
|
||||||
// Environment variables *required* needed throughout the build
|
// Environment variables *required* needed throughout the build
|
||||||
//
|
//
|
||||||
// FIXME: should update code to not require this env var
|
// FIXME: should update code to not require this env var
|
||||||
@@ -874,6 +895,13 @@ impl Build {
|
|||||||
if target.contains("apple-darwin") {
|
if target.contains("apple-darwin") {
|
||||||
base.push("-stdlib=libc++".into());
|
base.push("-stdlib=libc++".into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Work around an apparently bad MinGW / GCC optimization,
|
||||||
|
// See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html
|
||||||
|
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78936
|
||||||
|
if target == "i686-pc-windows-gnu" {
|
||||||
|
base.push("-fno-omit-frame-pointer".into());
|
||||||
|
}
|
||||||
return base
|
return base
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -917,6 +945,12 @@ impl Build {
|
|||||||
.map(|p| &**p)
|
.map(|p| &**p)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns whether the target will be tested using the `remote-test-client`
|
||||||
|
/// and `remote-test-server` binaries.
|
||||||
|
fn remote_tested(&self, target: &str) -> bool {
|
||||||
|
self.qemu_rootfs(target).is_some() || target.contains("android")
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns the root of the "rootfs" image that this target will be using,
|
/// Returns the root of the "rootfs" image that this target will be using,
|
||||||
/// if one was configured.
|
/// if one was configured.
|
||||||
///
|
///
|
||||||
@@ -1017,7 +1051,12 @@ impl Build {
|
|||||||
|
|
||||||
/// Returns the value of `package_vers` above for Cargo
|
/// Returns the value of `package_vers` above for Cargo
|
||||||
fn cargo_package_vers(&self) -> String {
|
fn cargo_package_vers(&self) -> String {
|
||||||
self.package_vers(&self.cargo_release_num())
|
self.package_vers(&self.release_num("cargo"))
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the value of `package_vers` above for rls
|
||||||
|
fn rls_package_vers(&self) -> String {
|
||||||
|
self.package_vers(&self.release_num("rls"))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the `version` string associated with this compiler for Rust
|
/// Returns the `version` string associated with this compiler for Rust
|
||||||
@@ -1029,10 +1068,11 @@ impl Build {
|
|||||||
self.rust_info.version(self, channel::CFG_RELEASE_NUM)
|
self.rust_info.version(self, channel::CFG_RELEASE_NUM)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the `a.b.c` version that Cargo is at.
|
/// Returns the `a.b.c` version that the given package is at.
|
||||||
fn cargo_release_num(&self) -> String {
|
fn release_num(&self, package: &str) -> String {
|
||||||
let mut toml = String::new();
|
let mut toml = String::new();
|
||||||
t!(t!(File::open(self.src.join("cargo/Cargo.toml"))).read_to_string(&mut toml));
|
let toml_file_name = self.src.join(&format!("src/tools/{}/Cargo.toml", package));
|
||||||
|
t!(t!(File::open(toml_file_name)).read_to_string(&mut toml));
|
||||||
for line in toml.lines() {
|
for line in toml.lines() {
|
||||||
let prefix = "version = \"";
|
let prefix = "version = \"";
|
||||||
let suffix = "\"";
|
let suffix = "\"";
|
||||||
@@ -1041,7 +1081,7 @@ impl Build {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
panic!("failed to find version in cargo's Cargo.toml")
|
panic!("failed to find version in {}'s Cargo.toml", package)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns whether unstable features should be enabled for the compiler
|
/// Returns whether unstable features should be enabled for the compiler
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ fn build_krate(build: &mut Build, krate: &str) {
|
|||||||
// the dependency graph and what `-p` arguments there are.
|
// the dependency graph and what `-p` arguments there are.
|
||||||
let mut cargo = Command::new(&build.cargo);
|
let mut cargo = Command::new(&build.cargo);
|
||||||
cargo.arg("metadata")
|
cargo.arg("metadata")
|
||||||
|
.arg("--format-version").arg("1")
|
||||||
.arg("--manifest-path").arg(build.src.join(krate).join("Cargo.toml"));
|
.arg("--manifest-path").arg(build.src.join(krate).join("Cargo.toml"));
|
||||||
let output = output(&mut cargo);
|
let output = output(&mut cargo);
|
||||||
let output: Output = json::decode(&output).unwrap();
|
let output: Output = json::decode(&output).unwrap();
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ check:
|
|||||||
check-aux:
|
check-aux:
|
||||||
$(Q)$(BOOTSTRAP) test \
|
$(Q)$(BOOTSTRAP) test \
|
||||||
src/tools/cargotest \
|
src/tools/cargotest \
|
||||||
|
cargo \
|
||||||
src/test/pretty \
|
src/test/pretty \
|
||||||
src/test/run-pass/pretty \
|
src/test/run-pass/pretty \
|
||||||
src/test/run-fail/pretty \
|
src/test/run-fail/pretty \
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
//! ensure that they're always in place if needed.
|
//! ensure that they're always in place if needed.
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
|
use std::ffi::OsString;
|
||||||
use std::fs::{self, File};
|
use std::fs::{self, File};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
@@ -81,7 +82,7 @@ pub fn llvm(build: &Build, target: &str) {
|
|||||||
// NOTE: remember to also update `config.toml.example` when changing the defaults!
|
// NOTE: remember to also update `config.toml.example` when changing the defaults!
|
||||||
let llvm_targets = match build.config.llvm_targets {
|
let llvm_targets = match build.config.llvm_targets {
|
||||||
Some(ref s) => s,
|
Some(ref s) => s,
|
||||||
None => "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX",
|
None => "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon",
|
||||||
};
|
};
|
||||||
|
|
||||||
let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
|
let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"};
|
||||||
@@ -129,25 +130,59 @@ pub fn llvm(build: &Build, target: &str) {
|
|||||||
.define("LLVM_TABLEGEN", &host);
|
.define("LLVM_TABLEGEN", &host);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MSVC handles compiler business itself
|
let sanitize_cc = |cc: &Path| {
|
||||||
if !target.contains("msvc") {
|
if target.contains("msvc") {
|
||||||
if let Some(ref ccache) = build.config.ccache {
|
OsString::from(cc.to_str().unwrap().replace("\\", "/"))
|
||||||
cfg.define("CMAKE_C_COMPILER", ccache)
|
|
||||||
.define("CMAKE_C_COMPILER_ARG1", build.cc(target))
|
|
||||||
.define("CMAKE_CXX_COMPILER", ccache)
|
|
||||||
.define("CMAKE_CXX_COMPILER_ARG1", build.cxx(target));
|
|
||||||
} else {
|
} else {
|
||||||
cfg.define("CMAKE_C_COMPILER", build.cc(target))
|
cc.as_os_str().to_owned()
|
||||||
.define("CMAKE_CXX_COMPILER", build.cxx(target));
|
|
||||||
}
|
}
|
||||||
cfg.build_arg("-j").build_arg(build.jobs().to_string());
|
};
|
||||||
|
|
||||||
|
let configure_compilers = |cfg: &mut cmake::Config| {
|
||||||
|
// MSVC with CMake uses msbuild by default which doesn't respect these
|
||||||
|
// vars that we'd otherwise configure. In that case we just skip this
|
||||||
|
// entirely.
|
||||||
|
if target.contains("msvc") && !build.config.ninja {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let cc = build.cc(target);
|
||||||
|
let cxx = build.cxx(target);
|
||||||
|
|
||||||
|
// Handle msvc + ninja + ccache specially (this is what the bots use)
|
||||||
|
if target.contains("msvc") &&
|
||||||
|
build.config.ninja &&
|
||||||
|
build.config.ccache.is_some() {
|
||||||
|
let mut cc = env::current_exe().expect("failed to get cwd");
|
||||||
|
cc.set_file_name("sccache-plus-cl.exe");
|
||||||
|
|
||||||
|
cfg.define("CMAKE_C_COMPILER", sanitize_cc(&cc))
|
||||||
|
.define("CMAKE_CXX_COMPILER", sanitize_cc(&cc));
|
||||||
|
cfg.env("SCCACHE_PATH",
|
||||||
|
build.config.ccache.as_ref().unwrap())
|
||||||
|
.env("SCCACHE_TARGET", target);
|
||||||
|
|
||||||
|
// If ccache is configured we inform the build a little differently hwo
|
||||||
|
// to invoke ccache while also invoking our compilers.
|
||||||
|
} else if let Some(ref ccache) = build.config.ccache {
|
||||||
|
cfg.define("CMAKE_C_COMPILER", ccache)
|
||||||
|
.define("CMAKE_C_COMPILER_ARG1", sanitize_cc(cc))
|
||||||
|
.define("CMAKE_CXX_COMPILER", ccache)
|
||||||
|
.define("CMAKE_CXX_COMPILER_ARG1", sanitize_cc(cxx));
|
||||||
|
} else {
|
||||||
|
cfg.define("CMAKE_C_COMPILER", sanitize_cc(cc))
|
||||||
|
.define("CMAKE_CXX_COMPILER", sanitize_cc(cxx));
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg.build_arg("-j").build_arg(build.jobs().to_string());
|
||||||
cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" "));
|
cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" "));
|
||||||
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
|
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
|
||||||
}
|
};
|
||||||
|
|
||||||
|
configure_compilers(&mut cfg);
|
||||||
|
|
||||||
if env::var_os("SCCACHE_ERROR_LOG").is_some() {
|
if env::var_os("SCCACHE_ERROR_LOG").is_some() {
|
||||||
cfg.env("RUST_LOG", "sccache=debug");
|
cfg.env("RUST_LOG", "sccache=info");
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: we don't actually need to build all LLVM tools and all LLVM
|
// FIXME: we don't actually need to build all LLVM tools and all LLVM
|
||||||
@@ -306,7 +341,7 @@ pub fn openssl(build: &Build, target: &str) {
|
|||||||
println!("Configuring openssl for {}", target);
|
println!("Configuring openssl for {}", target);
|
||||||
build.run_quiet(&mut configure);
|
build.run_quiet(&mut configure);
|
||||||
println!("Building openssl for {}", target);
|
println!("Building openssl for {}", target);
|
||||||
build.run_quiet(Command::new("make").current_dir(&obj));
|
build.run_quiet(Command::new("make").arg("-j1").current_dir(&obj));
|
||||||
println!("Installing openssl for {}", target);
|
println!("Installing openssl for {}", target);
|
||||||
build.run_quiet(Command::new("make").arg("install").current_dir(&obj));
|
build.run_quiet(Command::new("make").arg("install").current_dir(&obj));
|
||||||
|
|
||||||
|
|||||||
@@ -65,27 +65,26 @@ pub fn check(build: &mut Build) {
|
|||||||
|
|
||||||
// If we've got a git directory we're gona need git to update
|
// If we've got a git directory we're gona need git to update
|
||||||
// submodules and learn about various other aspects.
|
// submodules and learn about various other aspects.
|
||||||
if fs::metadata(build.src.join(".git")).is_ok() {
|
if build.src_is_git {
|
||||||
need_cmd("git".as_ref());
|
need_cmd("git".as_ref());
|
||||||
}
|
}
|
||||||
|
|
||||||
// We need cmake, but only if we're actually building LLVM
|
// We need cmake, but only if we're actually building LLVM or sanitizers.
|
||||||
for host in build.config.host.iter() {
|
let building_llvm = build.config.host.iter()
|
||||||
if let Some(config) = build.config.target_config.get(host) {
|
.filter_map(|host| build.config.target_config.get(host))
|
||||||
if config.llvm_config.is_some() {
|
.any(|config| config.llvm_config.is_none());
|
||||||
continue
|
if building_llvm || build.config.sanitizers {
|
||||||
}
|
|
||||||
}
|
|
||||||
need_cmd("cmake".as_ref());
|
need_cmd("cmake".as_ref());
|
||||||
if build.config.ninja {
|
}
|
||||||
|
|
||||||
|
// Ninja is currently only used for LLVM itself.
|
||||||
|
if building_llvm && build.config.ninja {
|
||||||
// Some Linux distros rename `ninja` to `ninja-build`.
|
// Some Linux distros rename `ninja` to `ninja-build`.
|
||||||
// CMake can work with either binary name.
|
// CMake can work with either binary name.
|
||||||
if have_cmd("ninja-build".as_ref()).is_none() {
|
if have_cmd("ninja-build".as_ref()).is_none() {
|
||||||
need_cmd("ninja".as_ref());
|
need_cmd("ninja".as_ref());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
if build.config.python.is_none() {
|
if build.config.python.is_none() {
|
||||||
build.config.python = have_cmd("python2.7".as_ref());
|
build.config.python = have_cmd("python2.7".as_ref());
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
//! along with the actual implementation elsewhere. You can find more comments
|
//! along with the actual implementation elsewhere. You can find more comments
|
||||||
//! about how to define rules themselves below.
|
//! about how to define rules themselves below.
|
||||||
|
|
||||||
use std::collections::{BTreeMap, HashSet};
|
use std::collections::{BTreeMap, HashSet, HashMap};
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use check::{self, TestKind};
|
use check::{self, TestKind};
|
||||||
@@ -137,7 +137,9 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
while let Some(krate) = list.pop() {
|
while let Some(krate) = list.pop() {
|
||||||
let default = krate == name;
|
let default = krate == name;
|
||||||
let krate = &build.crates[krate];
|
let krate = &build.crates[krate];
|
||||||
let path = krate.path.strip_prefix(&build.src).unwrap();
|
let path = krate.path.strip_prefix(&build.src)
|
||||||
|
// This handles out of tree paths
|
||||||
|
.unwrap_or(&krate.path);
|
||||||
ret.push((krate, path.to_str().unwrap(), default));
|
ret.push((krate, path.to_str().unwrap(), default));
|
||||||
for dep in krate.deps.iter() {
|
for dep in krate.deps.iter() {
|
||||||
if visited.insert(dep) && dep != "build_helper" {
|
if visited.insert(dep) && dep != "build_helper" {
|
||||||
@@ -305,7 +307,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("tool-compiletest").target(s.host).stage(0))
|
.dep(|s| s.name("tool-compiletest").target(s.host).stage(0))
|
||||||
.dep(|s| s.name("test-helpers"))
|
.dep(|s| s.name("test-helpers"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.default(mode != "pretty") // pretty tests don't run everywhere
|
.default(mode != "pretty") // pretty tests don't run everywhere
|
||||||
.run(move |s| {
|
.run(move |s| {
|
||||||
check::compiletest(build, &s.compiler(), s.target, mode, dir)
|
check::compiletest(build, &s.compiler(), s.target, mode, dir)
|
||||||
@@ -344,7 +346,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
.dep(|s| s.name("tool-compiletest").target(s.host).stage(0))
|
.dep(|s| s.name("tool-compiletest").target(s.host).stage(0))
|
||||||
.dep(|s| s.name("test-helpers"))
|
.dep(|s| s.name("test-helpers"))
|
||||||
.dep(|s| s.name("debugger-scripts"))
|
.dep(|s| s.name("debugger-scripts"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.run(move |s| check::compiletest(build, &s.compiler(), s.target,
|
.run(move |s| check::compiletest(build, &s.compiler(), s.target,
|
||||||
"debuginfo-gdb", "debuginfo"));
|
"debuginfo-gdb", "debuginfo"));
|
||||||
let mut rule = rules.test("check-debuginfo", "src/test/debuginfo");
|
let mut rule = rules.test("check-debuginfo", "src/test/debuginfo");
|
||||||
@@ -398,14 +400,14 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
for (krate, path, _default) in krates("std") {
|
for (krate, path, _default) in krates("std") {
|
||||||
rules.test(&krate.test_step, path)
|
rules.test(&krate.test_step, path)
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Libstd, TestKind::Test,
|
Mode::Libstd, TestKind::Test,
|
||||||
Some(&krate.name)));
|
Some(&krate.name)));
|
||||||
}
|
}
|
||||||
rules.test("check-std-all", "path/to/nowhere")
|
rules.test("check-std-all", "path/to/nowhere")
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.default(true)
|
.default(true)
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Libstd, TestKind::Test, None));
|
Mode::Libstd, TestKind::Test, None));
|
||||||
@@ -414,14 +416,14 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
for (krate, path, _default) in krates("std") {
|
for (krate, path, _default) in krates("std") {
|
||||||
rules.bench(&krate.bench_step, path)
|
rules.bench(&krate.bench_step, path)
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Libstd, TestKind::Bench,
|
Mode::Libstd, TestKind::Bench,
|
||||||
Some(&krate.name)));
|
Some(&krate.name)));
|
||||||
}
|
}
|
||||||
rules.bench("bench-std-all", "path/to/nowhere")
|
rules.bench("bench-std-all", "path/to/nowhere")
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.default(true)
|
.default(true)
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Libstd, TestKind::Bench, None));
|
Mode::Libstd, TestKind::Bench, None));
|
||||||
@@ -429,21 +431,21 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
for (krate, path, _default) in krates("test") {
|
for (krate, path, _default) in krates("test") {
|
||||||
rules.test(&krate.test_step, path)
|
rules.test(&krate.test_step, path)
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Libtest, TestKind::Test,
|
Mode::Libtest, TestKind::Test,
|
||||||
Some(&krate.name)));
|
Some(&krate.name)));
|
||||||
}
|
}
|
||||||
rules.test("check-test-all", "path/to/nowhere")
|
rules.test("check-test-all", "path/to/nowhere")
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.default(true)
|
.default(true)
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Libtest, TestKind::Test, None));
|
Mode::Libtest, TestKind::Test, None));
|
||||||
for (krate, path, _default) in krates("rustc-main") {
|
for (krate, path, _default) in krates("rustc-main") {
|
||||||
rules.test(&krate.test_step, path)
|
rules.test(&krate.test_step, path)
|
||||||
.dep(|s| s.name("librustc"))
|
.dep(|s| s.name("librustc"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.host(true)
|
.host(true)
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
Mode::Librustc, TestKind::Test,
|
Mode::Librustc, TestKind::Test,
|
||||||
@@ -451,7 +453,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
}
|
}
|
||||||
rules.test("check-rustc-all", "path/to/nowhere")
|
rules.test("check-rustc-all", "path/to/nowhere")
|
||||||
.dep(|s| s.name("librustc"))
|
.dep(|s| s.name("librustc"))
|
||||||
.dep(|s| s.name("emulator-copy-libs"))
|
.dep(|s| s.name("remote-copy-libs"))
|
||||||
.default(true)
|
.default(true)
|
||||||
.host(true)
|
.host(true)
|
||||||
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
.run(move |s| check::krate(build, &s.compiler(), s.target,
|
||||||
@@ -468,6 +470,10 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
.dep(|s| s.name("librustc"))
|
.dep(|s| s.name("librustc"))
|
||||||
.host(true)
|
.host(true)
|
||||||
.run(move |s| check::cargotest(build, s.stage, s.target));
|
.run(move |s| check::cargotest(build, s.stage, s.target));
|
||||||
|
rules.test("check-cargo", "cargo")
|
||||||
|
.dep(|s| s.name("tool-cargo"))
|
||||||
|
.host(true)
|
||||||
|
.run(move |s| check::cargo(build, s.stage, s.target));
|
||||||
rules.test("check-tidy", "src/tools/tidy")
|
rules.test("check-tidy", "src/tools/tidy")
|
||||||
.dep(|s| s.name("tool-tidy").stage(0))
|
.dep(|s| s.name("tool-tidy").stage(0))
|
||||||
.default(true)
|
.default(true)
|
||||||
@@ -494,33 +500,33 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
rules.build("openssl", "path/to/nowhere")
|
rules.build("openssl", "path/to/nowhere")
|
||||||
.run(move |s| native::openssl(build, s.target));
|
.run(move |s| native::openssl(build, s.target));
|
||||||
|
|
||||||
// Some test suites are run inside emulators, and most of our test binaries
|
// Some test suites are run inside emulators or on remote devices, and most
|
||||||
// are linked dynamically which means we need to ship the standard library
|
// of our test binaries are linked dynamically which means we need to ship
|
||||||
// and such to the emulator ahead of time. This step represents this and is
|
// the standard library and such to the emulator ahead of time. This step
|
||||||
// a dependency of all test suites.
|
// represents this and is a dependency of all test suites.
|
||||||
//
|
//
|
||||||
// Most of the time this step is a noop (the `check::emulator_copy_libs`
|
// Most of the time this step is a noop (the `check::emulator_copy_libs`
|
||||||
// only does work if necessary). For some steps such as shipping data to
|
// only does work if necessary). For some steps such as shipping data to
|
||||||
// QEMU we have to build our own tools so we've got conditional dependencies
|
// QEMU we have to build our own tools so we've got conditional dependencies
|
||||||
// on those programs as well. Note that the QEMU client is built for the
|
// on those programs as well. Note that the remote test client is built for
|
||||||
// build target (us) and the server is built for the target.
|
// the build target (us) and the server is built for the target.
|
||||||
rules.test("emulator-copy-libs", "path/to/nowhere")
|
rules.test("remote-copy-libs", "path/to/nowhere")
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("libtest"))
|
||||||
.dep(move |s| {
|
.dep(move |s| {
|
||||||
if build.qemu_rootfs(s.target).is_some() {
|
if build.remote_tested(s.target) {
|
||||||
s.name("tool-qemu-test-client").target(s.host).stage(0)
|
s.name("tool-remote-test-client").target(s.host).stage(0)
|
||||||
} else {
|
} else {
|
||||||
Step::noop()
|
Step::noop()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.dep(move |s| {
|
.dep(move |s| {
|
||||||
if build.qemu_rootfs(s.target).is_some() {
|
if build.remote_tested(s.target) {
|
||||||
s.name("tool-qemu-test-server")
|
s.name("tool-remote-test-server")
|
||||||
} else {
|
} else {
|
||||||
Step::noop()
|
Step::noop()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.run(move |s| check::emulator_copy_libs(build, &s.compiler(), s.target));
|
.run(move |s| check::remote_copy_libs(build, &s.compiler(), s.target));
|
||||||
|
|
||||||
rules.test("check-bootstrap", "src/bootstrap")
|
rules.test("check-bootstrap", "src/bootstrap")
|
||||||
.default(true)
|
.default(true)
|
||||||
@@ -533,34 +539,46 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
//
|
//
|
||||||
// Tools used during the build system but not shipped
|
// Tools used during the build system but not shipped
|
||||||
rules.build("tool-rustbook", "src/tools/rustbook")
|
rules.build("tool-rustbook", "src/tools/rustbook")
|
||||||
.dep(|s| s.name("librustc"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("librustc-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "rustbook"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "rustbook"));
|
||||||
rules.build("tool-error-index", "src/tools/error_index_generator")
|
rules.build("tool-error-index", "src/tools/error_index_generator")
|
||||||
.dep(|s| s.name("librustc"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("librustc-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "error_index_generator"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "error_index_generator"));
|
||||||
rules.build("tool-tidy", "src/tools/tidy")
|
rules.build("tool-tidy", "src/tools/tidy")
|
||||||
.dep(|s| s.name("libstd"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("libstd-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "tidy"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "tidy"));
|
||||||
rules.build("tool-linkchecker", "src/tools/linkchecker")
|
rules.build("tool-linkchecker", "src/tools/linkchecker")
|
||||||
.dep(|s| s.name("libstd"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("libstd-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "linkchecker"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "linkchecker"));
|
||||||
rules.build("tool-cargotest", "src/tools/cargotest")
|
rules.build("tool-cargotest", "src/tools/cargotest")
|
||||||
.dep(|s| s.name("libstd"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("libstd-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "cargotest"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "cargotest"));
|
||||||
rules.build("tool-compiletest", "src/tools/compiletest")
|
rules.build("tool-compiletest", "src/tools/compiletest")
|
||||||
.dep(|s| s.name("libtest"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("libtest-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "compiletest"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "compiletest"));
|
||||||
rules.build("tool-build-manifest", "src/tools/build-manifest")
|
rules.build("tool-build-manifest", "src/tools/build-manifest")
|
||||||
.dep(|s| s.name("libstd"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("libstd-tool"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "build-manifest"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "build-manifest"));
|
||||||
rules.build("tool-qemu-test-server", "src/tools/qemu-test-server")
|
rules.build("tool-remote-test-server", "src/tools/remote-test-server")
|
||||||
.dep(|s| s.name("libstd"))
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-server"));
|
.dep(|s| s.name("libstd-tool"))
|
||||||
rules.build("tool-qemu-test-client", "src/tools/qemu-test-client")
|
.run(move |s| compile::tool(build, s.stage, s.target, "remote-test-server"));
|
||||||
.dep(|s| s.name("libstd"))
|
rules.build("tool-remote-test-client", "src/tools/remote-test-client")
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-client"));
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
rules.build("tool-cargo", "cargo")
|
.dep(|s| s.name("libstd-tool"))
|
||||||
.dep(|s| s.name("libstd"))
|
.run(move |s| compile::tool(build, s.stage, s.target, "remote-test-client"));
|
||||||
|
rules.build("tool-cargo", "src/tools/cargo")
|
||||||
|
.host(true)
|
||||||
|
.default(build.config.extended)
|
||||||
|
.dep(|s| s.name("maybe-clean-tools"))
|
||||||
|
.dep(|s| s.name("libstd-tool"))
|
||||||
.dep(|s| s.stage(0).host(s.target).name("openssl"))
|
.dep(|s| s.stage(0).host(s.target).name("openssl"))
|
||||||
.dep(move |s| {
|
.dep(move |s| {
|
||||||
// Cargo depends on procedural macros, which requires a full host
|
// Cargo depends on procedural macros, which requires a full host
|
||||||
@@ -570,6 +588,37 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
.host(&build.config.build)
|
.host(&build.config.build)
|
||||||
})
|
})
|
||||||
.run(move |s| compile::tool(build, s.stage, s.target, "cargo"));
|
.run(move |s| compile::tool(build, s.stage, s.target, "cargo"));
|
||||||
|
rules.build("tool-rls", "src/tools/rls")
|
||||||
|
.host(true)
|
||||||
|
.default(build.config.extended)
|
||||||
|
.dep(|s| s.name("librustc-tool"))
|
||||||
|
.dep(|s| s.stage(0).host(s.target).name("openssl"))
|
||||||
|
.dep(move |s| {
|
||||||
|
// rls, like cargo, uses procedural macros
|
||||||
|
s.name("librustc-link")
|
||||||
|
.target(&build.config.build)
|
||||||
|
.host(&build.config.build)
|
||||||
|
})
|
||||||
|
.run(move |s| compile::tool(build, s.stage, s.target, "rls"));
|
||||||
|
|
||||||
|
// "pseudo rule" which represents completely cleaning out the tools dir in
|
||||||
|
// one stage. This needs to happen whenever a dependency changes (e.g.
|
||||||
|
// libstd, libtest, librustc) and all of the tool compilations above will
|
||||||
|
// be sequenced after this rule.
|
||||||
|
rules.build("maybe-clean-tools", "path/to/nowhere")
|
||||||
|
.after("librustc-tool")
|
||||||
|
.after("libtest-tool")
|
||||||
|
.after("libstd-tool");
|
||||||
|
|
||||||
|
rules.build("librustc-tool", "path/to/nowhere")
|
||||||
|
.dep(|s| s.name("librustc"))
|
||||||
|
.run(move |s| compile::maybe_clean_tools(build, s.stage, s.target, Mode::Librustc));
|
||||||
|
rules.build("libtest-tool", "path/to/nowhere")
|
||||||
|
.dep(|s| s.name("libtest"))
|
||||||
|
.run(move |s| compile::maybe_clean_tools(build, s.stage, s.target, Mode::Libtest));
|
||||||
|
rules.build("libstd-tool", "path/to/nowhere")
|
||||||
|
.dep(|s| s.name("libstd"))
|
||||||
|
.run(move |s| compile::maybe_clean_tools(build, s.stage, s.target, Mode::Libstd));
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
// Documentation targets
|
// Documentation targets
|
||||||
@@ -690,10 +739,15 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
.dep(|s| s.name("default:doc"))
|
.dep(|s| s.name("default:doc"))
|
||||||
.run(move |s| dist::docs(build, s.stage, s.target));
|
.run(move |s| dist::docs(build, s.stage, s.target));
|
||||||
rules.dist("dist-analysis", "analysis")
|
rules.dist("dist-analysis", "analysis")
|
||||||
|
.default(build.config.extended)
|
||||||
.dep(|s| s.name("dist-std"))
|
.dep(|s| s.name("dist-std"))
|
||||||
.default(true)
|
|
||||||
.only_host_build(true)
|
.only_host_build(true)
|
||||||
.run(move |s| dist::analysis(build, &s.compiler(), s.target));
|
.run(move |s| dist::analysis(build, &s.compiler(), s.target));
|
||||||
|
rules.dist("dist-rls", "rls")
|
||||||
|
.host(true)
|
||||||
|
.only_host_build(true)
|
||||||
|
.dep(|s| s.name("tool-rls"))
|
||||||
|
.run(move |s| dist::rls(build, s.stage, s.target));
|
||||||
rules.dist("install", "path/to/nowhere")
|
rules.dist("install", "path/to/nowhere")
|
||||||
.dep(|s| s.name("default:dist"))
|
.dep(|s| s.name("default:dist"))
|
||||||
.run(move |s| install::install(build, s.stage, s.target));
|
.run(move |s| install::install(build, s.stage, s.target));
|
||||||
@@ -711,6 +765,8 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
|
|||||||
.dep(|d| d.name("dist-mingw"))
|
.dep(|d| d.name("dist-mingw"))
|
||||||
.dep(|d| d.name("dist-docs"))
|
.dep(|d| d.name("dist-docs"))
|
||||||
.dep(|d| d.name("dist-cargo"))
|
.dep(|d| d.name("dist-cargo"))
|
||||||
|
.dep(|d| d.name("dist-rls"))
|
||||||
|
.dep(|d| d.name("dist-analysis"))
|
||||||
.run(move |s| dist::extended(build, s.stage, s.target));
|
.run(move |s| dist::extended(build, s.stage, s.target));
|
||||||
|
|
||||||
rules.dist("dist-sign", "hash-and-sign")
|
rules.dist("dist-sign", "hash-and-sign")
|
||||||
@@ -811,6 +867,11 @@ struct Rule<'a> {
|
|||||||
/// Whether this rule is only for the build triple, not anything in hosts or
|
/// Whether this rule is only for the build triple, not anything in hosts or
|
||||||
/// targets.
|
/// targets.
|
||||||
only_build: bool,
|
only_build: bool,
|
||||||
|
|
||||||
|
/// A list of "order only" dependencies. This rules does not actually
|
||||||
|
/// depend on these rules, but if they show up in the dependency graph then
|
||||||
|
/// this rule must be executed after all these rules.
|
||||||
|
after: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
@@ -834,6 +895,7 @@ impl<'a> Rule<'a> {
|
|||||||
host: false,
|
host: false,
|
||||||
only_host_build: false,
|
only_host_build: false,
|
||||||
only_build: false,
|
only_build: false,
|
||||||
|
after: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -853,6 +915,11 @@ impl<'a, 'b> RuleBuilder<'a, 'b> {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn after(&mut self, step: &'a str) -> &mut Self {
|
||||||
|
self.rule.after.push(step);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
fn run<F>(&mut self, f: F) -> &mut Self
|
fn run<F>(&mut self, f: F) -> &mut Self
|
||||||
where F: Fn(&Step<'a>) + 'a,
|
where F: Fn(&Step<'a>) + 'a,
|
||||||
{
|
{
|
||||||
@@ -978,26 +1045,25 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn print_help(&self, command: &str) {
|
pub fn get_help(&self, command: &str) -> Option<String> {
|
||||||
let kind = match command {
|
let kind = match command {
|
||||||
"build" => Kind::Build,
|
"build" => Kind::Build,
|
||||||
"doc" => Kind::Doc,
|
"doc" => Kind::Doc,
|
||||||
"test" => Kind::Test,
|
"test" => Kind::Test,
|
||||||
"bench" => Kind::Bench,
|
"bench" => Kind::Bench,
|
||||||
"dist" => Kind::Dist,
|
"dist" => Kind::Dist,
|
||||||
_ => return,
|
_ => return None,
|
||||||
};
|
};
|
||||||
let rules = self.rules.values().filter(|r| r.kind == kind);
|
let rules = self.rules.values().filter(|r| r.kind == kind);
|
||||||
let rules = rules.filter(|r| !r.path.contains("nowhere"));
|
let rules = rules.filter(|r| !r.path.contains("nowhere"));
|
||||||
let mut rules = rules.collect::<Vec<_>>();
|
let mut rules = rules.collect::<Vec<_>>();
|
||||||
rules.sort_by_key(|r| r.path);
|
rules.sort_by_key(|r| r.path);
|
||||||
|
|
||||||
println!("Available paths:\n");
|
let mut help_string = String::from("Available paths:\n");
|
||||||
for rule in rules {
|
for rule in rules {
|
||||||
print!(" ./x.py {} {}", command, rule.path);
|
help_string.push_str(format!(" ./x.py {} {}\n", command, rule.path).as_str());
|
||||||
|
|
||||||
println!("");
|
|
||||||
}
|
}
|
||||||
|
Some(help_string)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Construct the top-level build steps that we're going to be executing,
|
/// Construct the top-level build steps that we're going to be executing,
|
||||||
@@ -1137,31 +1203,52 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
|
|||||||
/// From the top level targets `steps` generate a topological ordering of
|
/// From the top level targets `steps` generate a topological ordering of
|
||||||
/// all steps needed to run those steps.
|
/// all steps needed to run those steps.
|
||||||
fn expand(&self, steps: &[Step<'a>]) -> Vec<Step<'a>> {
|
fn expand(&self, steps: &[Step<'a>]) -> Vec<Step<'a>> {
|
||||||
|
// First up build a graph of steps and their dependencies. The `nodes`
|
||||||
|
// map is a map from step to a unique number. The `edges` map is a
|
||||||
|
// map from these unique numbers to a list of other numbers,
|
||||||
|
// representing dependencies.
|
||||||
|
let mut nodes = HashMap::new();
|
||||||
|
nodes.insert(Step::noop(), 0);
|
||||||
|
let mut edges = HashMap::new();
|
||||||
|
edges.insert(0, HashSet::new());
|
||||||
|
for step in steps {
|
||||||
|
self.build_graph(step.clone(), &mut nodes, &mut edges);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now that we've built up the actual dependency graph, draw more
|
||||||
|
// dependency edges to satisfy the `after` dependencies field for each
|
||||||
|
// rule.
|
||||||
|
self.satisfy_after_deps(&nodes, &mut edges);
|
||||||
|
|
||||||
|
// And finally, perform a topological sort to return a list of steps to
|
||||||
|
// execute.
|
||||||
let mut order = Vec::new();
|
let mut order = Vec::new();
|
||||||
let mut added = HashSet::new();
|
let mut visited = HashSet::new();
|
||||||
added.insert(Step::noop());
|
visited.insert(0);
|
||||||
for step in steps.iter().cloned() {
|
let idx_to_node = nodes.iter().map(|p| (*p.1, p.0)).collect::<HashMap<_, _>>();
|
||||||
self.fill(step, &mut order, &mut added);
|
for idx in 0..nodes.len() {
|
||||||
|
self.topo_sort(idx, &idx_to_node, &edges, &mut visited, &mut order);
|
||||||
}
|
}
|
||||||
return order
|
return order
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Performs topological sort of dependencies rooted at the `step`
|
/// Builds the dependency graph rooted at `step`.
|
||||||
/// specified, pushing all results onto the `order` vector provided.
|
|
||||||
///
|
///
|
||||||
/// In other words, when this method returns, the `order` vector will
|
/// The `nodes` and `edges` maps are filled out according to the rule
|
||||||
/// contain a list of steps which if executed in order will eventually
|
/// described by `step.name`.
|
||||||
/// complete the `step` specified as well.
|
fn build_graph(&self,
|
||||||
///
|
|
||||||
/// The `added` set specified here is the set of steps that are already
|
|
||||||
/// present in `order` (and hence don't need to be added again).
|
|
||||||
fn fill(&self,
|
|
||||||
step: Step<'a>,
|
step: Step<'a>,
|
||||||
order: &mut Vec<Step<'a>>,
|
nodes: &mut HashMap<Step<'a>, usize>,
|
||||||
added: &mut HashSet<Step<'a>>) {
|
edges: &mut HashMap<usize, HashSet<usize>>) -> usize {
|
||||||
if !added.insert(step.clone()) {
|
use std::collections::hash_map::Entry;
|
||||||
return
|
|
||||||
|
let idx = nodes.len();
|
||||||
|
match nodes.entry(step.clone()) {
|
||||||
|
Entry::Vacant(e) => { e.insert(idx); }
|
||||||
|
Entry::Occupied(e) => return *e.get(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut deps = Vec::new();
|
||||||
for dep in self.rules[step.name].deps.iter() {
|
for dep in self.rules[step.name].deps.iter() {
|
||||||
let dep = dep(&step);
|
let dep = dep(&step);
|
||||||
if dep.name.starts_with("default:") {
|
if dep.name.starts_with("default:") {
|
||||||
@@ -1173,13 +1260,61 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
|
|||||||
let host = self.build.config.host.iter().any(|h| h == dep.target);
|
let host = self.build.config.host.iter().any(|h| h == dep.target);
|
||||||
let rules = self.rules.values().filter(|r| r.default);
|
let rules = self.rules.values().filter(|r| r.default);
|
||||||
for rule in rules.filter(|r| r.kind == kind && (!r.host || host)) {
|
for rule in rules.filter(|r| r.kind == kind && (!r.host || host)) {
|
||||||
self.fill(dep.name(rule.name), order, added);
|
deps.push(self.build_graph(dep.name(rule.name), nodes, edges));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self.fill(dep, order, added);
|
deps.push(self.build_graph(dep, nodes, edges));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
order.push(step);
|
|
||||||
|
edges.entry(idx).or_insert(HashSet::new()).extend(deps);
|
||||||
|
return idx
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Given a dependency graph with a finished list of `nodes`, fill out more
|
||||||
|
/// dependency `edges`.
|
||||||
|
///
|
||||||
|
/// This is the step which satisfies all `after` listed dependencies in
|
||||||
|
/// `Rule` above.
|
||||||
|
fn satisfy_after_deps(&self,
|
||||||
|
nodes: &HashMap<Step<'a>, usize>,
|
||||||
|
edges: &mut HashMap<usize, HashSet<usize>>) {
|
||||||
|
// Reverse map from the name of a step to the node indices that it
|
||||||
|
// appears at.
|
||||||
|
let mut name_to_idx = HashMap::new();
|
||||||
|
for (step, &idx) in nodes {
|
||||||
|
name_to_idx.entry(step.name).or_insert(Vec::new()).push(idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (step, idx) in nodes {
|
||||||
|
if *step == Step::noop() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
for after in self.rules[step.name].after.iter() {
|
||||||
|
// This is the critical piece of an `after` dependency. If the
|
||||||
|
// dependency isn't actually in our graph then no edge is drawn,
|
||||||
|
// only if it's already present do we draw the edges.
|
||||||
|
if let Some(idxs) = name_to_idx.get(after) {
|
||||||
|
edges.get_mut(idx).unwrap()
|
||||||
|
.extend(idxs.iter().cloned());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn topo_sort(&self,
|
||||||
|
cur: usize,
|
||||||
|
nodes: &HashMap<usize, &Step<'a>>,
|
||||||
|
edges: &HashMap<usize, HashSet<usize>>,
|
||||||
|
visited: &mut HashSet<usize>,
|
||||||
|
order: &mut Vec<Step<'a>>) {
|
||||||
|
if !visited.insert(cur) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for dep in edges[&cur].iter() {
|
||||||
|
self.topo_sort(*dep, nodes, edges, visited, order);
|
||||||
|
}
|
||||||
|
order.push(nodes[&cur].clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ pub fn dylib_path_var() -> &'static str {
|
|||||||
"PATH"
|
"PATH"
|
||||||
} else if cfg!(target_os = "macos") {
|
} else if cfg!(target_os = "macos") {
|
||||||
"DYLD_LIBRARY_PATH"
|
"DYLD_LIBRARY_PATH"
|
||||||
|
} else if cfg!(target_os = "haiku") {
|
||||||
|
"LIBRARY_PATH"
|
||||||
} else {
|
} else {
|
||||||
"LD_LIBRARY_PATH"
|
"LD_LIBRARY_PATH"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,11 @@ pub fn native_lib_boilerplate(src_name: &str,
|
|||||||
let out_dir = env::var_os("RUSTBUILD_NATIVE_DIR").unwrap_or(env::var_os("OUT_DIR").unwrap());
|
let out_dir = env::var_os("RUSTBUILD_NATIVE_DIR").unwrap_or(env::var_os("OUT_DIR").unwrap());
|
||||||
let out_dir = PathBuf::from(out_dir).join(out_name);
|
let out_dir = PathBuf::from(out_dir).join(out_name);
|
||||||
t!(create_dir_racy(&out_dir));
|
t!(create_dir_racy(&out_dir));
|
||||||
|
if link_name.contains('=') {
|
||||||
|
println!("cargo:rustc-link-lib={}", link_name);
|
||||||
|
} else {
|
||||||
println!("cargo:rustc-link-lib=static={}", link_name);
|
println!("cargo:rustc-link-lib=static={}", link_name);
|
||||||
|
}
|
||||||
println!("cargo:rustc-link-search=native={}", out_dir.join(search_subdir).display());
|
println!("cargo:rustc-link-search=native={}", out_dir.join(search_subdir).display());
|
||||||
|
|
||||||
let timestamp = out_dir.join("rustbuild.timestamp");
|
let timestamp = out_dir.join("rustbuild.timestamp");
|
||||||
@@ -209,6 +213,21 @@ pub fn native_lib_boilerplate(src_name: &str,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn sanitizer_lib_boilerplate(sanitizer_name: &str) -> Result<NativeLibBoilerplate, ()> {
|
||||||
|
let (link_name, search_path) = match &*env::var("TARGET").unwrap() {
|
||||||
|
"x86_64-unknown-linux-gnu" => (
|
||||||
|
format!("clang_rt.{}-x86_64", sanitizer_name),
|
||||||
|
"build/lib/linux",
|
||||||
|
),
|
||||||
|
"x86_64-apple-darwin" => (
|
||||||
|
format!("dylib=clang_rt.{}_osx_dynamic", sanitizer_name),
|
||||||
|
"build/lib/darwin",
|
||||||
|
),
|
||||||
|
_ => return Err(()),
|
||||||
|
};
|
||||||
|
native_lib_boilerplate("compiler-rt", sanitizer_name, &link_name, search_path)
|
||||||
|
}
|
||||||
|
|
||||||
fn dir_up_to_date(src: &Path, threshold: &FileTime) -> bool {
|
fn dir_up_to_date(src: &Path, threshold: &FileTime) -> bool {
|
||||||
t!(fs::read_dir(src)).map(|e| t!(e)).all(|e| {
|
t!(fs::read_dir(src)).map(|e| t!(e)).all(|e| {
|
||||||
let meta = t!(e.metadata());
|
let meta = t!(e.metadata());
|
||||||
|
|||||||
@@ -152,18 +152,13 @@ For targets: `powerpc-unknown-linux-gnu`
|
|||||||
- Path and misc options > Patches origin = Bundled, then local
|
- Path and misc options > Patches origin = Bundled, then local
|
||||||
- Path and misc options > Local patch directory = /tmp/patches
|
- Path and misc options > Local patch directory = /tmp/patches
|
||||||
- Target options > Target Architecture = powerpc
|
- Target options > Target Architecture = powerpc
|
||||||
- Target options > Emit assembly for CPU = power4 -- (+)
|
- Target options > Emit assembly for CPU = powerpc -- pure 32-bit PowerPC
|
||||||
- Target options > Tune for CPU = power6 -- (+)
|
|
||||||
- Operating System > Target OS = linux
|
- Operating System > Target OS = linux
|
||||||
- Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
|
- Operating System > Linux kernel version = 2.6.32.68 -- ~RHEL6 kernel
|
||||||
- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
|
- C-library > glibc version = 2.12.2 -- ~RHEL6 glibc
|
||||||
- C compiler > gcc version = 4.9.3
|
- C compiler > gcc version = 4.9.3
|
||||||
- C compiler > Core gcc extra config = --with-cpu-32=power4 --with-cpu=default32 -- (+)
|
|
||||||
- C compiler > gcc extra config = --with-cpu-32=power4 --with-cpu=default32 -- (+)
|
|
||||||
- C compiler > C++ = ENABLE -- to cross compile LLVM
|
- C compiler > C++ = ENABLE -- to cross compile LLVM
|
||||||
|
|
||||||
(+) These CPU options match the configuration of the toolchains in RHEL6.
|
|
||||||
|
|
||||||
## `powerpc64-linux-gnu.config`
|
## `powerpc64-linux-gnu.config`
|
||||||
|
|
||||||
For targets: `powerpc64-unknown-linux-gnu`
|
For targets: `powerpc64-unknown-linux-gnu`
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ RUN dpkg --add-architecture i386 && \
|
|||||||
cmake \
|
cmake \
|
||||||
unzip \
|
unzip \
|
||||||
expect \
|
expect \
|
||||||
openjdk-9-jre \
|
openjdk-9-jre-headless \
|
||||||
sudo \
|
sudo \
|
||||||
libstdc++6:i386 \
|
libstdc++6:i386 \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
|
|||||||
@@ -10,7 +10,9 @@
|
|||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
ANDROID_EMULATOR_FORCE_32BIT=true \
|
|
||||||
nohup nohup emulator @arm-18 -no-window -partition-size 2047 \
|
# Setting SHELL to a file instead on a symlink helps android
|
||||||
0<&- &>/dev/null &
|
# emulator identify the system
|
||||||
|
export SHELL=/bin/bash
|
||||||
|
nohup nohup emulator @arm-18 -no-window -partition-size 2047 0<&- &>/dev/null &
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ RUN arm-linux-gnueabihf-gcc addentropy.c -o rootfs/addentropy -static
|
|||||||
RUN curl -O http://ftp.nl.debian.org/debian/dists/jessie/main/installer-armhf/current/images/device-tree/vexpress-v2p-ca15-tc1.dtb
|
RUN curl -O http://ftp.nl.debian.org/debian/dists/jessie/main/installer-armhf/current/images/device-tree/vexpress-v2p-ca15-tc1.dtb
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
@@ -74,6 +74,7 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
|
|||||||
ENV STAGING_DIR=/tmp
|
ENV STAGING_DIR=/tmp
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS \
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
|
--enable-extended \
|
||||||
--target=$TARGETS \
|
--target=$TARGETS \
|
||||||
--musl-root-arm=/usr/local/arm-linux-musleabi \
|
--musl-root-arm=/usr/local/arm-linux-musleabi \
|
||||||
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
|
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
|
||||||
|
|||||||
@@ -56,28 +56,22 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
|
|||||||
USER rustbuild
|
USER rustbuild
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
COPY armv7-linux-gnueabihf.config /tmp/
|
COPY aarch64-linux-gnu.config build-toolchains.sh /tmp/
|
||||||
COPY armv7-linux-gnueabihf.config aarch64-linux-gnu.config build-toolchains.sh /tmp/
|
|
||||||
RUN ./build-toolchains.sh
|
RUN ./build-toolchains.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnueabi/bin
|
ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnueabi/bin
|
||||||
ENV PATH=$PATH:/x-tools/armv7-unknown-linux-gnueabihf/bin
|
|
||||||
|
|
||||||
ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
|
ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
|
||||||
AR_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-ar \
|
AR_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-ar \
|
||||||
CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-g++ \
|
CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-g++
|
||||||
CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \
|
|
||||||
AR_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-ar \
|
|
||||||
CXX_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-g++
|
|
||||||
|
|
||||||
ENV HOSTS=armv7-unknown-linux-gnueabihf
|
ENV HOSTS=aarch64-unknown-linux-gnu
|
||||||
ENV HOSTS=$HOSTS,aarch64-unknown-linux-gnu
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
37
src/ci/docker/dist-aarch64-linux/build-toolchains.sh
Executable file
37
src/ci/docker/dist-aarch64-linux/build-toolchains.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
hide_output() {
|
||||||
|
set +x
|
||||||
|
on_err="
|
||||||
|
echo ERROR: An error was encountered with the build.
|
||||||
|
cat /tmp/build.log
|
||||||
|
exit 1
|
||||||
|
"
|
||||||
|
trap "$on_err" ERR
|
||||||
|
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||||
|
PING_LOOP_PID=$!
|
||||||
|
$@ &> /tmp/build.log
|
||||||
|
rm /tmp/build.log
|
||||||
|
trap - ERR
|
||||||
|
kill $PING_LOOP_PID
|
||||||
|
set -x
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cp ../aarch64-linux-gnu.config .config
|
||||||
|
ct-ng oldconfig
|
||||||
|
hide_output ct-ng build
|
||||||
|
cd ..
|
||||||
|
rm -rf build
|
||||||
@@ -32,19 +32,22 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV TARGETS=arm-linux-androideabi
|
ENV TARGETS=arm-linux-androideabi
|
||||||
|
ENV TARGETS=$TARGETS,armv7-linux-androideabi
|
||||||
ENV TARGETS=$TARGETS,i686-linux-android
|
ENV TARGETS=$TARGETS,i686-linux-android
|
||||||
ENV TARGETS=$TARGETS,aarch64-linux-android
|
ENV TARGETS=$TARGETS,aarch64-linux-android
|
||||||
ENV TARGETS=$TARGETS,armv7-linux-androideabi
|
ENV TARGETS=$TARGETS,x86_64-linux-android
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS \
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
--target=$TARGETS \
|
--target=$TARGETS \
|
||||||
|
--enable-extended \
|
||||||
--arm-linux-androideabi-ndk=/android/ndk-arm-9 \
|
--arm-linux-androideabi-ndk=/android/ndk-arm-9 \
|
||||||
--armv7-linux-androideabi-ndk=/android/ndk-arm-9 \
|
--armv7-linux-androideabi-ndk=/android/ndk-arm-9 \
|
||||||
--i686-linux-android-ndk=/android/ndk-x86-9 \
|
--i686-linux-android-ndk=/android/ndk-x86-9 \
|
||||||
--aarch64-linux-android-ndk=/android/ndk-aarch64
|
--aarch64-linux-android-ndk=/android/ndk-arm64-21 \
|
||||||
|
--x86_64-linux-android-ndk=/android/ndk-x86_64-21
|
||||||
|
|
||||||
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
|
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
|||||||
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
||||||
--platform=android-21 \
|
--platform=android-21 \
|
||||||
--toolchain=aarch64-linux-android-4.9 \
|
--toolchain=aarch64-linux-android-4.9 \
|
||||||
--install-dir=/android/ndk-aarch64 \
|
--install-dir=/android/ndk-arm64-21 \
|
||||||
--ndk-dir=/android/android-ndk-r11c \
|
--ndk-dir=/android/android-ndk-r11c \
|
||||||
--arch=arm64
|
--arch=arm64
|
||||||
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
||||||
@@ -34,5 +34,11 @@ bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
|||||||
--install-dir=/android/ndk-x86-9 \
|
--install-dir=/android/ndk-x86-9 \
|
||||||
--ndk-dir=/android/android-ndk-r11c \
|
--ndk-dir=/android/android-ndk-r11c \
|
||||||
--arch=x86
|
--arch=x86
|
||||||
|
bash android-ndk-r11c/build/tools/make-standalone-toolchain.sh \
|
||||||
|
--platform=android-21 \
|
||||||
|
--toolchain=x86_64-4.9 \
|
||||||
|
--install-dir=/android/ndk-x86_64-21 \
|
||||||
|
--ndk-dir=/android/android-ndk-r11c \
|
||||||
|
--arch=x86_64
|
||||||
|
|
||||||
rm -rf ./android-ndk-r11c-linux-x86_64.zip ./android-ndk-r11c
|
rm -rf ./android-ndk-r11c-linux-x86_64.zip ./android-ndk-r11c
|
||||||
|
|||||||
@@ -56,27 +56,22 @@ RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
|
|||||||
USER rustbuild
|
USER rustbuild
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
COPY arm-linux-gnueabihf.config arm-linux-gnueabi.config build-toolchains.sh /tmp/
|
COPY arm-linux-gnueabi.config build-toolchains.sh /tmp/
|
||||||
RUN ./build-toolchains.sh
|
RUN ./build-toolchains.sh
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabi/bin
|
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabi/bin
|
||||||
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabihf/bin
|
|
||||||
|
|
||||||
ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
|
ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
|
||||||
AR_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-ar \
|
AR_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-ar \
|
||||||
CXX_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-g++ \
|
CXX_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-g++
|
||||||
CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
|
|
||||||
AR_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-ar \
|
|
||||||
CXX_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-g++
|
|
||||||
|
|
||||||
ENV HOSTS=arm-unknown-linux-gnueabi
|
ENV HOSTS=arm-unknown-linux-gnueabi
|
||||||
ENV HOSTS=$HOSTS,arm-unknown-linux-gnueabihf
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
|
|||||||
@@ -35,11 +35,3 @@ ct-ng oldconfig
|
|||||||
hide_output ct-ng build
|
hide_output ct-ng build
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cp ../arm-linux-gnueabihf.config .config
|
|
||||||
ct-ng oldconfig
|
|
||||||
hide_output ct-ng build
|
|
||||||
cd ..
|
|
||||||
rm -rf build
|
|
||||||
|
|||||||
77
src/ci/docker/dist-armhf-linux/Dockerfile
Normal file
77
src/ci/docker/dist-armhf-linux/Dockerfile
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
automake \
|
||||||
|
bison \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
file \
|
||||||
|
flex \
|
||||||
|
g++ \
|
||||||
|
gawk \
|
||||||
|
gdb \
|
||||||
|
git \
|
||||||
|
gperf \
|
||||||
|
help2man \
|
||||||
|
libncurses-dev \
|
||||||
|
libtool-bin \
|
||||||
|
make \
|
||||||
|
patch \
|
||||||
|
python2.7 \
|
||||||
|
sudo \
|
||||||
|
texinfo \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
|
||||||
|
# toolchains we build below chokes on that, so go back to make 3
|
||||||
|
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
|
||||||
|
cd make-3.81 && \
|
||||||
|
./configure --prefix=/usr && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf make-3.81
|
||||||
|
|
||||||
|
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
|
||||||
|
tar xjf - && \
|
||||||
|
cd crosstool-ng && \
|
||||||
|
./configure --prefix=/usr/local && \
|
||||||
|
make -j$(nproc) && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf crosstool-ng
|
||||||
|
|
||||||
|
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
|
||||||
|
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
|
||||||
|
USER rustbuild
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
COPY arm-linux-gnueabihf.config build-toolchains.sh /tmp/
|
||||||
|
RUN ./build-toolchains.sh
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
ENV PATH=$PATH:/x-tools/arm-unknown-linux-gnueabihf/bin
|
||||||
|
|
||||||
|
ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
|
||||||
|
AR_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-ar \
|
||||||
|
CXX_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-g++
|
||||||
|
|
||||||
|
ENV HOSTS=arm-unknown-linux-gnueabihf
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
37
src/ci/docker/dist-armhf-linux/build-toolchains.sh
Executable file
37
src/ci/docker/dist-armhf-linux/build-toolchains.sh
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
hide_output() {
|
||||||
|
set +x
|
||||||
|
on_err="
|
||||||
|
echo ERROR: An error was encountered with the build.
|
||||||
|
cat /tmp/build.log
|
||||||
|
exit 1
|
||||||
|
"
|
||||||
|
trap "$on_err" ERR
|
||||||
|
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||||
|
PING_LOOP_PID=$!
|
||||||
|
$@ &> /tmp/build.log
|
||||||
|
rm /tmp/build.log
|
||||||
|
trap - ERR
|
||||||
|
kill $PING_LOOP_PID
|
||||||
|
set -x
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cp ../arm-linux-gnueabihf.config .config
|
||||||
|
ct-ng oldconfig
|
||||||
|
hide_output ct-ng build
|
||||||
|
cd ..
|
||||||
|
rm -rf build
|
||||||
77
src/ci/docker/dist-armv7-linux/Dockerfile
Normal file
77
src/ci/docker/dist-armv7-linux/Dockerfile
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
automake \
|
||||||
|
bison \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
file \
|
||||||
|
flex \
|
||||||
|
g++ \
|
||||||
|
gawk \
|
||||||
|
gdb \
|
||||||
|
git \
|
||||||
|
gperf \
|
||||||
|
help2man \
|
||||||
|
libncurses-dev \
|
||||||
|
libtool-bin \
|
||||||
|
make \
|
||||||
|
patch \
|
||||||
|
python2.7 \
|
||||||
|
sudo \
|
||||||
|
texinfo \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
|
||||||
|
# toolchains we build below chokes on that, so go back to make 3
|
||||||
|
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
|
||||||
|
cd make-3.81 && \
|
||||||
|
./configure --prefix=/usr && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf make-3.81
|
||||||
|
|
||||||
|
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
|
||||||
|
tar xjf - && \
|
||||||
|
cd crosstool-ng && \
|
||||||
|
./configure --prefix=/usr/local && \
|
||||||
|
make -j$(nproc) && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf crosstool-ng
|
||||||
|
|
||||||
|
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
|
||||||
|
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
|
||||||
|
USER rustbuild
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
COPY build-toolchains.sh armv7-linux-gnueabihf.config /tmp/
|
||||||
|
RUN ./build-toolchains.sh
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
ENV PATH=$PATH:/x-tools/armv7-unknown-linux-gnueabihf/bin
|
||||||
|
|
||||||
|
ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \
|
||||||
|
AR_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-ar \
|
||||||
|
CXX_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-g++
|
||||||
|
|
||||||
|
ENV HOSTS=armv7-unknown-linux-gnueabihf
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
@@ -35,11 +35,3 @@ ct-ng oldconfig
|
|||||||
hide_output ct-ng build
|
hide_output ct-ng build
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cp ../aarch64-linux-gnu.config .config
|
|
||||||
ct-ng oldconfig
|
|
||||||
hide_output ct-ng build
|
|
||||||
cd ..
|
|
||||||
rm -rf build
|
|
||||||
@@ -14,13 +14,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
xz-utils \
|
xz-utils \
|
||||||
swig \
|
swig \
|
||||||
libedit-dev \
|
libedit-dev \
|
||||||
libncurses5-dev
|
libncurses5-dev \
|
||||||
|
patch
|
||||||
|
|
||||||
RUN curl -L https://cmake.org/files/v3.8/cmake-3.8.0-rc1-Linux-x86_64.tar.gz | \
|
RUN curl -L https://cmake.org/files/v3.8/cmake-3.8.0-rc1-Linux-x86_64.tar.gz | \
|
||||||
tar xzf - -C /usr/local --strip-components=1
|
tar xzf - -C /usr/local --strip-components=1
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
COPY shared.sh build-toolchain.sh /tmp/
|
COPY shared.sh build-toolchain.sh compiler-rt-dso-handle.patch /tmp/
|
||||||
RUN /tmp/build-toolchain.sh
|
RUN /tmp/build-toolchain.sh
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
@@ -29,7 +30,7 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
@@ -43,5 +44,5 @@ ENV \
|
|||||||
ENV TARGETS=x86_64-unknown-fuchsia
|
ENV TARGETS=x86_64-unknown-fuchsia
|
||||||
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
|
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --target=$TARGETS
|
ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
|
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
|
||||||
|
|||||||
@@ -9,26 +9,31 @@
|
|||||||
# option. This file may not be copied, modified, or distributed
|
# option. This file may not be copied, modified, or distributed
|
||||||
# except according to those terms.
|
# except according to those terms.
|
||||||
|
|
||||||
|
# ignore-tidy-linelength
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
source shared.sh
|
source shared.sh
|
||||||
|
|
||||||
# Download sources
|
# Download sources
|
||||||
SRCS=(
|
SRCS=(
|
||||||
"https://fuchsia.googlesource.com/magenta magenta ac69119"
|
"https://fuchsia.googlesource.com/magenta magenta d17073dc8de344ead3b65e8cc6a12280dec38c84"
|
||||||
"https://fuchsia.googlesource.com/third_party/llvm llvm 5463083"
|
"https://llvm.googlesource.com/llvm llvm 3f58a16d8eec385e2b3ebdfbb84ff9d3bf27e025"
|
||||||
"https://fuchsia.googlesource.com/third_party/clang llvm/tools/clang 4ff7b4b"
|
"https://llvm.googlesource.com/clang llvm/tools/clang 727ea63e6e82677f6e10e05e08bc7d6bdbae3111"
|
||||||
"https://fuchsia.googlesource.com/third_party/lld llvm/tools/lld fd465a3"
|
"https://llvm.googlesource.com/lld llvm/tools/lld a31286c1366e5e89b8872803fded13805a1a084b"
|
||||||
"https://fuchsia.googlesource.com/third_party/lldb llvm/tools/lldb 6bb11f8"
|
"https://llvm.googlesource.com/lldb llvm/tools/lldb 0b2384abec4cb99ad66687712e07dee4dd9d187e"
|
||||||
"https://fuchsia.googlesource.com/third_party/compiler-rt llvm/runtimes/compiler-rt 52d4ecc"
|
"https://llvm.googlesource.com/compiler-rt llvm/runtimes/compiler-rt 9093a35c599fe41278606a20b51095ea8bd5a081"
|
||||||
"https://fuchsia.googlesource.com/third_party/libcxx llvm/runtimes/libcxx e891cc8"
|
"https://llvm.googlesource.com/libcxx llvm/runtimes/libcxx 607e0c71ec4f7fd377ad3f6c47b08dbe89f66eaa"
|
||||||
"https://fuchsia.googlesource.com/third_party/libcxxabi llvm/runtimes/libcxxabi f0f0257"
|
"https://llvm.googlesource.com/libcxxabi llvm/runtimes/libcxxabi 0a3a1a8a5ca5ef69e0f6b7d5b9d13e63e6fd2c19"
|
||||||
"https://fuchsia.googlesource.com/third_party/libunwind llvm/runtimes/libunwind 50bddc1"
|
"https://llvm.googlesource.com/libunwind llvm/runtimes/libunwind e128003563d99d9ee62247c4cee40f07d21c03e3"
|
||||||
)
|
)
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
mkdir -p $2
|
mkdir -p $2
|
||||||
pushd $2 > /dev/null
|
pushd $2 > /dev/null
|
||||||
curl -sL $1/+archive/$3.tar.gz | tar xzf -
|
git init
|
||||||
|
git remote add origin $1
|
||||||
|
git fetch --depth=1 origin $3
|
||||||
|
git reset --hard FETCH_HEAD
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +41,11 @@ for i in "${SRCS[@]}"; do
|
|||||||
fetch $i
|
fetch $i
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Remove this once https://reviews.llvm.org/D28791 is resolved
|
||||||
|
cd llvm/runtimes/compiler-rt
|
||||||
|
patch -Np1 < /tmp/compiler-rt-dso-handle.patch
|
||||||
|
cd ../../..
|
||||||
|
|
||||||
# Build toolchain
|
# Build toolchain
|
||||||
cd llvm
|
cd llvm
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|||||||
41
src/ci/docker/dist-fuchsia/compiler-rt-dso-handle.patch
Normal file
41
src/ci/docker/dist-fuchsia/compiler-rt-dso-handle.patch
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
|
||||||
|
index fc4384af2..b442264c0 100644
|
||||||
|
--- a/lib/builtins/CMakeLists.txt
|
||||||
|
+++ b/lib/builtins/CMakeLists.txt
|
||||||
|
@@ -194,6 +194,12 @@ if(APPLE)
|
||||||
|
atomic_thread_fence.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+if(FUCHSIA)
|
||||||
|
+ set(GENERIC_SOURCES
|
||||||
|
+ ${GENERIC_SOURCES}
|
||||||
|
+ dso_handle.c)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
if(NOT WIN32 OR MINGW)
|
||||||
|
set(GENERIC_SOURCES
|
||||||
|
${GENERIC_SOURCES}
|
||||||
|
diff --git a/lib/builtins/dso_handle.c b/lib/builtins/dso_handle.c
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..7766cd0aa
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/lib/builtins/dso_handle.c
|
||||||
|
@@ -0,0 +1,18 @@
|
||||||
|
+/* ===-- dso_handle.c - Provide __dso_handle -------------------------------===
|
||||||
|
+ *
|
||||||
|
+ * The LLVM Compiler Infrastructure
|
||||||
|
+ *
|
||||||
|
+ * This file is dual licensed under the MIT and the University of Illinois Open
|
||||||
|
+ * Source Licenses. See LICENSE.TXT for details.
|
||||||
|
+ *
|
||||||
|
+ * ===----------------------------------------------------------------------===
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+/* __dso_handle symbol is mandated by C++ ABI with a value which is an address
|
||||||
|
+ * in one of the object's segments, and as such this symbol has to be included
|
||||||
|
+ * statically and cannot be a part of a shared library. Traditionally, it has
|
||||||
|
+ * been defined in crtbegin.o but there's no principled reason for it to be
|
||||||
|
+ * there. We defined this symbol in the builtin library which is built as a
|
||||||
|
+ * static library and always included in the final link.
|
||||||
|
+ */
|
||||||
|
+__attribute__((visibility("hidden"))) void *const __dso_handle;
|
||||||
@@ -26,12 +26,13 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS \
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
--target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
|
--target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
|
||||||
--musl-root-i686=/musl-i686
|
--musl-root-i686=/musl-i686 \
|
||||||
|
--enable-extended
|
||||||
|
|
||||||
# Newer binutils broke things on some vms/distros (i.e., linking against
|
# Newer binutils broke things on some vms/distros (i.e., linking against
|
||||||
# unknown relocs disabled by the following flag), so we need to go out of our
|
# unknown relocs disabled by the following flag), so we need to go out of our
|
||||||
|
|||||||
@@ -15,11 +15,14 @@ set -ex
|
|||||||
export CFLAGS="-fPIC -Wa,-mrelax-relocations=no"
|
export CFLAGS="-fPIC -Wa,-mrelax-relocations=no"
|
||||||
export CXXFLAGS="-Wa,-mrelax-relocations=no"
|
export CXXFLAGS="-Wa,-mrelax-relocations=no"
|
||||||
|
|
||||||
MUSL=musl-1.1.14
|
MUSL=musl-1.1.16
|
||||||
curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf -
|
curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf -
|
||||||
cd $MUSL
|
cd $MUSL
|
||||||
CFLAGS="$CFLAGS -m32" ./configure --prefix=/musl-i686 --disable-shared --target=i686
|
CC=gcc \
|
||||||
make -j10
|
CFLAGS="$CFLAGS -m32" \
|
||||||
|
./configure --prefix=/musl-i686 --disable-shared \
|
||||||
|
--target=i686
|
||||||
|
make AR=ar RANLIB=ranlib -j10
|
||||||
make install
|
make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
COPY build-toolchain.sh /tmp/
|
COPY build-toolchain.sh /tmp/
|
||||||
RUN /tmp/build-toolchain.sh x86_64
|
|
||||||
RUN /tmp/build-toolchain.sh i686
|
RUN /tmp/build-toolchain.sh i686
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
@@ -26,19 +25,15 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
|
|
||||||
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc \
|
|
||||||
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++ \
|
|
||||||
AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \
|
AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \
|
||||||
CC_i686_unknown_freebsd=i686-unknown-freebsd10-gcc \
|
CC_i686_unknown_freebsd=i686-unknown-freebsd10-gcc \
|
||||||
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-g++
|
CXX_i686_unknown_freebsd=i686-unknown-freebsd10-g++
|
||||||
|
|
||||||
ENV HOSTS=x86_64-unknown-freebsd
|
ENV HOSTS=i686-unknown-freebsd
|
||||||
ENV HOSTS=$HOSTS,i686-unknown-freebsd
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
@@ -2,6 +2,12 @@ FROM centos:5
|
|||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
|
# Centos 5 is EOL and is no longer available from the usual mirrors, so switch
|
||||||
|
# to http://vault.centos.org/
|
||||||
|
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
|
||||||
|
RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
|
||||||
|
RUN sed -i 's|#\(baseurl.*\)mirror.centos.org/centos/$releasever|\1vault.centos.org/5.11|' /etc/yum.repos.d/*.repo
|
||||||
|
|
||||||
RUN yum upgrade -y && yum install -y \
|
RUN yum upgrade -y && yum install -y \
|
||||||
curl \
|
curl \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
@@ -76,11 +82,10 @@ RUN curl -Lo /rustroot/dumb-init \
|
|||||||
ENTRYPOINT ["/rustroot/dumb-init", "--"]
|
ENTRYPOINT ["/rustroot/dumb-init", "--"]
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV HOSTS=i686-unknown-linux-gnu
|
ENV HOSTS=i686-unknown-linux-gnu
|
||||||
ENV HOSTS=$HOSTS,x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS \
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
--host=$HOSTS \
|
--host=$HOSTS \
|
||||||
@@ -13,12 +13,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
gdb \
|
gdb \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
g++-mips-linux-gnu \
|
g++-mips-linux-gnu \
|
||||||
g++-mipsel-linux-gnu \
|
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
@@ -27,7 +26,6 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
ENV HOSTS=mips-unknown-linux-gnu
|
ENV HOSTS=mips-unknown-linux-gnu
|
||||||
ENV HOSTS=$HOSTS,mipsel-unknown-linux-gnu
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
|
|||||||
@@ -13,12 +13,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
gdb \
|
gdb \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
g++-mips64-linux-gnuabi64 \
|
g++-mips64-linux-gnuabi64 \
|
||||||
g++-mips64el-linux-gnuabi64 \
|
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
@@ -27,7 +26,6 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
ENV HOSTS=mips64-unknown-linux-gnuabi64
|
ENV HOSTS=mips64-unknown-linux-gnuabi64
|
||||||
ENV HOSTS=$HOSTS,mips64el-unknown-linux-gnuabi64
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
|
|||||||
31
src/ci/docker/dist-mips64el-linux/Dockerfile
Normal file
31
src/ci/docker/dist-mips64el-linux/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
file \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
python2.7 \
|
||||||
|
git \
|
||||||
|
cmake \
|
||||||
|
sudo \
|
||||||
|
gdb \
|
||||||
|
xz-utils \
|
||||||
|
g++-mips64el-linux-gnuabi64 \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
ENV HOSTS=mips64el-unknown-linux-gnuabi64
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
31
src/ci/docker/dist-mipsel-linux/Dockerfile
Normal file
31
src/ci/docker/dist-mipsel-linux/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
file \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
python2.7 \
|
||||||
|
git \
|
||||||
|
cmake \
|
||||||
|
sudo \
|
||||||
|
gdb \
|
||||||
|
xz-utils \
|
||||||
|
g++-mipsel-linux-gnu \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
ENV HOSTS=mipsel-unknown-linux-gnu
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
@@ -63,7 +63,7 @@ RUN ./build-powerpc-toolchain.sh
|
|||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV PATH=$PATH:/x-tools/powerpc-unknown-linux-gnu/bin
|
ENV PATH=$PATH:/x-tools/powerpc-unknown-linux-gnu/bin
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ CT_ARCH_SUPPORTS_WITH_FLOAT=y
|
|||||||
CT_ARCH_DEFAULT_BE=y
|
CT_ARCH_DEFAULT_BE=y
|
||||||
CT_ARCH_DEFAULT_32=y
|
CT_ARCH_DEFAULT_32=y
|
||||||
CT_ARCH_ABI=""
|
CT_ARCH_ABI=""
|
||||||
CT_ARCH_CPU="power4"
|
CT_ARCH_CPU="powerpc"
|
||||||
CT_ARCH_TUNE="power6"
|
CT_ARCH_TUNE=""
|
||||||
CT_ARCH_BE=y
|
CT_ARCH_BE=y
|
||||||
# CT_ARCH_LE is not set
|
# CT_ARCH_LE is not set
|
||||||
CT_ARCH_32=y
|
CT_ARCH_32=y
|
||||||
@@ -391,8 +391,8 @@ CT_CC_GCC_HAS_LIBSANITIZER=y
|
|||||||
CT_CC_GCC_VERSION="4.9.3"
|
CT_CC_GCC_VERSION="4.9.3"
|
||||||
# CT_CC_LANG_FORTRAN is not set
|
# CT_CC_LANG_FORTRAN is not set
|
||||||
CT_CC_GCC_ENABLE_CXX_FLAGS=""
|
CT_CC_GCC_ENABLE_CXX_FLAGS=""
|
||||||
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="--with-cpu-32=power4 --with-cpu=default32"
|
CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY=""
|
||||||
CT_CC_GCC_EXTRA_CONFIG_ARRAY="--with-cpu-32=power4 --with-cpu=default32"
|
CT_CC_GCC_EXTRA_CONFIG_ARRAY=""
|
||||||
CT_CC_GCC_EXTRA_ENV_ARRAY=""
|
CT_CC_GCC_EXTRA_ENV_ARRAY=""
|
||||||
CT_CC_GCC_STATIC_LIBSTDCXX=y
|
CT_CC_GCC_STATIC_LIBSTDCXX=y
|
||||||
# CT_CC_GCC_SYSTEM_ZLIB is not set
|
# CT_CC_GCC_SYSTEM_ZLIB is not set
|
||||||
|
|||||||
@@ -62,12 +62,8 @@ RUN ./build-powerpc64-toolchain.sh
|
|||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends rpm2cpio cpio
|
|
||||||
COPY build-powerpc64le-toolchain.sh /tmp/
|
|
||||||
RUN ./build-powerpc64le-toolchain.sh
|
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV PATH=$PATH:/x-tools/powerpc64-unknown-linux-gnu/bin
|
ENV PATH=$PATH:/x-tools/powerpc64-unknown-linux-gnu/bin
|
||||||
@@ -75,13 +71,9 @@ ENV PATH=$PATH:/x-tools/powerpc64-unknown-linux-gnu/bin
|
|||||||
ENV \
|
ENV \
|
||||||
AR_powerpc64_unknown_linux_gnu=powerpc64-unknown-linux-gnu-ar \
|
AR_powerpc64_unknown_linux_gnu=powerpc64-unknown-linux-gnu-ar \
|
||||||
CC_powerpc64_unknown_linux_gnu=powerpc64-unknown-linux-gnu-gcc \
|
CC_powerpc64_unknown_linux_gnu=powerpc64-unknown-linux-gnu-gcc \
|
||||||
CXX_powerpc64_unknown_linux_gnu=powerpc64-unknown-linux-gnu-g++ \
|
CXX_powerpc64_unknown_linux_gnu=powerpc64-unknown-linux-gnu-g++
|
||||||
AR_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-ar \
|
|
||||||
CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc \
|
|
||||||
CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++
|
|
||||||
|
|
||||||
ENV HOSTS=powerpc64-unknown-linux-gnu
|
ENV HOSTS=powerpc64-unknown-linux-gnu
|
||||||
ENV HOSTS=$HOSTS,powerpc64le-unknown-linux-gnu
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
|
|||||||
77
src/ci/docker/dist-powerpc64le-linux/Dockerfile
Normal file
77
src/ci/docker/dist-powerpc64le-linux/Dockerfile
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
automake \
|
||||||
|
bison \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
file \
|
||||||
|
flex \
|
||||||
|
g++ \
|
||||||
|
gawk \
|
||||||
|
gdb \
|
||||||
|
git \
|
||||||
|
gperf \
|
||||||
|
help2man \
|
||||||
|
libncurses-dev \
|
||||||
|
libtool-bin \
|
||||||
|
make \
|
||||||
|
patch \
|
||||||
|
python2.7 \
|
||||||
|
sudo \
|
||||||
|
texinfo \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
|
||||||
|
# toolchains we build below chokes on that, so go back to make 3
|
||||||
|
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
|
||||||
|
cd make-3.81 && \
|
||||||
|
./configure --prefix=/usr && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf make-3.81
|
||||||
|
|
||||||
|
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
|
||||||
|
tar xjf - && \
|
||||||
|
cd crosstool-ng && \
|
||||||
|
./configure --prefix=/usr/local && \
|
||||||
|
make -j$(nproc) && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf crosstool-ng
|
||||||
|
|
||||||
|
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
|
||||||
|
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
|
||||||
|
USER rustbuild
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apt-get install -y --no-install-recommends rpm2cpio cpio
|
||||||
|
COPY shared.sh build-powerpc64le-toolchain.sh /tmp/
|
||||||
|
RUN ./build-powerpc64le-toolchain.sh
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
ENV \
|
||||||
|
AR_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-ar \
|
||||||
|
CC_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-gcc \
|
||||||
|
CXX_powerpc64le_unknown_linux_gnu=powerpc64le-linux-gnu-g++
|
||||||
|
|
||||||
|
ENV HOSTS=powerpc64le-unknown-linux-gnu
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
25
src/ci/docker/dist-powerpc64le-linux/shared.sh
Normal file
25
src/ci/docker/dist-powerpc64le-linux/shared.sh
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
hide_output() {
|
||||||
|
set +x
|
||||||
|
on_err="
|
||||||
|
echo ERROR: An error was encountered with the build.
|
||||||
|
cat /tmp/build.log
|
||||||
|
exit 1
|
||||||
|
"
|
||||||
|
trap "$on_err" ERR
|
||||||
|
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||||
|
PING_LOOP_PID=$!
|
||||||
|
$@ &> /tmp/build.log
|
||||||
|
trap - ERR
|
||||||
|
kill $PING_LOOP_PID
|
||||||
|
set -x
|
||||||
|
}
|
||||||
@@ -60,27 +60,20 @@ COPY patches/ /tmp/patches/
|
|||||||
COPY s390x-linux-gnu.config build-s390x-toolchain.sh /tmp/
|
COPY s390x-linux-gnu.config build-s390x-toolchain.sh /tmp/
|
||||||
RUN ./build-s390x-toolchain.sh
|
RUN ./build-s390x-toolchain.sh
|
||||||
|
|
||||||
COPY build-netbsd-toolchain.sh /tmp/
|
|
||||||
RUN ./build-netbsd-toolchain.sh
|
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV PATH=$PATH:/x-tools/s390x-ibm-linux-gnu/bin:/x-tools/x86_64-unknown-netbsd/bin
|
ENV PATH=$PATH:/x-tools/s390x-ibm-linux-gnu/bin
|
||||||
|
|
||||||
ENV \
|
ENV \
|
||||||
AR_x86_64_unknown_netbsd=x86_64--netbsd-ar \
|
|
||||||
CC_x86_64_unknown_netbsd=x86_64--netbsd-gcc-sysroot \
|
|
||||||
CXX_x86_64_unknown_netbsd=x86_64--netbsd-g++-sysroot \
|
|
||||||
CC_s390x_unknown_linux_gnu=s390x-ibm-linux-gnu-gcc \
|
CC_s390x_unknown_linux_gnu=s390x-ibm-linux-gnu-gcc \
|
||||||
AR_s390x_unknown_linux_gnu=s390x-ibm-linux-gnu-ar \
|
AR_s390x_unknown_linux_gnu=s390x-ibm-linux-gnu-ar \
|
||||||
CXX_s390x_unknown_linux_gnu=s390x-ibm-linux-gnu-g++
|
CXX_s390x_unknown_linux_gnu=s390x-ibm-linux-gnu-g++
|
||||||
|
|
||||||
ENV HOSTS=x86_64-unknown-netbsd
|
ENV HOSTS=s390x-unknown-linux-gnu
|
||||||
ENV HOSTS=$HOSTS,s390x-unknown-linux-gnu
|
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
39
src/ci/docker/dist-x86_64-freebsd/Dockerfile
Normal file
39
src/ci/docker/dist-x86_64-freebsd/Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
file \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
python2.7 \
|
||||||
|
git \
|
||||||
|
cmake \
|
||||||
|
sudo \
|
||||||
|
bzip2 \
|
||||||
|
xz-utils \
|
||||||
|
wget \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
COPY build-toolchain.sh /tmp/
|
||||||
|
RUN /tmp/build-toolchain.sh x86_64
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
ENV \
|
||||||
|
AR_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-ar \
|
||||||
|
CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-gcc \
|
||||||
|
CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-g++
|
||||||
|
|
||||||
|
ENV HOSTS=x86_64-unknown-freebsd
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
112
src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh
Executable file
112
src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh
Executable file
@@ -0,0 +1,112 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
ARCH=$1
|
||||||
|
BINUTILS=2.25.1
|
||||||
|
GCC=5.3.0
|
||||||
|
|
||||||
|
hide_output() {
|
||||||
|
set +x
|
||||||
|
on_err="
|
||||||
|
echo ERROR: An error was encountered with the build.
|
||||||
|
cat /tmp/build.log
|
||||||
|
exit 1
|
||||||
|
"
|
||||||
|
trap "$on_err" ERR
|
||||||
|
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||||
|
PING_LOOP_PID=$!
|
||||||
|
$@ &> /tmp/build.log
|
||||||
|
trap - ERR
|
||||||
|
kill $PING_LOOP_PID
|
||||||
|
set -x
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir binutils
|
||||||
|
cd binutils
|
||||||
|
|
||||||
|
# First up, build binutils
|
||||||
|
curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 | tar xjf -
|
||||||
|
mkdir binutils-build
|
||||||
|
cd binutils-build
|
||||||
|
hide_output ../binutils-$BINUTILS/configure \
|
||||||
|
--target=$ARCH-unknown-freebsd10
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
cd ../..
|
||||||
|
rm -rf binutils
|
||||||
|
|
||||||
|
# Next, download the FreeBSD libc and relevant header files
|
||||||
|
|
||||||
|
mkdir freebsd
|
||||||
|
case "$ARCH" in
|
||||||
|
x86_64)
|
||||||
|
URL=ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.2-RELEASE/base.txz
|
||||||
|
;;
|
||||||
|
i686)
|
||||||
|
URL=ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/10.2-RELEASE/base.txz
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
curl $URL | tar xJf - -C freebsd ./usr/include ./usr/lib ./lib
|
||||||
|
|
||||||
|
dst=/usr/local/$ARCH-unknown-freebsd10
|
||||||
|
|
||||||
|
cp -r freebsd/usr/include $dst/
|
||||||
|
cp freebsd/usr/lib/crt1.o $dst/lib
|
||||||
|
cp freebsd/usr/lib/Scrt1.o $dst/lib
|
||||||
|
cp freebsd/usr/lib/crti.o $dst/lib
|
||||||
|
cp freebsd/usr/lib/crtn.o $dst/lib
|
||||||
|
cp freebsd/usr/lib/libc.a $dst/lib
|
||||||
|
cp freebsd/usr/lib/libutil.a $dst/lib
|
||||||
|
cp freebsd/usr/lib/libutil_p.a $dst/lib
|
||||||
|
cp freebsd/usr/lib/libm.a $dst/lib
|
||||||
|
cp freebsd/usr/lib/librt.so.1 $dst/lib
|
||||||
|
cp freebsd/usr/lib/libexecinfo.so.1 $dst/lib
|
||||||
|
cp freebsd/lib/libc.so.7 $dst/lib
|
||||||
|
cp freebsd/lib/libm.so.5 $dst/lib
|
||||||
|
cp freebsd/lib/libutil.so.9 $dst/lib
|
||||||
|
cp freebsd/lib/libthr.so.3 $dst/lib/libpthread.so
|
||||||
|
|
||||||
|
ln -s libc.so.7 $dst/lib/libc.so
|
||||||
|
ln -s libm.so.5 $dst/lib/libm.so
|
||||||
|
ln -s librt.so.1 $dst/lib/librt.so
|
||||||
|
ln -s libutil.so.9 $dst/lib/libutil.so
|
||||||
|
ln -s libexecinfo.so.1 $dst/lib/libexecinfo.so
|
||||||
|
rm -rf freebsd
|
||||||
|
|
||||||
|
# Finally, download and build gcc to target FreeBSD
|
||||||
|
mkdir gcc
|
||||||
|
cd gcc
|
||||||
|
curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.bz2 | tar xjf -
|
||||||
|
cd gcc-$GCC
|
||||||
|
./contrib/download_prerequisites
|
||||||
|
|
||||||
|
mkdir ../gcc-build
|
||||||
|
cd ../gcc-build
|
||||||
|
hide_output ../gcc-$GCC/configure \
|
||||||
|
--enable-languages=c,c++ \
|
||||||
|
--target=$ARCH-unknown-freebsd10 \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-nls \
|
||||||
|
--disable-libgomp \
|
||||||
|
--disable-libquadmath \
|
||||||
|
--disable-libssp \
|
||||||
|
--disable-libvtv \
|
||||||
|
--disable-libcilkrts \
|
||||||
|
--disable-libada \
|
||||||
|
--disable-libsanitizer \
|
||||||
|
--disable-libquadmath-support \
|
||||||
|
--disable-lto
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
cd ../..
|
||||||
|
rm -rf gcc
|
||||||
101
src/ci/docker/dist-x86_64-linux/Dockerfile
Normal file
101
src/ci/docker/dist-x86_64-linux/Dockerfile
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
FROM centos:5
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
# Centos 5 is EOL and is no longer available from the usual mirrors, so switch
|
||||||
|
# to http://vault.centos.org/
|
||||||
|
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
|
||||||
|
RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
|
||||||
|
RUN sed -i 's|#\(baseurl.*\)mirror.centos.org/centos/$releasever|\1vault.centos.org/5.11|' /etc/yum.repos.d/*.repo
|
||||||
|
|
||||||
|
RUN yum upgrade -y && yum install -y \
|
||||||
|
curl \
|
||||||
|
bzip2 \
|
||||||
|
gcc \
|
||||||
|
gcc-c++ \
|
||||||
|
make \
|
||||||
|
glibc-devel \
|
||||||
|
perl \
|
||||||
|
zlib-devel \
|
||||||
|
file \
|
||||||
|
xz \
|
||||||
|
which \
|
||||||
|
pkgconfig \
|
||||||
|
wget \
|
||||||
|
autoconf \
|
||||||
|
gettext
|
||||||
|
|
||||||
|
ENV PATH=/rustroot/bin:$PATH
|
||||||
|
ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
|
||||||
|
ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
|
||||||
|
WORKDIR /tmp
|
||||||
|
COPY shared.sh build-binutils.sh /tmp/
|
||||||
|
|
||||||
|
# We need a build of openssl which supports SNI to download artifacts from
|
||||||
|
# static.rust-lang.org. This'll be used to link into libcurl below (and used
|
||||||
|
# later as well), so build a copy of OpenSSL with dynamic libraries into our
|
||||||
|
# generic root.
|
||||||
|
COPY build-openssl.sh /tmp/
|
||||||
|
RUN ./build-openssl.sh
|
||||||
|
|
||||||
|
# The `curl` binary on CentOS doesn't support SNI which is needed for fetching
|
||||||
|
# some https urls we have, so install a new version of libcurl + curl which is
|
||||||
|
# using the openssl we just built previously.
|
||||||
|
#
|
||||||
|
# Note that we also disable a bunch of optional features of curl that we don't
|
||||||
|
# really need.
|
||||||
|
COPY build-curl.sh /tmp/
|
||||||
|
RUN ./build-curl.sh
|
||||||
|
|
||||||
|
# binutils < 2.22 has a bug where the 32-bit executables it generates
|
||||||
|
# immediately segfault in Rust, so we need to install our own binutils.
|
||||||
|
#
|
||||||
|
# See https://github.com/rust-lang/rust/issues/20440 for more info
|
||||||
|
RUN ./build-binutils.sh
|
||||||
|
|
||||||
|
# Need a newer version of gcc than centos has to compile LLVM nowadays
|
||||||
|
COPY build-gcc.sh /tmp/
|
||||||
|
RUN ./build-gcc.sh
|
||||||
|
|
||||||
|
# CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
|
||||||
|
COPY build-python.sh /tmp/
|
||||||
|
RUN ./build-python.sh
|
||||||
|
|
||||||
|
# Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
|
||||||
|
# cloning, so download and build it here.
|
||||||
|
COPY build-git.sh /tmp/
|
||||||
|
RUN ./build-git.sh
|
||||||
|
|
||||||
|
# libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
|
||||||
|
# only has 2.6.4, so build our own
|
||||||
|
COPY build-cmake.sh /tmp/
|
||||||
|
RUN ./build-cmake.sh
|
||||||
|
|
||||||
|
# for sanitizers, we need kernel headers files newer than the ones CentOS ships
|
||||||
|
# with so we install newer ones here
|
||||||
|
COPY build-headers.sh /tmp/
|
||||||
|
RUN ./build-headers.sh
|
||||||
|
|
||||||
|
RUN curl -Lo /rustroot/dumb-init \
|
||||||
|
https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
|
||||||
|
chmod +x /rustroot/dumb-init
|
||||||
|
ENTRYPOINT ["/rustroot/dumb-init", "--"]
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
ENV HOSTS=x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
|
--host=$HOSTS \
|
||||||
|
--enable-extended \
|
||||||
|
--enable-sanitizers
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
|
|
||||||
|
# This is the only builder which will create source tarballs
|
||||||
|
ENV DIST_SRC 1
|
||||||
|
|
||||||
|
# When we build cargo in this container, we don't want it to use the system
|
||||||
|
# libcurl, instead it should compile its own.
|
||||||
|
ENV LIBCURL_NO_PKG_CONFIG 1
|
||||||
26
src/ci/docker/dist-x86_64-linux/build-binutils.sh
Executable file
26
src/ci/docker/dist-x86_64-linux/build-binutils.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
curl https://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2 | tar xfj -
|
||||||
|
|
||||||
|
mkdir binutils-build
|
||||||
|
cd binutils-build
|
||||||
|
hide_output ../binutils-2.25.1/configure --prefix=/rustroot
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf binutils-build
|
||||||
|
rm -rf binutils-2.25.1
|
||||||
25
src/ci/docker/dist-x86_64-linux/build-cmake.sh
Executable file
25
src/ci/docker/dist-x86_64-linux/build-cmake.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
curl https://cmake.org/files/v3.6/cmake-3.6.3.tar.gz | tar xzf -
|
||||||
|
|
||||||
|
mkdir cmake-build
|
||||||
|
cd cmake-build
|
||||||
|
hide_output ../cmake-3.6.3/configure --prefix=/rustroot
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf cmake-build
|
||||||
|
rm -rf cmake-3.6.3
|
||||||
43
src/ci/docker/dist-x86_64-linux/build-curl.sh
Executable file
43
src/ci/docker/dist-x86_64-linux/build-curl.sh
Executable file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
VERSION=7.51.0
|
||||||
|
|
||||||
|
curl http://cool.haxx.se/download/curl-$VERSION.tar.bz2 | tar xjf -
|
||||||
|
|
||||||
|
mkdir curl-build
|
||||||
|
cd curl-build
|
||||||
|
hide_output ../curl-$VERSION/configure \
|
||||||
|
--prefix=/rustroot \
|
||||||
|
--with-ssl=/rustroot \
|
||||||
|
--disable-sspi \
|
||||||
|
--disable-gopher \
|
||||||
|
--disable-smtp \
|
||||||
|
--disable-smb \
|
||||||
|
--disable-imap \
|
||||||
|
--disable-pop3 \
|
||||||
|
--disable-tftp \
|
||||||
|
--disable-telnet \
|
||||||
|
--disable-manual \
|
||||||
|
--disable-dict \
|
||||||
|
--disable-rtsp \
|
||||||
|
--disable-ldaps \
|
||||||
|
--disable-ldap
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf curl-build
|
||||||
|
rm -rf curl-$VERSION
|
||||||
|
yum erase -y curl
|
||||||
33
src/ci/docker/dist-x86_64-linux/build-gcc.sh
Executable file
33
src/ci/docker/dist-x86_64-linux/build-gcc.sh
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
GCC=4.8.5
|
||||||
|
|
||||||
|
curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.bz2 | tar xjf -
|
||||||
|
cd gcc-$GCC
|
||||||
|
./contrib/download_prerequisites
|
||||||
|
mkdir ../gcc-build
|
||||||
|
cd ../gcc-build
|
||||||
|
hide_output ../gcc-$GCC/configure \
|
||||||
|
--prefix=/rustroot \
|
||||||
|
--enable-languages=c,c++
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
ln -nsf gcc /rustroot/bin/cc
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf gcc-build
|
||||||
|
rm -rf gcc-$GCC
|
||||||
|
yum erase -y gcc gcc-c++ binutils
|
||||||
24
src/ci/docker/dist-x86_64-linux/build-git.sh
Executable file
24
src/ci/docker/dist-x86_64-linux/build-git.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
curl https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz | tar xzf -
|
||||||
|
|
||||||
|
cd git-2.10.0
|
||||||
|
make configure
|
||||||
|
hide_output ./configure --prefix=/rustroot
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf git-2.10.0
|
||||||
25
src/ci/docker/dist-x86_64-linux/build-headers.sh
Executable file
25
src/ci/docker/dist-x86_64-linux/build-headers.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
curl https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.2.84.tar.xz | unxz | tar x
|
||||||
|
|
||||||
|
cd linux-3.2.84
|
||||||
|
hide_output make mrproper
|
||||||
|
hide_output make INSTALL_HDR_PATH=dest headers_install
|
||||||
|
|
||||||
|
find dest/include \( -name .install -o -name ..install.cmd \) -delete
|
||||||
|
yes | cp -fr dest/include/* /usr/include
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf linux-3.2.84
|
||||||
27
src/ci/docker/dist-x86_64-linux/build-openssl.sh
Executable file
27
src/ci/docker/dist-x86_64-linux/build-openssl.sh
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
VERSION=1.0.2j
|
||||||
|
|
||||||
|
curl https://www.openssl.org/source/openssl-$VERSION.tar.gz | tar xzf -
|
||||||
|
|
||||||
|
cd openssl-$VERSION
|
||||||
|
hide_output ./config --prefix=/rustroot shared -fPIC
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
cd ..
|
||||||
|
rm -rf openssl-$VERSION
|
||||||
|
|
||||||
|
# Make the system cert collection available to the new install.
|
||||||
|
ln -nsf /etc/pki/tls/cert.pem /rustroot/ssl/
|
||||||
30
src/ci/docker/dist-x86_64-linux/build-python.sh
Executable file
30
src/ci/docker/dist-x86_64-linux/build-python.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
source shared.sh
|
||||||
|
|
||||||
|
curl https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz | \
|
||||||
|
tar xzf -
|
||||||
|
|
||||||
|
mkdir python-build
|
||||||
|
cd python-build
|
||||||
|
|
||||||
|
# Gotta do some hackery to tell python about our custom OpenSSL build, but other
|
||||||
|
# than that fairly normal.
|
||||||
|
CFLAGS='-I /rustroot/include' LDFLAGS='-L /rustroot/lib -L /rustroot/lib64' \
|
||||||
|
hide_output ../Python-2.7.12/configure --prefix=/rustroot
|
||||||
|
hide_output make -j10
|
||||||
|
hide_output make install
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
rm -rf python-build
|
||||||
|
rm -rf Python-2.7.12
|
||||||
25
src/ci/docker/dist-x86_64-linux/shared.sh
Normal file
25
src/ci/docker/dist-x86_64-linux/shared.sh
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
# file at the top-level directory of this distribution and at
|
||||||
|
# http://rust-lang.org/COPYRIGHT.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
# option. This file may not be copied, modified, or distributed
|
||||||
|
# except according to those terms.
|
||||||
|
|
||||||
|
hide_output() {
|
||||||
|
set +x
|
||||||
|
on_err="
|
||||||
|
echo ERROR: An error was encountered with the build.
|
||||||
|
cat /tmp/build.log
|
||||||
|
exit 1
|
||||||
|
"
|
||||||
|
trap "$on_err" ERR
|
||||||
|
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||||
|
PING_LOOP_PID=$!
|
||||||
|
$@ &> /tmp/build.log
|
||||||
|
trap - ERR
|
||||||
|
kill $PING_LOOP_PID
|
||||||
|
set -x
|
||||||
|
}
|
||||||
@@ -26,12 +26,13 @@ RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-ini
|
|||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS \
|
ENV RUST_CONFIGURE_ARGS \
|
||||||
--target=x86_64-unknown-linux-musl \
|
--target=x86_64-unknown-linux-musl \
|
||||||
--musl-root-x86_64=/musl-x86_64
|
--musl-root-x86_64=/musl-x86_64 \
|
||||||
|
--enable-extended
|
||||||
|
|
||||||
# Newer binutils broke things on some vms/distros (i.e., linking against
|
# Newer binutils broke things on some vms/distros (i.e., linking against
|
||||||
# unknown relocs disabled by the following flag), so we need to go out of our
|
# unknown relocs disabled by the following flag), so we need to go out of our
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ set -ex
|
|||||||
export CFLAGS="-fPIC -Wa,-mrelax-relocations=no"
|
export CFLAGS="-fPIC -Wa,-mrelax-relocations=no"
|
||||||
export CXXFLAGS="-Wa,-mrelax-relocations=no"
|
export CXXFLAGS="-Wa,-mrelax-relocations=no"
|
||||||
|
|
||||||
MUSL=musl-1.1.14
|
MUSL=musl-1.1.16
|
||||||
curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf -
|
curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf -
|
||||||
cd $MUSL
|
cd $MUSL
|
||||||
./configure --prefix=/musl-x86_64 --disable-shared
|
./configure --prefix=/musl-x86_64 --disable-shared
|
||||||
|
|||||||
78
src/ci/docker/dist-x86_64-netbsd/Dockerfile
Normal file
78
src/ci/docker/dist-x86_64-netbsd/Dockerfile
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
automake \
|
||||||
|
bison \
|
||||||
|
bzip2 \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
file \
|
||||||
|
flex \
|
||||||
|
g++ \
|
||||||
|
gawk \
|
||||||
|
gdb \
|
||||||
|
git \
|
||||||
|
gperf \
|
||||||
|
help2man \
|
||||||
|
libncurses-dev \
|
||||||
|
libtool-bin \
|
||||||
|
make \
|
||||||
|
patch \
|
||||||
|
python2.7 \
|
||||||
|
sudo \
|
||||||
|
texinfo \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config
|
||||||
|
|
||||||
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
|
dpkg -i dumb-init_*.deb && \
|
||||||
|
rm dumb-init_*.deb
|
||||||
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
|
# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
|
||||||
|
# toolchains we build below chokes on that, so go back to make 3
|
||||||
|
RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
|
||||||
|
cd make-3.81 && \
|
||||||
|
./configure --prefix=/usr && \
|
||||||
|
make && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf make-3.81
|
||||||
|
|
||||||
|
RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
|
||||||
|
tar xjf - && \
|
||||||
|
cd crosstool-ng && \
|
||||||
|
./configure --prefix=/usr/local && \
|
||||||
|
make -j$(nproc) && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -rf crosstool-ng
|
||||||
|
|
||||||
|
RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
|
||||||
|
RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
|
||||||
|
USER rustbuild
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
COPY build-netbsd-toolchain.sh /tmp/
|
||||||
|
RUN ./build-netbsd-toolchain.sh
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
|
ENV PATH=$PATH:/x-tools/x86_64-unknown-netbsd/bin
|
||||||
|
|
||||||
|
ENV \
|
||||||
|
AR_x86_64_unknown_netbsd=x86_64--netbsd-ar \
|
||||||
|
CC_x86_64_unknown_netbsd=x86_64--netbsd-gcc-sysroot \
|
||||||
|
CXX_x86_64_unknown_netbsd=x86_64--netbsd-g++-sysroot
|
||||||
|
|
||||||
|
ENV HOSTS=x86_64-unknown-netbsd
|
||||||
|
|
||||||
|
ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
|
||||||
|
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
|
||||||
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
lib32stdc++6
|
lib32stdc++6
|
||||||
|
|
||||||
RUN curl -o /usr/local/bin/sccache \
|
RUN curl -o /usr/local/bin/sccache \
|
||||||
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
|
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-29-sccache-x86_64-unknown-linux-musl && \
|
||||||
chmod +x /usr/local/bin/sccache
|
chmod +x /usr/local/bin/sccache
|
||||||
|
|
||||||
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
|
||||||
@@ -27,10 +27,10 @@ WORKDIR /tmp
|
|||||||
COPY build-emscripten.sh /tmp/
|
COPY build-emscripten.sh /tmp/
|
||||||
RUN ./build-emscripten.sh
|
RUN ./build-emscripten.sh
|
||||||
ENV PATH=$PATH:/tmp/emsdk_portable
|
ENV PATH=$PATH:/tmp/emsdk_portable
|
||||||
ENV PATH=$PATH:/tmp/emsdk_portable/clang/tag-e1.37.1/build_tag-e1.37.1_32/bin
|
ENV PATH=$PATH:/tmp/emsdk_portable/clang/tag-e1.37.10/build_tag-e1.37.10_32/bin
|
||||||
ENV PATH=$PATH:/tmp/emsdk_portable/node/4.1.1_32bit/bin
|
ENV PATH=$PATH:/tmp/emsdk_portable/node/4.1.1_32bit/bin
|
||||||
ENV PATH=$PATH:/tmp/emsdk_portable/emscripten/tag-1.37.1
|
ENV PATH=$PATH:/tmp/emsdk_portable/emscripten/tag-1.37.10
|
||||||
ENV EMSCRIPTEN=/tmp/emsdk_portable/emscripten/tag-1.37.1
|
ENV EMSCRIPTEN=/tmp/emsdk_portable/emscripten/tag-1.37.10
|
||||||
|
|
||||||
ENV RUST_CONFIGURE_ARGS --target=asmjs-unknown-emscripten
|
ENV RUST_CONFIGURE_ARGS --target=asmjs-unknown-emscripten
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,24 @@ exit 1
|
|||||||
|
|
||||||
curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
|
curl https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
|
||||||
tar xzf -
|
tar xzf -
|
||||||
|
|
||||||
|
# Some versions of the EMSDK archive have their contents in .emsdk-portable
|
||||||
|
# and others in emsdk_portable. Make sure the EMSDK ends up in a fixed path.
|
||||||
|
if [ -d emsdk-portable ]; then
|
||||||
|
mv emsdk-portable emsdk_portable
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d emsdk_portable ]; then
|
||||||
|
echo "ERROR: Invalid emsdk archive. Dumping working directory." >&2
|
||||||
|
ls -l
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Some versions of the EMSDK set the permissions of the root directory to
|
||||||
|
# 0700. Ensure the directory is readable by all users.
|
||||||
|
chmod 755 emsdk_portable
|
||||||
|
|
||||||
source emsdk_portable/emsdk_env.sh
|
source emsdk_portable/emsdk_env.sh
|
||||||
hide_output emsdk update
|
hide_output emsdk update
|
||||||
hide_output emsdk install --build=Release sdk-tag-1.37.1-32bit
|
hide_output emsdk install --build=Release sdk-tag-1.37.10-32bit
|
||||||
hide_output emsdk activate --build=Release sdk-tag-1.37.1-32bit
|
hide_output emsdk activate --build=Release sdk-tag-1.37.10-32bit
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user