diff --git a/.gitattributes b/.gitattributes index e737c7946ef61..2b4f3d472632a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,3 +7,4 @@ src/etc/installer/gfx/* binary *.woff binary src/vendor/** -text +Cargo.lock -merge diff --git a/.gitignore b/.gitignore index b54bab177d0ae..57407a2399a2f 100644 --- a/.gitignore +++ b/.gitignore @@ -95,7 +95,6 @@ config.stamp keywords.md lexer.ml src/etc/dl -src/librustc_llvm/llvmdeps.rs tmp.*.rs version.md version.ml @@ -103,3 +102,6 @@ version.texi .cargo !src/vendor/** /src/target/ + +no_llvm_build + diff --git a/.gitmodules b/.gitmodules index 2802c8d63913f..fc2f8bbc8a350 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,10 +2,6 @@ path = src/llvm url = https://github.com/rust-lang/llvm.git branch = master -[submodule "src/rt/hoedown"] - path = src/rt/hoedown - url = https://github.com/rust-lang/hoedown.git - branch = rust-2015-09-21-do-not-delete [submodule "src/jemalloc"] path = src/jemalloc url = https://github.com/rust-lang/jemalloc.git @@ -21,10 +17,10 @@ [submodule "src/tools/cargo"] path = src/tools/cargo url = https://github.com/rust-lang/cargo.git -[submodule "reference"] +[submodule "src/doc/reference"] path = src/doc/reference url = https://github.com/rust-lang-nursery/reference.git -[submodule "book"] +[submodule "src/doc/book"] path = src/doc/book url = https://github.com/rust-lang/book.git [submodule "src/tools/rls"] @@ -42,3 +38,15 @@ [submodule "src/tools/miri"] path = src/tools/miri url = https://github.com/solson/miri.git +[submodule "src/dlmalloc"] + path = src/dlmalloc + url = https://github.com/alexcrichton/dlmalloc-rs.git +[submodule "src/binaryen"] + path = src/binaryen + url = https://github.com/alexcrichton/binaryen.git +[submodule "src/doc/rust-by-example"] + path = src/doc/rust-by-example + url = https://github.com/rust-lang/rust-by-example +[submodule "src/llvm-emscripten"] + path = src/llvm-emscripten + url = https://github.com/rust-lang/llvm diff --git a/.mailmap b/.mailmap index c2d3b28602bcc..3ff9e94ee5410 100644 --- a/.mailmap +++ b/.mailmap @@ -41,11 +41,12 @@ Boris Egorov Brandon Sanderson Brandon Sanderson Brett Cannon Brett Cannon Brian Anderson +Brian Anderson Brian Dawn Brian Leibig Brian Leibig Carl-Anton Ingmarsson -Carol (Nichols || Goulding) -Carol (Nichols || Goulding) +Carol (Nichols || Goulding) +Carol (Nichols || Goulding) Carol Nichols Carol Willing Chris C Cerami Chris C Cerami Chris Pressey @@ -94,9 +95,9 @@ Herman J. Radtke III Herman J. Radtke III Ivan Ivaschenko J. J. Weber -Jakub Bukaj -Jakub Bukaj -Jakub Bukaj Jakub Bukaj +Jakub Adam Wieczorek +Jakub Adam Wieczorek +Jakub Adam Wieczorek James Deng James Miller James Perry diff --git a/.travis.yml b/.travis.yml index 9e3225a103ab9..0d8641e45ed15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,25 +5,24 @@ services: - docker git: - depth: 1 + depth: 2 submodules: false matrix: fast_finish: true include: # Images used in testing PR and try-build should be run first. - - env: IMAGE=x86_64-gnu-llvm-3.7 RUST_BACKTRACE=1 + - env: IMAGE=x86_64-gnu-llvm-3.9 RUST_BACKTRACE=1 if: type = pull_request OR branch = auto - env: IMAGE=dist-x86_64-linux DEPLOY=1 if: branch = try OR branch = auto - # "alternate" deployments, these are "nightlies" but don't have assertions - # 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 - # that they use. + # "alternate" deployments, these are "nightlies" but have LLVM assertions + # turned on, they're deployed to a different location primarily for + # additional testing. - env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1 - if: branch = auto + if: branch = try OR branch = auto - env: > RUST_CHECK_TARGET=dist @@ -36,7 +35,7 @@ matrix: NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 os: osx - osx_image: xcode7 + osx_image: xcode7.3 if: branch = auto # macOS builders. These are placed near the beginning because they are very @@ -57,7 +56,7 @@ matrix: NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 os: osx - osx_image: xcode8.2 + osx_image: xcode9.2 if: branch = auto - env: > @@ -71,7 +70,7 @@ matrix: NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 os: osx - osx_image: xcode8.2 + osx_image: xcode9.2 if: branch = auto # OSX builders producing releases. These do not run the full test suite and @@ -82,7 +81,7 @@ matrix: # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7. - env: > RUST_CHECK_TARGET=dist - RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended --enable-profiler" + RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended --enable-profiler --enable-emscripten" SRC=. DEPLOY=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1 @@ -91,12 +90,12 @@ matrix: NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 os: osx - osx_image: xcode7 + osx_image: xcode7.3 if: branch = auto - env: > 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 --enable-sanitizers --enable-profiler" + RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers --enable-profiler --enable-emscripten" SRC=. DEPLOY=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1 @@ -105,7 +104,7 @@ matrix: NO_LLVM_ASSERTIONS=1 NO_DEBUG_ASSERTIONS=1 os: osx - osx_image: xcode7 + osx_image: xcode7.3 if: branch = auto # Linux builders, remaining docker images @@ -113,7 +112,9 @@ matrix: if: branch = auto - env: IMAGE=armhf-gnu if: branch = auto - - env: IMAGE=cross DEPLOY=1 + - env: IMAGE=dist-various-1 DEPLOY=1 + if: branch = auto + - env: IMAGE=dist-various-2 DEPLOY=1 if: branch = auto - env: IMAGE=dist-aarch64-linux DEPLOY=1 if: branch = auto @@ -125,9 +126,7 @@ matrix: if: branch = auto - env: IMAGE=dist-armv7-linux DEPLOY=1 if: branch = auto - - env: IMAGE=dist-fuchsia DEPLOY=1 - if: branch = auto - - env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1 + - env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1 if: branch = auto - env: IMAGE=dist-i686-freebsd DEPLOY=1 if: branch = auto @@ -161,14 +160,16 @@ matrix: if: branch = auto - env: IMAGE=i686-gnu-nopt if: branch = auto - # - env: IMAGE=wasm32 issue 42646 - # if: branch = auto + - env: IMAGE=wasm32-unknown + if: branch = auto - env: IMAGE=x86_64-gnu if: branch = auto - env: IMAGE=x86_64-gnu-full-bootstrap if: branch = auto - env: IMAGE=x86_64-gnu-aux if: branch = auto + - env: IMAGE=x86_64-gnu-tools + if: branch = auto - env: IMAGE=x86_64-gnu-debug if: branch = auto - env: IMAGE=x86_64-gnu-nopt @@ -178,6 +179,17 @@ matrix: - env: IMAGE=x86_64-gnu-incremental if: branch = auto + - stage: publish toolstate + if: branch = master AND type = push + before_install: [] + install: [] + cache: false + sudo: false + script: + MESSAGE_FILE=$(mktemp -t msg.XXXXXX); + . src/ci/docker/x86_64-gnu-tools/repo.sh; + commit_toolstate_change "$MESSAGE_FILE" "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "$MESSAGE_FILE" "$TOOLSTATE_REPO_ACCESS_TOKEN"; + env: global: - SCCACHE_BUCKET=rust-lang-ci-sccache2 @@ -185,10 +197,19 @@ env: - AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ # AWS_SECRET_ACCESS_KEY=... - secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo=" + # TOOLSTATE_REPO_ACCESS_TOKEN=... + - secure: "cFh8thThqEJLC98XKI5pfqflUzOlxsYPRW20AWRaYOOgYHPTiGWypTXiPbGSKaeAXTZoOA+DpQtEmefc0U6lt9dHc7a/MIaK6isFurjlnKYiLOeTruzyu1z7PWCeZ/jKXsU2RK/88DBtlNwfMdaMIeuKj14IVfpepPPL71ETbuk=" before_install: - zcat $HOME/docker/rust-ci.tar.gz | docker load || true - mkdir -p $HOME/rustsrc + # FIXME(#46924): these two commands are required to enable IPv6, + # they shouldn't exist, please revert once more official solutions appeared. + # see https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729 + - if [ "$TRAVIS_OS_NAME" = linux ]; then + echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json; + sudo service docker restart; + fi install: - case "$TRAVIS_OS_NAME" in @@ -251,7 +272,14 @@ after_failure: # Random attempt at debugging currently. Just poking around in here to see if # anything shows up. - - ls $HOME/Library/Logs/DiagnosticReports/ + - ls -lat $HOME/Library/Logs/DiagnosticReports/ + - find $HOME/Library/Logs/DiagnosticReports + -type f + -not -name '*.stage2-*.crash' + -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash' + -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \; + -exec head -750 {} \; + -exec echo travis_fold":"end:crashlog \; # attempt to debug anything killed by the oom killer on linux, just to see if # it happened @@ -284,6 +312,8 @@ before_deploy: rm -rf obj/build/dist/doc && cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT; fi + - travis_retry gem update --system + - ls -la deploy/$TRAVIS_COMMIT deploy: - provider: s3 @@ -300,11 +330,30 @@ deploy: branch: auto condition: $DEPLOY = 1 + # this is the same as the above deployment provider except that it uploads to + # a slightly different directory and has a different trigger + - provider: s3 + bucket: rust-lang-ci2 + skip_cleanup: true + local_dir: deploy + upload_dir: rustc-builds-alt + acl: public_read + region: us-west-1 + access_key_id: AKIAJVBODR3IA4O72THQ + secret_access_key: + secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0=" + on: + branch: auto + condition: $DEPLOY_ALT = 1 + + # These two providers are the same as the two above, except deploy on the + # try branch. Travis does not appear to provide a way to use "or" in these + # conditions. - provider: s3 bucket: rust-lang-ci2 skip_cleanup: true local_dir: deploy - upload_dir: rustc-builds-try + upload_dir: rustc-builds acl: public_read region: us-west-1 access_key_id: AKIAJVBODR3IA4O72THQ @@ -314,8 +363,6 @@ deploy: branch: try condition: $DEPLOY = 1 - # this is the same as the above deployment provider except that it uploads to - # a slightly different directory and has a different trigger - provider: s3 bucket: rust-lang-ci2 skip_cleanup: true @@ -327,5 +374,5 @@ deploy: secret_access_key: secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0=" on: - branch: auto + branch: try condition: $DEPLOY_ALT = 1 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6bec933018686..e9b39717c7008 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -6,19 +6,19 @@ A version of this document [can be found online](https://www.rust-lang.org/condu **Contact**: [rust-mods@rust-lang.org](mailto:rust-mods@rust-lang.org) -* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic. +* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic. * On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all. * Please be kind and courteous. There's no need to be mean or rude. * Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer. * Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works. * We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term "harassment" as including the definition in the Citizen Code of Conduct; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups. -* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team](/team.html#Moderation) immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back. +* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team][mod_team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back. * Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome. ## Moderation -These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team](/team.html#Moderation). +These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team][mod_team]. 1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.) 2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed. @@ -35,4 +35,6 @@ And if someone takes issue with something you said or did, resist the urge to be The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion. -*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).* +*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).* + +[mod_team]: https://www.rust-lang.org/team.html#Moderation-team diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 741ced8f0912d..552961b9b66c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,5 @@ # Contributing to Rust +[contributing-to-rust]: #contributing-to-rust Thank you for your interest in contributing to Rust! There are many ways to contribute, and we appreciate all of them. This document is a bit long, so here's @@ -18,11 +19,12 @@ hop on [#rust-internals][pound-rust-internals]. As a reminder, all contributors are expected to follow our [Code of Conduct][coc]. -[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals +[pound-rust-internals]: https://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals [internals]: https://internals.rust-lang.org [coc]: https://www.rust-lang.org/conduct.html ## Feature Requests +[feature-requests]: #feature-requests To request a change to the way that the Rust language works, please open an issue in the [RFCs repository](https://github.com/rust-lang/rfcs/issues/new) @@ -30,6 +32,7 @@ rather than this one. New features and other significant language changes must go through the RFC process. ## Bug Reports +[bug-reports]: #bug-reports While bugs are unfortunate, they're a reality in software. We can't fix what we don't know about, so please report liberally. If you're not sure if something @@ -80,6 +83,7 @@ $ RUST_BACKTRACE=1 rustc ... ``` ## The Build System +[the-build-system]: #the-build-system Rust's build system allows you to bootstrap the compiler, run tests & benchmarks, generate documentation, install a fresh build of Rust, and more. @@ -94,6 +98,7 @@ system internals, try asking in [`#rust-internals`][pound-rust-internals]. [bootstrap]: https://github.com/rust-lang/rust/tree/master/src/bootstrap/ ### Configuration +[configuration]: #configuration Before you can start building the compiler you need to configure the build for your system. In most cases, that will just mean using the defaults provided @@ -107,14 +112,17 @@ There are large number of options provided in this config file that will alter t configuration used in the build process. Some options to note: #### `[llvm]`: +- `assertions = true` = This enables LLVM assertions, which makes LLVM misuse cause an assertion failure instead of weird misbehavior. This also slows down the compiler's runtime by ~20%. - `ccache = true` - Use ccache when building llvm #### `[build]`: - `compiler-docs = true` - Build compiler documentation #### `[rust]`: -- `debuginfo = true` - Build a compiler with debuginfo -- `optimize = false` - Disable optimizations to speed up compilation of stage1 rust +- `debuginfo = true` - Build a compiler with debuginfo. Makes building rustc slower, but then you can use a debugger to debug `rustc`. +- `debuginfo-lines = true` - An alternative to `debuginfo = true` that doesn't let you use a debugger, but doesn't make building rustc slower and still gives you line numbers in backtraces. +- `debug-assertions = true` - Makes the log output of `debug!` work. +- `optimize = false` - Disable optimizations to speed up compilation of stage1 rust, but makes the stage1 compiler x100 slower. For more options, the `config.toml` file contains commented out defaults, with descriptions of what each option will do. @@ -125,6 +133,11 @@ file. If you still have a `config.mk` file in your directory - from `./configure` - you may need to delete it for `config.toml` to work. ### Building +[building]: #building + +Dependencies +- [build dependencies](README.md#building-from-source) +- `gdb` 6.2.0 minimum, 7.1 or later recommended for test builds The build system uses the `x.py` script to control the build process. This script is used to build, test, and document various parts of the compiler. You can @@ -194,6 +207,7 @@ Note: Previously `./configure` and `make` were used to build this project. They are still available, but `x.py` is the recommended build system. ### Useful commands +[useful-commands]: #useful-commands Some common invocations of `x.py` are: @@ -234,6 +248,7 @@ Some common invocations of `x.py` are: code. ### Using your local build +[using-local-build]: #using-local-build If you use Rustup to manage your rust install, it has a feature called ["custom toolchains"][toolchain-link] that you can use to access your newly-built compiler @@ -261,15 +276,37 @@ build, you'll need to build rustdoc specially, since it's not normally built in stage 1. `python x.py build --stage 1 src/libstd src/tools/rustdoc` will build rustdoc and libstd, which will allow rustdoc to be run with that toolchain.) +### Out-of-tree builds +[out-of-tree-builds]: #out-of-tree-builds + +Rust's `x.py` script fully supports out-of-tree builds - it looks for +the Rust source code from the directory `x.py` was found in, but it +reads the `config.toml` configuration file from the directory it's +run in, and places all build artifacts within a subdirectory named `build`. + +This means that if you want to do an out-of-tree build, you can just do it: +``` +$ cd my/build/dir +$ cp ~/my-config.toml config.toml # Or fill in config.toml otherwise +$ path/to/rust/x.py build +... +$ # This will use the Rust source code in `path/to/rust`, but build +$ # artifacts will now be in ./build +``` + +It's absolutely fine to have multiple build directories with different +`config.toml` configurations using the same code. + ## Pull Requests +[pull-requests]: #pull-requests Pull requests are the primary mechanism we use to change Rust. GitHub itself -has some [great documentation][pull-requests] on using the Pull Request feature. +has some [great documentation][about-pull-requests] on using the Pull Request feature. We use the "fork and pull" model [described here][development-models], where contributors push changes to their personal fork and create pull requests to bring those changes into the source repository. -[pull-requests]: https://help.github.com/articles/about-pull-requests/ +[about-pull-requests]: https://help.github.com/articles/about-pull-requests/ [development-models]: https://help.github.com/articles/about-collaborative-development-models/ Please make pull requests against the `master` branch. @@ -323,35 +360,145 @@ will run all the tests on every platform we support. If it all works out, Speaking of tests, Rust has a comprehensive test suite. More information about it can be found -[here](https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md). +[here](https://github.com/rust-lang/rust/blob/master/src/test/COMPILER_TESTS.md). ### External Dependencies +[external-dependencies]: #external-dependencies Currently building Rust will also build the following external projects: * [clippy](https://github.com/rust-lang-nursery/rust-clippy) +* [miri](https://github.com/solson/miri) +* [rustfmt](https://github.com/rust-lang-nursery/rustfmt) +* [rls](https://github.com/rust-lang-nursery/rls/) -If your changes break one of these projects, you need to fix them by opening -a pull request against the broken project. When you have opened a pull request, -you can point the submodule at your pull request by calling +We allow breakage of these tools in the nightly channel. Maintainers of these +projects will be notified of the breakages and should fix them as soon as +possible. -``` -git fetch origin pull/$id_of_your_pr/head:my_pr -git checkout my_pr +After the external is fixed, one could add the changes with + +```sh +git add path/to/submodule ``` -within the submodule's directory. Don't forget to also add your changes with +outside the submodule. +In order to prepare your tool-fixing PR, you can run the build locally by doing +`./x.py build src/tools/TOOL`. If you will be editing the sources +there, you may wish to set `submodules = false` in the `config.toml` +to prevent `x.py` from resetting to the original branch. + +Breakage is not allowed in the beta and stable channels, and must be addressed +before the PR is merged. + +#### Breaking Tools Built With The Compiler +[breaking-tools-built-with-the-compiler]: #breaking-tools-built-with-the-compiler + +Rust's build system builds a number of tools that make use of the +internals of the compiler. This includes clippy, +[RLS](https://github.com/rust-lang-nursery/rls) and +[rustfmt](https://github.com/rust-lang-nursery/rustfmt). If these tools +break because of your changes, you may run into a sort of "chicken and egg" +problem. These tools rely on the latest compiler to be built so you can't update +them to reflect your changes to the compiler until those changes are merged into +the compiler. At the same time, you can't get your changes merged into the compiler +because the rust-lang/rust build won't pass until those tools build and pass their +tests. + +That means that, in the default state, you can't update the compiler without first +fixing rustfmt, rls and the other tools that the compiler builds. + +Luckily, a feature was [added to Rust's build](https://github.com/rust-lang/rust/issues/45861) +to make all of this easy to handle. The idea is that we allow these tools to be "broken", +so that the rust-lang/rust build passes without trying to build them, then land the change +in the compiler, wait for a nightly, and go update the tools that you broke. Once you're done +and the tools are working again, you go back in the compiler and update the tools +so they can be distributed again. + +This should avoid a bunch of synchronization dances and is also much easier on contributors as +there's no need to block on rls/rustfmt/other tools changes going upstream. + +Here are those same steps in detail: + +1. (optional) First, if it doesn't exist already, create a `config.toml` by copying + `config.toml.example` in the root directory of the Rust repository. + Set `submodules = false` in the `[build]` section. This will prevent `x.py` + from resetting to the original branch after you make your changes. If you + need to [update any submodules to their latest versions][updating-submodules], + see the section of this file about that for more information. +2. (optional) Run `./x.py test src/tools/rustfmt` (substituting the submodule + that broke for `rustfmt`). Fix any errors in the submodule (and possibly others). +3. (optional) Make commits for your changes and send them to upstream repositories as a PR. +4. (optional) Maintainers of these submodules will **not** merge the PR. The PR can't be + merged because CI will be broken. You'll want to write a message on the PR referencing + your change, and how the PR should be merged once your change makes it into a nightly. +5. Wait for your PR to merge. +6. Wait for a nightly +7. (optional) Help land your PR on the upstream repository now that your changes are in nightly. +8. (optional) Send a PR to rust-lang/rust updating the submodule. + +#### Updating submodules +[updating-submodules]: #updating-submodules + +These instructions are specific to updating `rustfmt`, however they may apply +to the other submodules as well. Please help by improving these instructions +if you find any discrepancies or special cases that need to be addressed. + +To update the `rustfmt` submodule, start by running the appropriate +[`git submodule` command](https://git-scm.com/book/en/v2/Git-Tools-Submodules). +For example, to update to the latest commit on the remote master branch, +you may want to run: ``` -git add path/to/submodule +git submodule update --remote src/tools/rustfmt ``` +If you run `./x.py build` now, and you are lucky, it may just work. If you see +an error message about patches that did not resolve to any crates, you will need +to complete a few more steps which are outlined with their rationale below. -outside the submodule. +*(This error may change in the future to include more information.)* +``` +error: failed to resolve patches for `https://github.com/rust-lang-nursery/rustfmt` + +Caused by: + patch for `rustfmt-nightly` in `https://github.com/rust-lang-nursery/rustfmt` did not resolve to any crates +failed to run: ~/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path ~/rust/src/bootstrap/Cargo.toml +``` + +If you haven't used the `[patch]` +section of `Cargo.toml` before, there is [some relevant documentation about it +in the cargo docs](http://doc.crates.io/manifest.html#the-patch-section). In +addition to that, you should read the +[Overriding dependencies](http://doc.crates.io/specifying-dependencies.html#overriding-dependencies) +section of the documentation as well. + +Specifically, the following [section in Overriding dependencies](http://doc.crates.io/specifying-dependencies.html#testing-a-bugfix) reveals what the problem is: + +> Next up we need to ensure that our lock file is updated to use this new version of uuid so our project uses the locally checked out copy instead of one from crates.io. The way [patch] works is that it'll load the dependency at ../path/to/uuid and then whenever crates.io is queried for versions of uuid it'll also return the local version. +> +> This means that the version number of the local checkout is significant and will affect whether the patch is used. Our manifest declared uuid = "1.0" which means we'll only resolve to >= 1.0.0, < 2.0.0, and Cargo's greedy resolution algorithm also means that we'll resolve to the maximum version within that range. Typically this doesn't matter as the version of the git repository will already be greater or match the maximum version published on crates.io, but it's important to keep this in mind! + +This says that when we updated the submodule, the version number in our +`src/tools/rustfmt/Cargo.toml` changed. The new version is different from +the version in `Cargo.lock`, so the build can no longer continue. + +To resolve this, we need to update `Cargo.lock`. Luckily, cargo provides a +command to do this easily. + +First, go into the `src/` directory since that is where `Cargo.toml` is in +the rust repository. Then run, `cargo update -p rustfmt-nightly` to solve +the problem. + +``` +$ cd src +$ cargo update -p rustfmt-nightly +``` -It can also be more convenient during development to set `submodules = false` -in the `config.toml` to prevent `x.py` from resetting to the original branch. +This should change the version listed in `src/Cargo.lock` to the new version you updated +the submodule to. Running `./x.py build` should work now. ## Writing Documentation +[writing-documentation]: #writing-documentation Documentation improvements are very welcome. The source of `doc.rust-lang.org` is located in `src/doc` in the tree, and standard API documentation is generated @@ -382,6 +529,7 @@ reference to `doc/reference.html`. The CSS might be messed up, but you can verify that the HTML is right. ## Issue Triage +[issue-triage]: #issue-triage Sometimes, an issue will stay open, even though the bug has been fixed. And sometimes, the original bug may go stale because something has changed in the @@ -449,6 +597,7 @@ If you're looking for somewhere to start, check out the [E-easy][eeasy] tag. [rfcbot]: https://github.com/dikaiosune/rust-dashboard/blob/master/RFCBOT.md ## Out-of-tree Contributions +[out-of-tree-contributions]: #out-of-tree-contributions There are a number of other ways to contribute to Rust that don't deal with this repository. @@ -468,11 +617,14 @@ valuable! [community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library ## Helpful Links and Information +[helpful-info]: #helpful-info For people new to Rust, and just starting to contribute, or even for more seasoned developers, some useful places to look for information are: +* The [rustc guide] contains information about how various parts of the compiler work +* [Rust Forge][rustforge] contains additional documentation, including write-ups of how to achieve common tasks * The [Rust Internals forum][rif], a place to ask questions and discuss Rust's internals * The [generated documentation for rust's compiler][gdfrustc] @@ -484,10 +636,12 @@ are: * **Google!** ([search only in Rust Documentation][gsearchdocs] to find types, traits, etc. quickly) * Don't be afraid to ask! The Rust community is friendly and helpful. +[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html [gdfrustc]: http://manishearth.github.io/rust-internals-docs/rustc/ [gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here [rif]: http://internals.rust-lang.org [rr]: https://doc.rust-lang.org/book/README.html +[rustforge]: https://forge.rust-lang.org/ [tlgba]: http://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/ [ro]: http://www.rustaceans.org/ [rctd]: ./src/test/COMPILER_TESTS.md diff --git a/COPYRIGHT b/COPYRIGHT index f8b637d204ace..9bc018d983d7d 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -192,28 +192,6 @@ their own copyright notices and license terms: USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* Hoedown, the markdown parser, under src/rt/hoedown, is - licensed as follows. - - Copyright (c) 2008, Natacha Porté - Copyright (c) 2011, Vicent Martí - Copyright (c) 2013, Devin Torres and the Hoedown authors - - Permission to use, copy, modify, and distribute this - software for any purpose with or without fee is hereby - granted, provided that the above copyright notice and - this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE - INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR - ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA - OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * libbacktrace, under src/libbacktrace: Copyright (C) 2012-2014 Free Software Foundation, Inc. diff --git a/README.md b/README.md index 78a9f509bbcb4..e78bbb82711ab 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ standard library, and documentation. [Rust]: https://www.rust-lang.org ## Quick Start +[quick-start]: #quick-start Read ["Installation"] from [The Book]. @@ -13,7 +14,9 @@ Read ["Installation"] from [The Book]. [The Book]: https://doc.rust-lang.org/book/index.html ## Building from Source +[building-from-source]: #building-from-source +### Building on *nix 1. Make sure you have installed the dependencies: * `g++` 4.7 or later or `clang++` 3.x or later @@ -52,6 +55,7 @@ Read ["Installation"] from [The Book]. [Cargo]: https://github.com/rust-lang/cargo ### Building on Windows +[building-on-windows]: #building-on-windows There are two prominent ABIs in use on Windows: the native (MSVC) ABI used by Visual Studio, and the GNU ABI used by the GCC toolchain. Which version of Rust @@ -61,6 +65,7 @@ for interop with GNU software built using the MinGW/MSYS2 toolchain use the GNU build. #### MinGW +[windows-mingw]: #windows-mingw [MSYS2][msys2] can be used to easily build Rust on Windows: @@ -101,6 +106,7 @@ build. ``` #### MSVC +[windows-msvc]: #windows-msvc MSVC builds of Rust additionally require an installation of Visual Studio 2013 (or later) so `rustc` can use its linker. Make sure to check the “C++ tools” @@ -123,7 +129,11 @@ CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64. python x.py build ``` +If you are seeing build failure when compiling `rustc_binaryen`, make sure the path +length of the rust folder is not longer than 22 characters. + #### Specifying an ABI +[specifying-an-abi]: #specifying-an-abi Each specific ABI can also be used from either environment (for example, using the GNU ABI in powershell) by using an explicit build triple. The available @@ -141,6 +151,7 @@ in Building From Source), and modifying the `build` option under the `[build]` section. ### Configure and Make +[configure-and-make]: #configure-and-make While it's not the recommended build system, this project also provides a configure script and makefile (the latter of which just invokes `x.py`). @@ -155,6 +166,7 @@ When using the configure script, the generated `config.mk` file may override the `config.mk` file. ## Building Documentation +[building-documentation]: #building-documentation If you’d like to build the documentation, it’s almost the same: @@ -167,6 +179,7 @@ the ABI used. I.e., if the ABI was `x86_64-pc-windows-msvc`, the directory will `build\x86_64-pc-windows-msvc\doc`. ## Notes +[notes]: #notes Since the Rust compiler is written in Rust, it must be built by a precompiled "snapshot" version of itself (made in an earlier state of @@ -184,7 +197,7 @@ Snapshot binaries are currently built and tested on several platforms: You may find that other platforms work, but these are our officially supported build environments that are most likely to work. -Rust currently needs between 600MiB and 1.5GiB to build, depending on platform. +Rust currently needs between 600MiB and 1.5GiB of RAM to build, depending on platform. If it hits swap, it will take a very long time to build. There is more advice about hacking on Rust in [CONTRIBUTING.md]. @@ -192,6 +205,7 @@ There is more advice about hacking on Rust in [CONTRIBUTING.md]. [CONTRIBUTING.md]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md ## Getting Help +[getting-help]: #getting-help The Rust community congregates in a few places: @@ -204,6 +218,7 @@ The Rust community congregates in a few places: [users.rust-lang.org]: https://users.rust-lang.org/ ## Contributing +[contributing]: #contributing To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md). @@ -212,11 +227,16 @@ variety of channels on Mozilla's IRC network, irc.mozilla.org. The most popular channel is [#rust], a venue for general discussion about Rust. And a good place to ask for help would be [#rust-beginners]. +Also, the [rustc guide] might be a good place to start if you want to +find out how various parts of the compiler work. + [IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat [#rust]: irc://irc.mozilla.org/rust [#rust-beginners]: irc://irc.mozilla.org/rust-beginners +[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html ## License +[license]: #license Rust is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various diff --git a/RELEASES.md b/RELEASES.md index 2979ffe136c90..64e2145e0f37b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,398 @@ +Version 1.24.0 (2018-02-15) +========================== + +Language +-------- +- [External `sysv64` ffi is now available.][46528] + eg. `extern "sysv64" fn foo () {}` + +Compiler +-------- +- [rustc now uses 16 codegen units by default for release builds.][46910] + For the fastest builds, utilize `codegen-units=1`. +- [Added `armv4t-unknown-linux-gnueabi` target.][47018] +- [Add `aarch64-unknown-openbsd` support][46760] + +Libraries +--------- +- [`str::find::` now uses memchr.][46735] This should lead to a 10x + improvement in performance in the majority of cases. +- [`OsStr`'s `Debug` implementation is now lossless and consistent + with Windows.][46798] +- [`time::{SystemTime, Instant}` now implement `Hash`.][46828] +- [impl `From` for `AtomicBool`][46293] +- [impl `From<{CString, &CStr}>` for `{Arc, Rc}`][45990] +- [impl `From<{OsString, &OsStr}>` for `{Arc, Rc}`][45990] +- [impl `From<{PathBuf, &Path}>` for `{Arc, Rc}`][45990] +- [float::from_bits now just uses transmute.][46012] This provides + some optimisations from LLVM. +- [Copied `AsciiExt` methods onto `char`][46077] +- [Remove `T: Sized` requirement on `ptr::is_null()`][46094] +- [impl `From` for `{TryRecvError, RecvTimeoutError}`][45506] +- [Optimised `f32::{min, max}` to generate more efficient x86 assembly][47080] +- [`[u8]::contains` now uses memchr which provides a 3x speed improvement][46713] + +Stabilized APIs +--------------- +- [`RefCell::replace`] +- [`RefCell::swap`] +- [`atomic::spin_loop_hint`] + +The following functions can now be used in a constant expression. +eg. `let buffer: [u8; size_of::()];`, `static COUNTER: AtomicUsize = AtomicUsize::new(1);` + +- [`AtomicBool::new`][46287] +- [`AtomicUsize::new`][46287] +- [`AtomicIsize::new`][46287] +- [`AtomicPtr::new`][46287] +- [`Cell::new`][46287] +- [`{integer}::min_value`][46287] +- [`{integer}::max_value`][46287] +- [`mem::size_of`][46287] +- [`mem::align_of`][46287] +- [`ptr::null`][46287] +- [`ptr::null_mut`][46287] +- [`RefCell::new`][46287] +- [`UnsafeCell::new`][46287] + +Cargo +----- +- [Added a `workspace.default-members` config that + overrides implied `--all` in virtual workspaces.][cargo/4743] +- [Enable incremental by default on development builds.][cargo/4817] Also added + configuration keys to `Cargo.toml` and `.cargo/config` to disable on a + per-project or global basis respectively. + +Misc +---- + +Compatibility Notes +------------------- +- [Floating point types `Debug` impl now always prints a decimal point.][46831] +- [`Ipv6Addr` now rejects superfluous `::`'s in IPv6 addresses][46671] This is + in accordance with IETF RFC 4291 §2.2. +- [Unwinding will no longer go past FFI boundaries, and will instead abort.][46833] +- [`Formatter::flags` method is now deprecated.][46284] The `sign_plus`, + `sign_minus`, `alternate`, and `sign_aware_zero_pad` should be used instead. +- [Leading zeros in tuple struct members is now an error][47084] +- [`column!()` macro is one-based instead of zero-based][46977] +- [`fmt::Arguments` can no longer be shared across threads][45198] +- [Access to `#[repr(packed)]` struct fields is now unsafe][44884] +- [Cargo sets a different working directory for the compiler][cargo/4788] + +[44884]: https://github.com/rust-lang/rust/pull/44884 +[45198]: https://github.com/rust-lang/rust/pull/45198 +[45506]: https://github.com/rust-lang/rust/pull/45506 +[45904]: https://github.com/rust-lang/rust/pull/45904 +[45990]: https://github.com/rust-lang/rust/pull/45990 +[46012]: https://github.com/rust-lang/rust/pull/46012 +[46077]: https://github.com/rust-lang/rust/pull/46077 +[46094]: https://github.com/rust-lang/rust/pull/46094 +[46284]: https://github.com/rust-lang/rust/pull/46284 +[46287]: https://github.com/rust-lang/rust/pull/46287 +[46293]: https://github.com/rust-lang/rust/pull/46293 +[46528]: https://github.com/rust-lang/rust/pull/46528 +[46671]: https://github.com/rust-lang/rust/pull/46671 +[46713]: https://github.com/rust-lang/rust/pull/46713 +[46735]: https://github.com/rust-lang/rust/pull/46735 +[46749]: https://github.com/rust-lang/rust/pull/46749 +[46760]: https://github.com/rust-lang/rust/pull/46760 +[46798]: https://github.com/rust-lang/rust/pull/46798 +[46828]: https://github.com/rust-lang/rust/pull/46828 +[46831]: https://github.com/rust-lang/rust/pull/46831 +[46833]: https://github.com/rust-lang/rust/pull/46833 +[46910]: https://github.com/rust-lang/rust/pull/46910 +[46977]: https://github.com/rust-lang/rust/pull/46977 +[47018]: https://github.com/rust-lang/rust/pull/47018 +[47080]: https://github.com/rust-lang/rust/pull/47080 +[47084]: https://github.com/rust-lang/rust/pull/47084 +[cargo/4743]: https://github.com/rust-lang/cargo/pull/4743 +[cargo/4788]: https://github.com/rust-lang/cargo/pull/4788 +[cargo/4817]: https://github.com/rust-lang/cargo/pull/4817 +[`RefCell::replace`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.replace +[`RefCell::swap`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.swap +[`atomic::spin_loop_hint`]: https://doc.rust-lang.org/std/sync/atomic/fn.spin_loop_hint.html + + +Version 1.23.0 (2018-01-04) +========================== + +Language +-------- +- [Arbitrary `auto` traits are now permitted in trait objects.][45772] +- [rustc now uses subtyping on the left hand side of binary operations.][45435] + Which should fix some confusing errors in some operations. + +Compiler +-------- +- [Enabled `TrapUnreachable` in LLVM which should mitigate the impact of + undefined behaviour.][45920] +- [rustc now suggests renaming import if names clash.][45660] +- [Display errors/warnings correctly when there are zero-width or + wide characters.][45711] +- [rustc now avoids unnecessary copies of arguments that are + simple bindings][45380] This should improve memory usage on average by 5-10%. +- [Updated musl used to build musl rustc to 1.1.17][45393] + +Libraries +--------- +- [Allow a trailing comma in `assert_eq/ne` macro][45887] +- [Implement Hash for raw pointers to unsized types][45483] +- [impl `From<*mut T>` for `AtomicPtr`][45610] +- [impl `From` for `AtomicUsize/AtomicIsize`.][45610] +- [Removed the `T: Sync` requirement for `RwLock: Send`][45267] +- [Removed `T: Sized` requirement for `{<*const T>, <*mut T>}::as_ref` + and `<*mut T>::as_mut`][44932] +- [Optimized `Thread::{park, unpark}` implementation][45524] +- [Improved `SliceExt::binary_search` performance.][45333] +- [impl `FromIterator<()>` for `()`][45379] +- [Copied `AsciiExt` trait methods to primitive types.][44042] Use of `AsciiExt` + is now deprecated. + +Stabilized APIs +--------------- + +Cargo +----- +- [Cargo now supports uninstallation of multiple packages][cargo/4561] + eg. `cargo uninstall foo bar` uninstalls `foo` and `bar`. +- [Added unit test checking to `cargo check`][cargo/4592] +- [Cargo now lets you install a specific version + using `cargo install --version`][cargo/4637] + +Misc +---- +- [Releases now ship with the Cargo book documentation.][45692] +- [rustdoc now prints rendering warnings on every run.][45324] + +Compatibility Notes +------------------- +- [Changes have been made to type equality to make it more correct, + in rare cases this could break some code.][45853] [Tracking issue for + further information][45852] +- [`char::escape_debug` now uses Unicode 10 over 9.][45571] +- [Upgraded Android SDK to 27, and NDK to r15c.][45580] This drops support for + Android 9, the minimum supported version is Android 14. +- [Bumped the minimum LLVM to 3.9][45326] + +[44042]: https://github.com/rust-lang/rust/pull/44042 +[44932]: https://github.com/rust-lang/rust/pull/44932 +[45267]: https://github.com/rust-lang/rust/pull/45267 +[45324]: https://github.com/rust-lang/rust/pull/45324 +[45326]: https://github.com/rust-lang/rust/pull/45326 +[45333]: https://github.com/rust-lang/rust/pull/45333 +[45379]: https://github.com/rust-lang/rust/pull/45379 +[45380]: https://github.com/rust-lang/rust/pull/45380 +[45393]: https://github.com/rust-lang/rust/pull/45393 +[45435]: https://github.com/rust-lang/rust/pull/45435 +[45483]: https://github.com/rust-lang/rust/pull/45483 +[45524]: https://github.com/rust-lang/rust/pull/45524 +[45571]: https://github.com/rust-lang/rust/pull/45571 +[45580]: https://github.com/rust-lang/rust/pull/45580 +[45610]: https://github.com/rust-lang/rust/pull/45610 +[45660]: https://github.com/rust-lang/rust/pull/45660 +[45692]: https://github.com/rust-lang/rust/pull/45692 +[45711]: https://github.com/rust-lang/rust/pull/45711 +[45772]: https://github.com/rust-lang/rust/pull/45772 +[45852]: https://github.com/rust-lang/rust/issues/45852 +[45853]: https://github.com/rust-lang/rust/pull/45853 +[45887]: https://github.com/rust-lang/rust/pull/45887 +[45920]: https://github.com/rust-lang/rust/pull/45920 +[cargo/4561]: https://github.com/rust-lang/cargo/pull/4561 +[cargo/4592]: https://github.com/rust-lang/cargo/pull/4592 +[cargo/4637]: https://github.com/rust-lang/cargo/pull/4637 + + +Version 1.22.1 (2017-11-22) +========================== + +- [Update Cargo to fix an issue with macOS 10.13 "High Sierra"][46183] + +[46183]: https://github.com/rust-lang/rust/pull/46183 + +Version 1.22.0 (2017-11-22) +========================== + +Language +-------- +- [`non_snake_case` lint now allows extern no-mangle functions][44966] +- [Now accepts underscores in unicode escapes][43716] +- [`T op= &T` now works for numeric types.][44287] eg. `let mut x = 2; x += &8;` +- [types that impl `Drop` are now allowed in `const` and `static` types][44456] + +Compiler +-------- +- [rustc now defaults to having 16 codegen units at debug on supported platforms.][45064] +- [rustc will no longer inline in codegen units when compiling for debug][45075] + This should decrease compile times for debug builds. +- [strict memory alignment now enabled on ARMv6][45094] +- [Remove support for the PNaCl target `le32-unknown-nacl`][45041] + +Libraries +--------- +- [Allow atomic operations up to 32 bits + on `armv5te_unknown_linux_gnueabi`][44978] +- [`Box` now impls `From>`][44466] +- [`std::mem::Discriminant` is now guaranteed to be `Send + Sync`][45095] +- [`fs::copy` now returns the length of the main stream on NTFS.][44895] +- [Properly detect overflow in `Instant += Duration`.][44220] +- [impl `Hasher` for `{&mut Hasher, Box}`][44015] +- [impl `fmt::Debug` for `SplitWhitespace`.][44303] +- [`Option` now impls `Try`][42526] This allows for using `?` with `Option` types. + +Stabilized APIs +--------------- + +Cargo +----- +- [Cargo will now build multi file examples in subdirectories of the `examples` + folder that have a `main.rs` file.][cargo/4496] +- [Changed `[root]` to `[package]` in `Cargo.lock`][cargo/4571] Packages with + the old format will continue to work and can be updated with `cargo update`. +- [Now supports vendoring git repositories][cargo/3992] + +Misc +---- +- [`libbacktrace` is now available on Apple platforms.][44251] +- [Stabilised the `compile_fail` attribute for code fences in doc-comments.][43949] + This now lets you specify that a given code example will fail to compile. + +Compatibility Notes +------------------- +- [The minimum Android version that rustc can build for has been bumped + to `4.0` from `2.3`][45656] +- [Allowing `T op= &T` for numeric types has broken some type + inference cases][45480] + + +[42526]: https://github.com/rust-lang/rust/pull/42526 +[43017]: https://github.com/rust-lang/rust/pull/43017 +[43716]: https://github.com/rust-lang/rust/pull/43716 +[43949]: https://github.com/rust-lang/rust/pull/43949 +[44015]: https://github.com/rust-lang/rust/pull/44015 +[44220]: https://github.com/rust-lang/rust/pull/44220 +[44251]: https://github.com/rust-lang/rust/pull/44251 +[44287]: https://github.com/rust-lang/rust/pull/44287 +[44303]: https://github.com/rust-lang/rust/pull/44303 +[44456]: https://github.com/rust-lang/rust/pull/44456 +[44466]: https://github.com/rust-lang/rust/pull/44466 +[44895]: https://github.com/rust-lang/rust/pull/44895 +[44966]: https://github.com/rust-lang/rust/pull/44966 +[44978]: https://github.com/rust-lang/rust/pull/44978 +[45041]: https://github.com/rust-lang/rust/pull/45041 +[45064]: https://github.com/rust-lang/rust/pull/45064 +[45075]: https://github.com/rust-lang/rust/pull/45075 +[45094]: https://github.com/rust-lang/rust/pull/45094 +[45095]: https://github.com/rust-lang/rust/pull/45095 +[45480]: https://github.com/rust-lang/rust/issues/45480 +[45656]: https://github.com/rust-lang/rust/pull/45656 +[cargo/3992]: https://github.com/rust-lang/cargo/pull/3992 +[cargo/4496]: https://github.com/rust-lang/cargo/pull/4496 +[cargo/4571]: https://github.com/rust-lang/cargo/pull/4571 + + + + + + +Version 1.21.0 (2017-10-12) +========================== + +Language +-------- +- [You can now use static references for literals.][43838] + Example: + ```rust + fn main() { + let x: &'static u32 = &0; + } + ``` +- [Relaxed path syntax. Optional `::` before `<` is now allowed in all contexts.][43540] + Example: + ```rust + my_macro!(Vec::new); // Always worked + my_macro!(Vec::::new); // Now works + ``` + +Compiler +-------- +- [Upgraded jemalloc to 4.5.0][43911] +- [Enabled unwinding panics on Redox][43917] +- [Now runs LLVM in parallel during translation phase.][43506] + This should reduce peak memory usage. + +Libraries +--------- +- [Generate builtin impls for `Clone` for all arrays and tuples that + are `T: Clone`][43690] +- [`Stdin`, `Stdout`, and `Stderr` now implement `AsRawFd`.][43459] +- [`Rc` and `Arc` now implement `From<&[T]> where T: Clone`, `From`, + `From`, `From> where T: ?Sized`, and `From>`.][42565] + +Stabilized APIs +--------------- + +[`std::mem::discriminant`] + +Cargo +----- +- [You can now call `cargo install` with multiple package names][cargo/4216] +- [Cargo commands inside a virtual workspace will now implicitly + pass `--all`][cargo/4335] +- [Added a `[patch]` section to `Cargo.toml` to handle + prepublication dependencies][cargo/4123] [RFC 1969] +- [`include` & `exclude` fields in `Cargo.toml` now accept gitignore + like patterns][cargo/4270] +- [Added the `--all-targets` option][cargo/4400] +- [Using required dependencies as a feature is now deprecated and emits + a warning][cargo/4364] + + +Misc +---- +- [Cargo docs are moving][43916] + to [doc.rust-lang.org/cargo](https://doc.rust-lang.org/cargo) +- [The rustdoc book is now available][43863] + at [doc.rust-lang.org/rustdoc](https://doc.rust-lang.org/rustdoc) +- [Added a preview of RLS has been made available through rustup][44204] + Install with `rustup component add rls-preview` +- [`std::os` documentation for Unix, Linux, and Windows now appears on doc.rust-lang.org][43348] + Previously only showed `std::os::unix`. + +Compatibility Notes +------------------- +- [Changes in method matching against higher-ranked types][43880] This may cause + breakage in subtyping corner cases. [A more in-depth explanation is available.][info/43880] +- [rustc's JSON error output's byte position start at top of file.][42973] + Was previously relative to the rustc's internal `CodeMap` struct which + required the unstable library `libsyntax` to correctly use. +- [`unused_results` lint no longer ignores booleans][43728] + +[42565]: https://github.com/rust-lang/rust/pull/42565 +[42973]: https://github.com/rust-lang/rust/pull/42973 +[43348]: https://github.com/rust-lang/rust/pull/43348 +[43459]: https://github.com/rust-lang/rust/pull/43459 +[43506]: https://github.com/rust-lang/rust/pull/43506 +[43540]: https://github.com/rust-lang/rust/pull/43540 +[43690]: https://github.com/rust-lang/rust/pull/43690 +[43728]: https://github.com/rust-lang/rust/pull/43728 +[43838]: https://github.com/rust-lang/rust/pull/43838 +[43863]: https://github.com/rust-lang/rust/pull/43863 +[43880]: https://github.com/rust-lang/rust/pull/43880 +[43911]: https://github.com/rust-lang/rust/pull/43911 +[43916]: https://github.com/rust-lang/rust/pull/43916 +[43917]: https://github.com/rust-lang/rust/pull/43917 +[44204]: https://github.com/rust-lang/rust/pull/44204 +[cargo/4123]: https://github.com/rust-lang/cargo/pull/4123 +[cargo/4216]: https://github.com/rust-lang/cargo/pull/4216 +[cargo/4270]: https://github.com/rust-lang/cargo/pull/4270 +[cargo/4335]: https://github.com/rust-lang/cargo/pull/4335 +[cargo/4364]: https://github.com/rust-lang/cargo/pull/4364 +[cargo/4400]: https://github.com/rust-lang/cargo/pull/4400 +[RFC 1969]: https://github.com/rust-lang/rfcs/pull/1969 +[info/43880]: https://github.com/rust-lang/rust/issues/44224#issuecomment-330058902 +[`std::mem::discriminant`]: https://doc.rust-lang.org/std/mem/fn.discriminant.html + Version 1.20.0 (2017-08-31) =========================== @@ -110,7 +505,7 @@ Compatibility Notes - [Functions with `'static` in their return types will now not be as usable as if they were using lifetime parameters instead.][42417] - [The reimplementation of `{f32, f64}::is_sign_{negative, positive}` now - takes the sign of NaN into account where previously didn't.][42430] + takes the sign of NaN into account where previously didn't.][42430] [42033]: https://github.com/rust-lang/rust/pull/42033 [42155]: https://github.com/rust-lang/rust/pull/42155 @@ -298,7 +693,7 @@ Compatibility Notes a warning. - [From the pound escape, lines consisting of multiple `#`s are now visible][41785] -- [It is an error to reexport private enum variants][42460]. This is +- [It is an error to re-export private enum variants][42460]. This is known to break a number of crates that depend on an older version of mustache. - [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try @@ -438,7 +833,7 @@ Misc ---- - [rustdoc can now use pulldown-cmark with the `--enable-commonmark` flag][40338] -- [Added rust-winbg script for better debugging on Windows][39983] +- [Added rust-windbg script for better debugging on Windows][39983] - [Rust now uses the official cross compiler for NetBSD][40612] - [rustdoc now accepts `#` at the start of files][40828] - [Fixed jemalloc support for musl][41168] @@ -1472,7 +1867,7 @@ Diagnostics ----------- * [Replace macro backtraces with labeled local uses][35702] -* [Improve error message for missplaced doc comments][33922] +* [Improve error message for misplaced doc comments][33922] * [Buffer unix and lock windows to prevent message interleaving][35975] * [Update lifetime errors to specifically note temporaries][36171] * [Special case a few colors for Windows][36178] @@ -1780,7 +2175,7 @@ Language useful](https://github.com/rust-lang/rust/pull/34908) * [`macro_rules!` `stmt` matchers correctly consume the entire contents when inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886) -* [Semicolons are properly required as statement delimeters inside +* [Semicolons are properly required as statement delimiters inside `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660) * [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546) @@ -1972,10 +2367,10 @@ Rustdoc ------- * [Fix empty implementation section on some module pages](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 re-exports in import lists](https://github.com/rust-lang/rust/pull/34479) * [Fix search result layout for enum variants and struct fields](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) +* [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245) Tooling ------- @@ -2005,7 +2400,7 @@ Compatibility Notes * [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443) * [The new follow-set rules that place restrictions on `macro_rules!` in order to ensure syntax forward-compatibility have been enabled](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 [amendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384), and has been a warning since 1.10. * [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706). This causes breakage in some corner cases. @@ -3162,7 +3557,7 @@ Libraries * `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s]. * There are now `From` conversions [between floating point types][1.5f] where the conversions are lossless. -* Thera are now `From` conversions [between integer types][1.5i] where +* There are now `From` conversions [between integer types][1.5i] where the conversions are lossless. * [`fs::Metadata` implements `Clone`][1.5fs]. * The `parse` method [accepts a leading "+" when parsing @@ -3362,7 +3757,7 @@ Libraries * [`IntoIterator` is implemented for references to `Option` and `Result`][into2]. * [`HashMap` and `HashSet` implement `Extend<&T>` where `T: - Copy`][ext] as part of [RFC 839]. This will cause type inferance + Copy`][ext] as part of [RFC 839]. This will cause type inference breakage in rare situations. * [`BinaryHeap` implements `Debug`][bh2]. * [`Borrow` and `BorrowMut` are implemented for fixed-size @@ -3373,7 +3768,7 @@ Libraries * `&mut T` where `T: std::fmt::Write` [also implements `std::fmt::Write`][mutw]. * [A stable regression in `VecDeque::push_back` and other - capicity-altering methods that caused panics for zero-sized types + capacity-altering methods that caused panics for zero-sized types was fixed][vd]. * [Function pointers implement traits for up to 12 parameters][fp2]. @@ -3560,7 +3955,7 @@ Libraries [better for long data][sh]. * [`AtomicPtr`] implements [`Send`]. * The [`read_to_end`] implementations for [`Stdin`] and [`File`] - are now [specialized to use uninitalized buffers for increased + are now [specialized to use uninitialized buffers for increased performance][rte]. * Lifetime parameters of foreign functions [are now resolved properly][f]. @@ -3689,7 +4084,7 @@ Highlights * This is the first release with [experimental support for linking with the MSVC linker and lib C on Windows (instead of using the GNU variants via MinGW)][win]. It is yet recommended only for the most - intrepid Rusticians. + intrepid Rustaceans. * Benchmark compilations are showing a 30% improvement in bootstrapping over 1.1. @@ -4555,7 +4950,7 @@ Version 0.11.0 (2014-07-02) * Libraries * The standard library is now a "facade" over a number of underlying libraries. This means that development on the standard library should - be speeder due to smaller crates, as well as a clearer line between + be speedier due to smaller crates, as well as a clearer line between all dependencies. * A new library, libcore, lives under the standard library's facade which is Rust's "0-assumption" library, suitable for embedded and @@ -4709,7 +5104,7 @@ Version 0.10 (2014-04-03) * std: The `vec` module has been renamed to `slice`. * std: A new vector type, `Vec`, has been added in preparation for DST. This will become the only growable vector in the future. - * std: `std::io` now has more public-reexports. Types such as `BufferedReader` + * std: `std::io` now has more public re-exports. Types such as `BufferedReader` are now found at `std::io::BufferedReader` instead of `std::io::buffered::BufferedReader`. * std: `print` and `println` are no longer in the prelude, the `print!` and @@ -4800,8 +5195,8 @@ Version 0.10 (2014-04-03) * render standalone markdown files. * the --test flag tests all code blocks by default. * exported macros are displayed. - * reexported types have their documentation inlined at the location of the - first reexport. + * re-exported types have their documentation inlined at the location of the + first re-export. * search works across crates that have been rendered to the same output directory. @@ -5188,7 +5583,7 @@ Version 0.7 (2013-07-03) incl. `any`, `all`. removed. * std: The `finalize` method of `Drop` renamed to `drop`. * std: The `drop` method now takes `&mut self` instead of `&self`. - * std: The prelude no longer reexports any modules, only types and traits. + * std: The prelude no longer re-exports any modules, only types and traits. * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`, `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits. * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`, diff --git a/appveyor.yml b/appveyor.yml index 599d1b40ceb1e..0ea15dd671c8b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,8 @@ environment: AWS_SECRET_ACCESS_KEY: secure: 7Y+JiquYedOAgnUU26uL0DPzrxmTtR+qIwG6rNKSuWDffqU3vVZxbGXim9QpTO80 SCCACHE_DIGEST: f808afabb4a4eb1d7112bcb3fa6be03b61e93412890c88e177c667eb37f46353d7ec294e559b16f9f4b5e894f2185fe7670a0df15fd064889ecbd80f0c34166c + TOOLSTATE_REPO_ACCESS_TOKEN: + secure: PTZiSxJMVUZ0VnMR5i13E4OagbXfglj7pcskDQiKufVrDm13mLoI0vDJAEM35+bY # By default schannel checks revocation of certificates unlike some other SSL # backends, but we've historically had problems on CI where a revocation @@ -25,6 +27,11 @@ environment: RUST_CHECK_TARGET: check-aux RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc + # MSVC tools tests + - MSYS_BITS: 64 + SCRIPT: src/ci/docker/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstates.json windows + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstates.json --enable-test-miri + # 32/64-bit MinGW builds. # # We are using MinGW with posix threads since LLVM does not compile with @@ -40,7 +47,13 @@ environment: # SourceForge is notoriously flaky, so we mirror it on our own infrastructure. - MSYS_BITS: 32 RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu - SCRIPT: python x.py test + SCRIPT: python x.py test --exclude src/test/run-pass --exclude src/test/compile-fail + MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror + MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z + MINGW_DIR: mingw32 + - MSYS_BITS: 32 + RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu + SCRIPT: python x.py test src/test/run-pass src/test/compile-fail MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z MINGW_DIR: mingw32 @@ -56,6 +69,7 @@ environment: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler + --enable-emscripten SCRIPT: python x.py dist DEPLOY: 1 - RUST_CONFIGURE_ARGS: > @@ -63,10 +77,11 @@ environment: --target=i586-pc-windows-msvc --enable-extended --enable-profiler + --enable-emscripten SCRIPT: python x.py dist DEPLOY: 1 - MSYS_BITS: 32 - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended + RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended --enable-emscripten SCRIPT: python x.py dist MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z @@ -74,7 +89,7 @@ environment: DEPLOY: 1 - MSYS_BITS: 64 SCRIPT: python x.py dist - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended --enable-emscripten MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z MINGW_DIR: mingw64 @@ -89,7 +104,7 @@ environment: matrix: fast_finish: true -clone_depth: 1 +clone_depth: 2 build: false install: diff --git a/config.toml.example b/config.toml.example index a3790c8d20258..8d1fa3eec5cf2 100644 --- a/config.toml.example +++ b/config.toml.example @@ -35,7 +35,7 @@ # If an external LLVM root is specified, we automatically check the version by # default to make sure it's within the range that we're expecting, but setting # this flag will indicate that this version check should not be done. -#version-check = false +#version-check = true # Link libstdc++ statically into the librustc_llvm instead of relying on a # dynamic version to be available. @@ -60,10 +60,9 @@ # LLVM experimental targets to build support for. These targets are specified in # the same format as above, but since these targets are experimental, they are # not built by default and the experimental Rust compilation targets that depend -# on them will not work unless the user opts in to building them. Possible -# experimental LLVM targets include WebAssembly for the -# wasm32-experimental-emscripten Rust target. -#experimental-targets = "" +# on them will not work unless the user opts in to building them. By default the +# `WebAssembly` target is enabled when compiling LLVM from scratch. +#experimental-targets = "WebAssembly" # Cap the number of parallel linker invocations when compiling LLVM. # This can be useful when building LLVM with debug info, which significantly @@ -152,6 +151,10 @@ # default. #extended = false +# Installs chosen set of extended tools if enables. By default builds all. +# If chosen tool failed to build the installation fails. +#tools = ["cargo", "rls", "rustfmt", "analysis", "src"] + # Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose #verbose = 0 @@ -203,6 +206,16 @@ # Where to install man pages in `prefix` above #mandir = "share/man" +# Where to install data in `prefix` above (currently unused) +#datadir = "share" + +# Where to install additional info in `prefix` above (currently unused) +#infodir = "share/info" + +# Where to install local state (currently unused) +# If this is a relative path, it will get installed in `prefix` above +#localstatedir = "/var/lib" + # ============================================================================= # Options for compiling Rust code itself # ============================================================================= @@ -226,6 +239,11 @@ # compiler. #codegen-units = 1 +# Whether to enable ThinLTO (and increase the codegen units to either a default +# or the configured value). On by default. If we want the fastest possible +# compiler, we should disable this. +#thinlto = true + # Whether or not debug assertions are enabled for the compiler and standard # library. Also enables compilation of debug! and trace! logging macros. #debug-assertions = false @@ -250,14 +268,11 @@ # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE) #backtrace = true -# The default linker that will be used by the generated compiler. Note that this -# is not the linker used to link said compiler. +# The default linker that will be hard-coded into the generated compiler for +# targets that don't specify linker explicitly in their target specifications. +# Note that this is not the linker used to link said compiler. #default-linker = "cc" -# The default ar utility that will be used by the generated compiler if LLVM -# cannot be used. Note that this is not used to assemble said compiler. -#default-ar = "ar" - # The "channel" for the Rust build to produce. The stable/beta channels only # allow using stable features, whereas the nightly and dev channels allow using # nightly features @@ -284,7 +299,7 @@ # Flag indicating whether git info will be retrieved from .git automatically. # Having the git information can cause a lot of rebuilds during development. -# Note: If this attribute is not explicity set (e.g. if left commented out) it +# Note: If this attribute is not explicitly set (e.g. if left commented out) it # will default to true if channel = "dev", but will default to false otherwise. #ignore-git = true @@ -295,6 +310,22 @@ # As a side-effect also generates MIR for all libraries. #test-miri = false +# After building or testing extended tools (e.g. clippy and rustfmt), append the +# result (broken, compiling, testing) into this JSON file. +#save-toolstates = "/path/to/toolstates.json" + +# This is an array of the codegen backends that will be compiled for the rustc +# that's being compiled. The default is to only build the LLVM codegen backend, +# but you can also optionally enable the "emscripten" backend for asm.js or +# make this an empty array (but that probably won't get too far in the +# bootstrap) +#codegen-backends = ["llvm"] + +# Flag indicating whether `libstd` calls an imported function to handle basic IO +# when targeting WebAssembly. Enable this to debug tests for the `wasm32-unknown-unknown` +# target, as without this option the test output will not be captured. +#wasm-syscall = false + # ============================================================================= # Options for specific targets # @@ -303,7 +334,7 @@ # ============================================================================= [target.x86_64-unknown-linux-gnu] -# C compiler to be used to compiler C code and link Rust code. Note that the +# C compiler to be used to compiler C code. Note that the # default value is platform specific, and if not specified it may also depend on # what platform is crossing to what platform. #cc = "cc" @@ -312,8 +343,17 @@ # This is only used for host targets. #cxx = "c++" +# Archiver to be used to assemble static libraries compiled from C/C++ code. +# Note: an absolute path should be used, otherwise LLVM build will break. +#ar = "ar" + +# Linker to be used to link Rust code. Note that the +# default value is platform specific, and if not specified it may also depend on +# what platform is crossing to what platform. +#linker = "cc" + # Path to the `llvm-config` binary of the installation of a custom LLVM to link -# against. Note that if this is specifed we don't compile LLVM at all for this +# against. Note that if this is specified we don't compile LLVM at all for this # target. #llvm-config = "../path/to/llvm/root/bin/llvm-config" diff --git a/debian/changelog b/debian/changelog index f7473e54a86fd..7caf6d5a8df17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rustc (1.26.0-dev-20180302-1) unstable; urgency=low + + * New upstream release. + + -- Onur Aslan Sun, 04 Mar 2018 23:09:20 +0300 + rustc (1.22.0-dev-20170921-1) unstable; urgency=low * New upstream release. diff --git a/debian/docs b/debian/docs index 87c4290293383..245779642a947 100644 --- a/debian/docs +++ b/debian/docs @@ -1 +1 @@ -rustc-1.22.0-dev-x86_64-unknown-linux-gnu/rustc/share/doc/rust/* +rustc-1.26.0-dev-x86_64-unknown-linux-gnu/rustc/share/doc/rust/* diff --git a/debian/install b/debian/install index 111f29018151f..73fe7d1a6137c 100644 --- a/debian/install +++ b/debian/install @@ -1,11 +1,11 @@ # rustc -rustc-1.22.0-dev-x86_64-unknown-linux-gnu/rustc/bin/* usr/bin -rustc-1.22.0-dev-x86_64-unknown-linux-gnu/rustc/lib/* usr/lib +rustc-1.26.0-dev-x86_64-unknown-linux-gnu/rustc/bin/* usr/bin +rustc-1.26.0-dev-x86_64-unknown-linux-gnu/rustc/lib/* usr/lib # rust-std -rust-std-1.22.0-dev-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/* usr/lib/rustlib -rust-std-1.22.0-dev-x86_64-pc-windows-msvc/rust-std-x86_64-pc-windows-msvc/lib/rustlib/* usr/lib/rustlib -rust-std-1.22.0-dev-x86_64-apple-darwin/rust-std-x86_64-apple-darwin/lib/rustlib/* usr/lib/rustlib -rust-std-1.22.0-dev-i686-unknown-linux-gnu/rust-std-i686-unknown-linux-gnu/lib/rustlib/* usr/lib/rustlib -rust-std-1.22.0-dev-i686-pc-windows-msvc/rust-std-i686-pc-windows-msvc/lib/rustlib/* usr/lib/rustlib -rust-std-1.22.0-dev-i686-apple-darwin/rust-std-i686-apple-darwin/lib/rustlib/* usr/lib/rustlib +rust-std-1.26.0-dev-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/* usr/lib/rustlib +rust-std-1.26.0-dev-x86_64-pc-windows-msvc/rust-std-x86_64-pc-windows-msvc/lib/rustlib/* usr/lib/rustlib +rust-std-1.26.0-dev-x86_64-apple-darwin/rust-std-x86_64-apple-darwin/lib/rustlib/* usr/lib/rustlib +rust-std-1.26.0-dev-i686-unknown-linux-gnu/rust-std-i686-unknown-linux-gnu/lib/rustlib/* usr/lib/rustlib +rust-std-1.26.0-dev-i686-pc-windows-msvc/rust-std-i686-pc-windows-msvc/lib/rustlib/* usr/lib/rustlib +rust-std-1.26.0-dev-i686-apple-darwin/rust-std-i686-apple-darwin/lib/rustlib/* usr/lib/rustlib diff --git a/debian/manpages b/debian/manpages index 0cc6b2e97a84f..2703a9194f3bd 100644 --- a/debian/manpages +++ b/debian/manpages @@ -1 +1 @@ -rustc-1.22.0-dev-x86_64-unknown-linux-gnu/rustc/share/man/man1/* +rustc-1.26.0-dev-x86_64-unknown-linux-gnu/rustc/share/man/man1/* diff --git a/debian/rules b/debian/rules index dd00cd957f9b1..d4a9ea3a5133c 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f BUILD_DIR=build/dist -RUST_VER=1.22.0-dev +RUST_VER=1.26.0-dev %: dh $@ diff --git a/src/Cargo.lock b/src/Cargo.lock index 3a9d9ad9c5456..7b4bfecea3fa2 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -1,11 +1,3 @@ -[root] -name = "unwind" -version = "0.0.0" -dependencies = [ - "core 0.0.0", - "libc 0.0.0", -] - [[package]] name = "advapi32-sys" version = "0.2.0" @@ -25,10 +17,10 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -36,6 +28,7 @@ name = "alloc" version = "0.0.0" dependencies = [ "core 0.0.0", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "std_unicode 0.0.0", ] @@ -46,8 +39,8 @@ dependencies = [ "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.0.0", ] @@ -57,74 +50,72 @@ version = "0.0.0" dependencies = [ "alloc 0.0.0", "core 0.0.0", + "dlmalloc 0.0.0", "libc 0.0.0", ] [[package]] name = "ansi_term" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ar" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "arena" version = "0.0.0" +[[package]] +name = "arrayvec" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.12" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bin_lib" version = "0.1.0" -[[package]] -name = "bin_lib_no_cfg_test" -version = "0.1.0" - [[package]] name = "bitflags" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "bitflags" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "bitflags" version = "0.9.1" @@ -132,7 +123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -140,16 +131,17 @@ name = "bootstrap" version = "0.0.0" dependencies = [ "build_helper 0.1.0", - "cmake 0.1.25 (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.54 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -166,8 +158,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" name = "build-manifest" version = "0.1.0" dependencies = [ - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -175,298 +167,448 @@ dependencies = [ name = "build_helper" version = "0.1.0" dependencies = [ - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "byteorder" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cargo" -version = "0.23.0" +version = "0.26.0" dependencies = [ - "advapi32-sys 0.2.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.6 (registry+https://github.com/rust-lang/crates.io-index)", "bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "cargotest 0.1.0", - "core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "crates-io 0.12.0", - "crossbeam 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "git2 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "crates-io 0.15.0", + "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crypto-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", "git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "home 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "libgit2-sys 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", - "psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", "serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cargo_metadata" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "cargo_metadata" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cargotest" version = "0.1.0" dependencies = [ - "cargo 0.23.0", - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "git2 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo 0.26.0", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", "hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cargotest2" version = "0.1.0" +[[package]] +name = "cc" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "cfg-if" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "chrono" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "clap" -version = "2.26.0" +version = "2.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "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)", - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (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.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "clippy" +version = "0.0.186" +dependencies = [ + "cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy-mini-macro-test 0.2.0", + "clippy_lints 0.0.186", + "compiletest_rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "duct 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clippy-mini-macro-test" +version = "0.2.0" + +[[package]] +name = "clippy_lints" +version = "0.0.186" +dependencies = [ + "if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "clippy_lints" +version = "0.0.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "cmake" -version = "0.1.25" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "collections" -version = "0.0.0" +name = "commoncrypto" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "alloc 0.0.0", - "core 0.0.0", + "commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "commoncrypto-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "compiler_builtins" version = "0.0.0" dependencies = [ + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "compiletest" version = "0.0.0" dependencies = [ - "diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "filetime 0.1.10 (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.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "completion" -version = "0.1.0" - -[[package]] -name = "conv" -version = "0.3.3" +name = "compiletest_rs" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "completion" +version = "0.1.0" + [[package]] name = "core" version = "0.0.0" -dependencies = [ - "rand 0.0.0", -] [[package]] name = "core-foundation" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core-foundation-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "core-foundation-sys" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crates-io" -version = "0.12.0" +version = "0.15.0" dependencies = [ - "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crossbeam" -version = "0.2.10" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "crossbeam" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "crossbeam-deque" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "crossbeam-epoch" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "cssparser" -version = "0.13.7" +name = "crossbeam-utils" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "procedural-masquerade 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "cssparser-macros" +name = "crypto-hash" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "procedural-masquerade 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "commoncrypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "curl" -version = "0.4.8" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "socket2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "curl-sys" -version = "0.3.14" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "custom_derive" -version = "0.1.7" +name = "deglob" +version = "0.1.0" + +[[package]] +name = "derive-new" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "dbghelp-sys" -version = "0.2.0" +name = "diff" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "dlmalloc" +version = "0.0.0" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "alloc 0.0.0", + "core 0.0.0", ] [[package]] -name = "debug_unreachable" -version = "0.1.1" +name = "docopt" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "derive-new" -version = "0.3.0" +name = "dtoa" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "duct" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "os_pipe 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "shared_child 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "diff" -version = "0.1.10" +name = "either" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "docopt" -version = "0.8.1" +name = "ena" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "dtoa" -version = "0.4.2" +name = "endian-type" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -474,7 +616,7 @@ name = "enum_primitive" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -482,7 +624,7 @@ name = "env_logger" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -491,16 +633,28 @@ name = "env_logger" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "env_logger" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "termcolor 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "error-chain" -version = "0.10.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -508,7 +662,7 @@ name = "error-chain" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -519,17 +673,38 @@ dependencies = [ ] [[package]] -name = "filetime" -version = "0.1.10" +name = "failure" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "find_all_refs" +name = "failure_derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", + "synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "features" version = "0.1.0" +[[package]] +name = "filetime" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "find_all_refs_no_cfg_test" version = "0.1.0" @@ -540,11 +715,11 @@ version = "0.1.0" [[package]] name = "flate2" -version = "0.2.19" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -553,59 +728,66 @@ version = "0.0.0" [[package]] name = "fnv" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "foreign-types" -version = "0.2.0" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fs2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "futf" -version = "0.1.3" +name = "fuchsia-zircon" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "futures" -version = "0.1.15" +name = "fuchsia-zircon-sys" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "gcc" -version = "0.3.54" +name = "futures" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "getopts" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "git2" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "libgit2-sys 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -613,10 +795,10 @@ name = "git2-curl" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "git2 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", + "git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -626,20 +808,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "globset" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "goto_def" -version = "0.1.0" - [[package]] name = "graphviz" version = "0.0.0" @@ -649,22 +827,22 @@ name = "hamcrest" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "handlebars" -version = "0.27.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (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.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -673,8 +851,9 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "highlight" -version = "0.1.0" +name = "hex" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "home" @@ -688,30 +867,6 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hover" -version = "0.1.0" - -[[package]] -name = "html-diff" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kuchiki 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "html5ever" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "markup5ever 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "idna" version = "0.1.4" @@ -722,19 +877,25 @@ dependencies = [ "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "if_chain" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ignore" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "globset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "globset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "walkdir 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -753,41 +914,68 @@ version = "0.1.0" name = "installer" version = "0.0.0" dependencies = [ - "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "xz2 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "is-match" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "itertools" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "itertools" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "itoa" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "jobserver" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "json" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "jsonrpc-core" -version = "7.1.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -799,33 +987,32 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "kuchiki" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cssparser 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", - "html5ever 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "selectors 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "languageserver-types" -version = "0.12.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "lazy_static" -version = "0.2.8" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazy_static" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "lazycell" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -837,21 +1024,21 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.30" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libgit2-sys" -version = "0.6.14" +version = "0.6.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -860,20 +1047,20 @@ name = "libssh2-sys" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libz-sys" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -884,52 +1071,37 @@ version = "0.1.0" [[package]] name = "log" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lzma-sys" -version = "0.1.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "magenta" -version = "0.1.1" +name = "log" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "magenta-sys" +name = "log_settings" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "markup5ever" -version = "0.3.2" +name = "lzma-sys" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tendril 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -939,23 +1111,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "mdbook" -version = "0.0.25" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "handlebars 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (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.14 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "handlebars 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml-query 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -963,24 +1140,29 @@ name = "memchr" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memchr" -version = "1.0.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "memoffset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "miniz-sys" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -994,6 +1176,17 @@ dependencies = [ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "miri" +version = "0.1.0" +dependencies = [ + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "compiletest_rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "multiple_bins" version = "0.1.0" @@ -1005,41 +1198,62 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "nibble_vec" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "nix" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "nodrop" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "num" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "num-complex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-rational 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-bigint" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-complex" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1048,7 +1262,7 @@ name = "num-integer" version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1057,70 +1271,76 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-rational" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "num_cpus" -version = "1.6.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "omit_init_build" -version = "0.1.0" - [[package]] name = "open" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.9.17" +version = "0.9.23" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-probe" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl-sys" -version = "0.9.17" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "os_pipe" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "owning_ref" version = "0.3.3" @@ -1148,107 +1368,85 @@ dependencies = [ ] [[package]] -name = "percent-encoding" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pest" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "phf" -version = "0.7.21" +name = "parking_lot" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "phf_codegen" -version = "0.7.21" +name = "parking_lot_core" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "phf_generator" -version = "0.7.21" +name = "percent-encoding" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "phf_shared" -version = "0.7.21" +name = "pest" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "pkg-config" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "precomputed-hash" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "proc_macro" version = "0.0.0" dependencies = [ + "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] -[[package]] -name = "procedural-masquerade" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "profiler_builtins" version = "0.0.0" dependencies = [ + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "psapi-sys" -version = "0.1.0" +name = "pulldown-cmark" +version = "0.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "pulldown-cmark" -version = "0.0.14" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "quick-error" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "quote" -version = "0.2.3" +name = "quine-mc_cluskey" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1258,32 +1456,77 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "racer" -version = "2.0.10" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_syntax 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typed-arena 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "rand" -version = "0.0.0" +name = "radix_trie" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "core 0.0.0", + "endian-type 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "nibble_vec 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rand" -version = "0.3.16" +version = "0.3.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rayon-core" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "redox_syscall" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "redox_termios" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1308,13 +1551,13 @@ dependencies = [ [[package]] name = "regex" -version = "0.2.2" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "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)", - "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1325,7 +1568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex-syntax" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1333,62 +1576,71 @@ name = "remote-test-client" version = "0.1.0" [[package]] -name = "remote-test-server" -version = "0.1.0" - -[[package]] -name = "rename" +name = "remote-test-server" version = "0.1.0" [[package]] name = "rls" -version = "0.122.0" -dependencies = [ - "cargo 0.23.0", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonrpc-core 7.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "racer 2.0.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-analysis 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-rustc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +version = "0.126.0" +dependencies = [ + "cargo 0.26.0", + "cargo_metadata 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clippy_lints 0.0.186 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "json 0.11.12 (registry+https://github.com/rust-lang/crates.io-index)", + "jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "languageserver-types 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "racer 2.0.12 (registry+https://github.com/rust-lang/crates.io-index)", + "rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-analysis 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-blacklist 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-rustc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-vfs 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rustfmt-nightly 0.2.5", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-vfs 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustfmt-nightly 0.3.8", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rls-analysis" -version = "0.6.7" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "derive-new 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive-new 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "radix_trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rls-blacklist" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "rls-data" -version = "0.10.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rls-rustc" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1397,16 +1649,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rls-vfs" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "racer 2.0.10 (registry+https://github.com/rust-lang/crates.io-index)", + "racer 2.0.12 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1414,8 +1666,8 @@ dependencies = [ name = "rustbook" version = "0.1.0" dependencies = [ - "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", - "mdbook 0.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mdbook 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1423,13 +1675,17 @@ name = "rustc" version = "0.0.0" dependencies = [ "arena 0.0.0", - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "fmt_macros 0.0.0", "graphviz 0.0.0", - "jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc_macro 0.0.0", + "rustc_apfloat 0.0.0", "rustc_back 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", @@ -1439,6 +1695,72 @@ dependencies = [ "syntax_pos 0.0.0", ] +[[package]] +name = "rustc-ap-rustc_cratesio_shim" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-ap-rustc_data_structures" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-ap-rustc_errors" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc-ap-rustc_data_structures 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax_pos 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-ap-serialize" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rustc-ap-syntax" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_cratesio_shim 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_data_structures 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_errors 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax_pos 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustc-ap-syntax_pos" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc-ap-rustc_data_structures 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-serialize 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" version = "0.1.5" @@ -1471,7 +1793,7 @@ dependencies = [ name = "rustc_apfloat" version = "0.0.0" dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_cratesio_shim 0.0.0", ] @@ -1482,7 +1804,7 @@ dependencies = [ "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", - "cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -1490,18 +1812,29 @@ dependencies = [ name = "rustc_back" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", "syntax 0.0.0", ] +[[package]] +name = "rustc_binaryen" +version = "0.0.0" +dependencies = [ + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc_borrowck" version = "0.0.0" dependencies = [ "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", + "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "rustc_mir 0.0.0", "syntax 0.0.0", @@ -1513,9 +1846,8 @@ name = "rustc_const_eval" version = "0.0.0" dependencies = [ "arena 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", - "rustc_back 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -1536,27 +1868,31 @@ dependencies = [ name = "rustc_cratesio_shim" version = "0.0.0" dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc_data_structures" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ena 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "serialize 0.0.0", + "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc_driver" version = "0.0.0" dependencies = [ - "ar 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "arena 0.0.0", "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_allocator 0.0.0", "rustc_back 0.0.0", @@ -1573,7 +1909,6 @@ dependencies = [ "rustc_privacy 0.0.0", "rustc_resolve 0.0.0", "rustc_save_analysis 0.0.0", - "rustc_trans 0.0.0", "rustc_trans_utils 0.0.0", "rustc_typeck 0.0.0", "serialize 0.0.0", @@ -1586,8 +1921,10 @@ dependencies = [ name = "rustc_errors" version = "0.0.0" dependencies = [ + "rustc_data_structures 0.0.0", "serialize 0.0.0", "syntax_pos 0.0.0", + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1595,7 +1932,8 @@ name = "rustc_incremental" version = "0.0.0" dependencies = [ "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_data_structures 0.0.0", "serialize 0.0.0", @@ -1607,9 +1945,8 @@ dependencies = [ name = "rustc_lint" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", - "rustc_back 0.0.0", "rustc_const_eval 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", @@ -1619,9 +1956,10 @@ dependencies = [ name = "rustc_llvm" version = "0.0.0" dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "build_helper 0.1.0", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_cratesio_shim 0.0.0", ] @@ -1632,7 +1970,7 @@ dependencies = [ "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", - "cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -1640,9 +1978,8 @@ dependencies = [ name = "rustc_metadata" version = "0.0.0" dependencies = [ - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "proc_macro 0.0.0", "rustc 0.0.0", "rustc_back 0.0.0", @@ -1658,14 +1995,19 @@ dependencies = [ name = "rustc_mir" version = "0.0.0" dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "graphviz 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", + "rustc_apfloat 0.0.0", + "rustc_back 0.0.0", "rustc_const_eval 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", + "serialize 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -1677,7 +2019,7 @@ dependencies = [ "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", - "cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -1685,10 +2027,11 @@ dependencies = [ name = "rustc_passes" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc_const_eval 0.0.0", "rustc_const_math 0.0.0", + "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", @@ -1703,7 +2046,6 @@ name = "rustc_plugin" version = "0.0.0" dependencies = [ "rustc 0.0.0", - "rustc_back 0.0.0", "rustc_errors 0.0.0", "rustc_metadata 0.0.0", "syntax 0.0.0", @@ -1715,6 +2057,8 @@ name = "rustc_privacy" version = "0.0.0" dependencies = [ "rustc 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_typeck 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -1724,8 +2068,9 @@ name = "rustc_resolve" version = "0.0.0" dependencies = [ "arena 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", + "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", @@ -1735,8 +2080,8 @@ dependencies = [ name = "rustc_save_analysis" version = "0.0.0" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rls-data 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rls-data 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1750,34 +2095,45 @@ dependencies = [ name = "rustc_trans" version = "0.0.0" dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_allocator 0.0.0", + "rustc_apfloat 0.0.0", "rustc_back 0.0.0", + "rustc_binaryen 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "rustc_incremental 0.0.0", "rustc_llvm 0.0.0", + "rustc_mir 0.0.0", "rustc_platform_intrinsics 0.0.0", "rustc_trans_utils 0.0.0", "serialize 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", + "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc_trans_utils" version = "0.0.0" dependencies = [ + "ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", + "rustc_back 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_incremental 0.0.0", + "rustc_mir 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -1789,7 +2145,7 @@ dependencies = [ "alloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", - "cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "core 0.0.0", ] @@ -1799,9 +2155,8 @@ version = "0.0.0" dependencies = [ "arena 0.0.0", "fmt_macros 0.0.0", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc 0.0.0", - "rustc_back 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -1814,14 +2169,14 @@ dependencies = [ name = "rustdoc" version = "0.0.0" dependencies = [ - "build_helper 0.1.0", - "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "html-diff 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)", + "pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustdoc-themes" +version = "0.1.0" + [[package]] name = "rustdoc-tool" version = "0.0.0" @@ -1831,19 +2186,23 @@ dependencies = [ [[package]] name = "rustfmt-nightly" -version = "0.2.5" +version = "0.3.8" dependencies = [ - "diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "cargo_metadata 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive-new 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.4.3 (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.15 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "strings 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-rustc_errors 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-ap-syntax 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1859,6 +2218,23 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "same-file" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "schannel" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "scoped-tls" version = "0.1.0" @@ -1870,18 +2246,16 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "selectors" -version = "0.18.0" +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "semver" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cssparser 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1890,7 +2264,16 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1900,22 +2283,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.11" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.11" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_derive_internals" -version = "0.15.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1927,49 +2310,57 @@ name = "serde_ignored" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde_json" -version = "1.0.2" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serialize" version = "0.0.0" +[[package]] +name = "shared_child" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "shell-escape" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "siphasher" -version = "0.2.2" +name = "shlex" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "smallvec" -version = "0.3.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "socket2" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1985,15 +2376,13 @@ dependencies = [ "alloc_jemalloc 0.0.0", "alloc_system 0.0.0", "build_helper 0.1.0", - "collections 0.0.0", "compiler_builtins 0.0.0", "core 0.0.0", - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.0.0", "panic_abort 0.0.0", "panic_unwind 0.0.0", "profiler_builtins 0.0.0", - "rand 0.0.0", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_asan 0.0.0", "rustc_lsan 0.0.0", "rustc_msan 0.0.0", @@ -2009,58 +2398,11 @@ dependencies = [ "core 0.0.0", ] -[[package]] -name = "string_cache" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache_codegen" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "string_cache_shared" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "strsim" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "syn" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "syn" version = "0.11.11" @@ -2079,12 +2421,21 @@ dependencies = [ "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "synstructure" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "syntax" version = "0.0.0" dependencies = [ - "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_cratesio_shim 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", @@ -2098,6 +2449,7 @@ version = "0.0.0" dependencies = [ "fmt_macros 0.0.0", "proc_macro 0.0.0", + "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", @@ -2109,6 +2461,7 @@ version = "0.0.0" dependencies = [ "rustc_data_structures 0.0.0", "serialize 0.0.0", + "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2116,8 +2469,8 @@ name = "syntex_errors" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2138,8 +2491,8 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", "syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2149,11 +2502,12 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2162,17 +2516,7 @@ name = "tempdir" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tendril" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2189,37 +2533,36 @@ dependencies = [ ] [[package]] -name = "term_size" -version = "0.3.0" +name = "termcolor" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "wincolor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "termcolor" -version = "0.3.3" +name = "termion" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "wincolor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "test" version = "0.0.0" dependencies = [ - "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", + "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.0.0", ] [[package]] name = "textwrap" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2229,7 +2572,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2242,10 +2585,10 @@ dependencies = [ [[package]] name = "thread_local" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2253,6 +2596,16 @@ dependencies = [ name = "tidy" version = "0.1.0" +[[package]] +name = "time" +version = "0.1.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "toml" version = "0.2.1" @@ -2266,13 +2619,20 @@ name = "toml" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "typed-arena" -version = "1.3.0" +name = "toml-query" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "unicode-bidi" @@ -2307,14 +2667,6 @@ name = "unicode-xid" version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unreachable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "unreachable" version = "1.0.0" @@ -2330,14 +2682,22 @@ dependencies = [ "tidy 0.1.0", ] +[[package]] +name = "unwind" +version = "0.0.0" +dependencies = [ + "core 0.0.0", + "libc 0.0.0", +] + [[package]] name = "url" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2345,8 +2705,8 @@ name = "url_serde" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2358,14 +2718,6 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "utf-8" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "utf8-ranges" version = "0.1.3" @@ -2401,16 +2753,43 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "walkdir" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "wincolor" version = "0.1.4" @@ -2420,6 +2799,10 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "workspace_symbol" +version = "0.1.0" + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -2434,15 +2817,15 @@ name = "xattr" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "xz2" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lzma-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "lzma-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2453,188 +2836,223 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] "checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a" "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"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 ar 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b24e4eef8e3fa7e2ca75b157e6039cdf8d9d3a68213ddc19d0fd9d576b9717c9" -"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" -"checksum backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "72f9b4182546f4b04ebc4ab7f84948953a118bd6021a1b6a6c909e3e94f6be76" -"checksum backtrace-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "afccc5772ba333abccdf60d55200fa3406f8c59dcf54d5f7998c9107d3799c7c" +"checksum aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d6531d44de723825aa81398a6415283229725a00fa30713812ab9323faa82fc4" +"checksum ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b3568b48b7cefa6b8ce125f9bb4989e52fbcc29ebea88df04cc7c5f12f70455" +"checksum ar 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "35c7a5669cb64f085739387e1308b74e6d44022464b7f1b63bbd4ceb6379ec31" +"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef" +"checksum atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8352656fd42c30a0c3c89d26dea01e3b77c0ab2af18230835c15e2e13cd51859" +"checksum backtrace 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbbf59b1c43eefa8c3ede390fcc36820b4999f7914104015be25025e0d62af2" +"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" -"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989" +"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" "checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32" +"checksum byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "652805b7e73fada9d85e9a6682a4abd490cb52d96aeecc12e33a0de34dfd0d23" +"checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b" +"checksum cargo_metadata 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "20d6fb2b5574726329c85cdba0df0347fddfec3cf9c8b588f9931708280f5643" +"checksum cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "deaf9ec656256bb25b404c51ef50097207b9cbb29c933d31f92cae5a8a0ffee0" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0" -"checksum cmake 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "0c8a6541a55bcd72d3de4faee2d101a5a66df29790282c7f797082a7228a9b3d" -"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" -"checksum core-foundation 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5909502e547762013619f4c4e01cc7393c20fe2d52d7fa471c1210adb2320dc7" -"checksum core-foundation-sys 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bc9fb3d6cb663e6fd7cf1c63f9b144ee2b1e4a78595a0451dd34bff85b9a3387" -"checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97" -"checksum crossbeam 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8837ab96533202c5b610ed44bc7f4183e7957c1c8f56e8cc78bb098593c8ba0a" -"checksum cssparser 0.13.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef6124306e5ebc5ab11891d063aeafdd0cdc308079b708c8b566125f3680292b" -"checksum cssparser-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "079adec4af52bb5275eadd004292028c79eb3c5f5b4ee8086a36d4197032f6df" -"checksum curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7034c534a1d7d22f7971d6088aa9d281d219ef724026c3428092500f41ae9c2c" -"checksum curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d5481162dc4f424d088581db2f979fa7d4c238fe9794595de61d8d7522e277de" -"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" -"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" -"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3" -"checksum derive-new 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41be6ca3b99e0c0483fb2389685448f650459c3ecbe4e18d7705d8010ec4ab8e" -"checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472" -"checksum docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b5b93718f8b3e5544fcc914c43de828ca6c6ace23e0332c6080a2977b49787a" +"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" +"checksum clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "110d43e343eb29f4f51c1db31beb879d546db27998577e5715270a54bcf41d3f" +"checksum clippy_lints 0.0.186 (registry+https://github.com/rust-lang/crates.io-index)" = "a3864104a4e6092e644b985dd7543e5f24e99aa7262f5ee400bcb17cfeec1bf5" +"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb" +"checksum commoncrypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d056a8586ba25a1e4d61cb090900e495952c7886786fc55f909ab2f819b69007" +"checksum commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2" +"checksum compiletest_rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6c5aafb5d4a77c6b5fa384fe93c7a9a3561bd88c4b8b8e45187cf5e779b1badc" +"checksum core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8047f547cd6856d45b1cdd75ef8d2f21f3d0e4bf1dab0a0041b0ae9a5dda9c0e" +"checksum core-foundation-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "152195421a2e6497a8179195672e9d4ee8e45ed8c465b626f1606d27a08ebcd5" +"checksum crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be" +"checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19" +"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" +"checksum crossbeam-epoch 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59796cc6cbbdc6bb319161349db0c3250ec73ec7fcb763a51065ec4e2e158552" +"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" +"checksum crypto-hash 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34903878eec1694faf53cae8473a088df333181de421d4d3d48061d6559fe602" +"checksum curl 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b70fd6394677d3c0e239ff4be6f2b3176e171ffd1c23ffdc541e78dea2b8bb5e" +"checksum curl-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f46e49c7125131f5afaded06944d6888b55cbdf8eba05dae73c954019b907961" +"checksum derive-new 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "415f627ab054041c3eb748c2e1da0ef751989f5f0c386b63a098e545854a98ba" +"checksum diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "3c2b69f912779fbb121ceb775d74d51e915af17aaebc38d28a592843a2dd0a3a" +"checksum docopt 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d8acd393692c503b168471874953a2531df0e9ab77d0b6bbc582395743300a4a" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" +"checksum duct 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e45aa15fe0a8a8f511e6d834626afd55e49b62e5c8802e18328a87e8a8f6065c" +"checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3" +"checksum ena 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1733e41a3c37b0893685933d09dcb0c30269aa5d14dc5cafebf4bcded1e58225" +"checksum endian-type 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" "checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" "checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f" "checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b" -"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" +"checksum env_logger 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f15f0b172cb4f52ed5dbf47f774a387cd2315d1bf7894ab5af9b083ae27efa5a" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" -"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922" -"checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c" -"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" -"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" -"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866" -"checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3" -"checksum futures 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a82bdc62350ca9d7974c760e9665102fc9d740992a528c2254aa930e53b783c4" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" -"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" -"checksum git2 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0c1c0203d653f4140241da0c1375a404f0a397249ec818cd2076c6280c50f6fa" +"checksum error-chain 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6930e04918388a9a2e41d518c25cf679ccafe26733fb4127dbf21993f2575d46" +"checksum failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "934799b6c1de475a012a02dab0ace1ace43789ee4b99bcfbf1a2e3e8ced5de82" +"checksum failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7cdda555bb90c9bb67a3b670a0f42de8e73f5981524123ad8578aafec8ddb8b" +"checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" +"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "118b49cac82e04121117cbd3121ede3147e885627d82c4546b87c702debb90c1" +"checksum getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "65922871abd2f101a2eb0eaebadc66668e54a87ad9c3dd82520b5f86ede5eff9" +"checksum git2 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ee5b4bb7cd2a44e6e5ee3a26ba6a9ca10d4ce2771cdc3839bbc54b47b7d1be84" "checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum globset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "feeb1b6840809ef5efcf7a4a990bc4e1b7ee3df8cf9e2379a75aeb2ba42ac9c3" +"checksum globset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "464627f948c3190ae3d04b1bc6d7dca2f785bda0ac01278e6db129ad383dbeb6" "checksum hamcrest 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bf088f042a467089e9baa4972f57f9247e42a0cc549ba264c7a04fbb8ecb89d4" -"checksum handlebars 0.27.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef7567daf271a32e60301e4821fcb5b51a5b535167115d1ce04f46c3f0a15f0b" +"checksum handlebars 0.29.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04af2006ea09d985fef82b81e0eb25337e51b691c76403332378a53d521edc" "checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" +"checksum hex 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "459d3cf58137bb02ad4adeef5036377ff59f066dbb82517b7192e3a5462a2abc" "checksum home 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f25ae61099d8f3fee8b483df0bd4ecccf4b2731897aad40d50eca1b641fe6db" -"checksum html-diff 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5298d63081a642508fce965740ddb03a386c5d81bf1fef0579a815cf49cb8c68" -"checksum html5ever 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a49d5001dd1bddf042ea41ed4e0a671d50b1bf187e66b349d7ec613bdce4ad90" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" -"checksum ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3fcaf2365eb14b28ec7603c98c06cc531f19de9eb283d89a3dff8417c8c99f5" -"checksum itoa 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ac17257442c2ed77dbc9fd555cf83c58b0c7f7d0e8f2ae08c0ac05c72842e1f6" -"checksum jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "443ae8bc0af6c106e6e8b77e04684faecc1a5ce94e058f4c2b0a037b0ea1b133" -"checksum jsonrpc-core 7.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "903e5eee845f3d83c1436d12848d97b1247cf850ff06a8e1db2f1ce3543af2cf" +"checksum if_chain 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "61bb90bdd39e3af69b0172dfc6130f6cd6332bf040fbb9bdd4401d37adbd48b8" +"checksum ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bb2f0238094bd1b41800fb6eb9b16fdd5e9832ed6053ed91409f0cd5bf28dcfd" +"checksum is-match 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5b386aef33a1c677be65237cb9d32c3f3ef56bd035949710c4bb13083eb053" +"checksum itertools 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3f2be4da1690a039e9ae5fd575f706a63ad5a2120f161b1d653c9da3930dd21" +"checksum itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b07332223953b5051bceb67e8c4700aa65291535568e1f12408c43c4a42c0394" +"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" +"checksum jobserver 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "565f6106bd87b394398f813bea4e5ecad6d6b0f6aa077592d088f882a506481d" +"checksum json 0.11.12 (registry+https://github.com/rust-lang/crates.io-index)" = "39ebf0fac977ee3a4a3242b6446004ff64514889e3e2730bbd4f764a67a2e483" +"checksum jsonrpc-core 8.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddf83704f4e79979a424d1082dd2c1e52683058056c9280efa19ac5f6bc9033c" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum kuchiki 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ef2ea4f2f7883cd7c6772b06c14abca01a2cc1f75c426cebffcf6b3b925ef9fc" -"checksum languageserver-types 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d52e477b23bf52cd3ca0f9fc6c5d14be954eec97e3b9cdfbd962d911bd533caf" -"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" -"checksum libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "2370ca07ec338939e356443dac2296f581453c35fe1e3a3ed06023c49435f915" -"checksum libgit2-sys 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c00f6e5bc3fb2b5f87e75e8d0fd4ae6720d55f3ee23d389b7c6cae30f8db8db1" +"checksum languageserver-types 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1541f9b22687f060511d213036e1f058797c48e3501e177f01cb6e88de802f5b" +"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" +"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" +"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" +"checksum libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1e5d97d6708edaa407429faa671b942dc0f2727222fb6b6539bf1db936e4b121" +"checksum libgit2-sys 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6eeae66e7b1c995de45cb4e65c5ab438a96a7b4077e448645d4048dc753ad357" "checksum libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0db4ec23611747ef772db1c4d650f8bd762f07b461727ec998f953c614024b75" -"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8" -"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" -"checksum lzma-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "66b2e318eb97ab84f05725471f90c52a09c964053a5899a13fd0165acc26d00b" -"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527" -"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699" -"checksum markup5ever 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ff834ac7123c6a37826747e5ca09db41fd7a83126792021c2e636ad174bb77d3" +"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2" +"checksum log_settings 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d382732ea0fbc09790c4899db3255bdea0fc78b54bf234bd18a63bb603915b6" +"checksum lzma-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c1b93b78f89e8737dac81837fc8f5521ac162abcba902e1a3db949d55346d1da" "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" -"checksum mdbook 0.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "146eadfc6d141452a364c351f07bb19208d1401e931f40b8532f87bba3ecc40f" +"checksum mdbook 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fef236caad7ba3b5b3944df946f19ab3e190bca53c111dd00fe05fa8d879f2fd" "checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" -"checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" +"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" +"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" +"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" -"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525" -"checksum num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "8fd0f8dbb4c0960998958a796281d88c16fbe68d87b1baa6f31e2979e81fd0bd" -"checksum num-complex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "503e668405c5492d67cf662a81e05be40efe2e6bcf10f7794a07bd9865e704e6" +"checksum nibble_vec 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "62e678237a4c70c5f2b917cefd7d080dfbf800421f06e8a59d4e28ef5130fd9e" +"checksum nix 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "47e49f6982987135c5e9620ab317623e723bd06738fd85377e8d55f57c8b6487" +"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" +"checksum num 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4083e14b542ea3eb9b5f33ff48bd373a92d78687e74f4cc0a30caeb754f0ca" +"checksum num-bigint 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "bdc1494b5912f088f260b775799468d9b9209ac60885d8186a547a0476289e23" +"checksum num-complex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "58de7b4bf7cf5dbecb635a5797d489864eadd03b107930cbccf9e0fd7428b47c" "checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba" "checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01" -"checksum num-rational 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "288629c76fac4b33556f4b7ab57ba21ae202da65ba8b77466e6d598e31990790" -"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" -"checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584" -"checksum open 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3478ed1686bd1300c8a981a940abc92b06fac9cbef747f4c668d4e032ff7b842" -"checksum openssl 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)" = "085aaedcc89a2fac1eb2bc19cd66f29d4ea99fec60f82a5f3a88a6be7dbd90b5" -"checksum openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98df0270d404ccd3c050a41d579c52d1db15375168bb3471e04ec0f5f378daf" -"checksum openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)" = "7e3a9845a4c9fdb321931868aae5549e96bb7b979bf9af7de03603d74691b5f3" +"checksum num-rational 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "0c7cb72a95250d8a370105c828f388932373e0e94414919891a0f945222310fe" +"checksum num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "cacfcab5eb48250ee7d0c7896b51a2c5eec99c1feea5f32025635f5ae4b00070" +"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30" +"checksum open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c281318d992e4432cfa799969467003d05921582a7489a8325e37f8a450d5113" +"checksum openssl 0.9.23 (registry+https://github.com/rust-lang/crates.io-index)" = "169a4b9160baf9b9b1ab975418c673686638995ba921683a7f1e01470dcb8854" +"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +"checksum openssl-sys 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "14ba54ac7d5a4eabd1d5f2c1fdeb7e7c14debfa669d94b983d01b465e767ba9e" +"checksum os_pipe 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "998bfbb3042e715190fe2a41abfa047d7e8cb81374d2977d7f100eacd8619cb1" "checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" -"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356" +"checksum parking_lot 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3e7f7c9857874e54afeb950eebeae662b1e51a2493666d2ea4c0a5d91dcf0412" +"checksum parking_lot_core 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6bf05dc61189828dfd7a59fd6e66d538e88d6b30390da1124a291e09fd3098b3" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" "checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" -"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc" -"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f" -"checksum phf_generator 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "6b07ffcc532ccc85e3afc45865469bf5d9e4ef5bfcf9622e3cfe80c2d275ec03" -"checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum precomputed-hash 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf1fc3616b3ef726a847f2cd2388c646ef6a1f1ba4835c2629004da48184150" -"checksum procedural-masquerade 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c93cdc1fb30af9ddf3debc4afbdb0f35126cbd99daa229dd76cdd5349b41d989" -"checksum psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "abcd5d1a07d360e29727f757a9decb3ce8bc6e0efa8969cfaad669a8317a2478" -"checksum pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9ab1e588ef8efd702c7ed9d2bd774db5e6f4d878bb5a1a9f371828fbdff6973" -"checksum quick-error 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c36987d4978eb1be2e422b1e0423a557923a5c3e7e6f31d5699e9aafaefa469" -"checksum quote 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4c5cf478fe1006dbcc72567121d23dbdae5f1632386068c5c86ff4f645628504" +"checksum pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "378e941dbd392c101f2cb88097fa4d7167bc421d4b88de3ff7dbee503bc3233b" +"checksum pulldown-cmark 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d6fdf85cda6cadfae5428a54661d431330b312bc767ddbc57adbedc24da66e32" +"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4" +"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum racer 2.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "f120c7510ef7aff254aeb06067fb6fac573ec96a1660e194787cf9dced412bf0" -"checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf" +"checksum racer 2.0.12 (registry+https://github.com/rust-lang/crates.io-index)" = "034f1c4528581c40a60e96875467c03315868084e08ff4ceb46a00f7be3b16b4" +"checksum radix_trie 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "211c49b6a9995cac0fd1dd9ca60b42cf3a51e151a12eb954b3a9e75513426ee8" +"checksum rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)" = "512870020642bb8c221bf68baa1b2573da814f6ccfe5c9699b1c303047abe9b1" +"checksum rayon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed02d09394c94ffbdfdc755ad62a132e94c3224a8354e78a1200ced34df12edf" +"checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d" +"checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8" +"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" +"checksum regex 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "744554e01ccbd98fff8c457c3b092cd67af62a555a43bfe97ae8a0451f7799fa" "checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" -"checksum rls-analysis 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "4302cc8291570d7f817945845d8c01756e833dbc93c0a87d4f6c9a0b0b7992f1" -"checksum rls-data 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11d339f1888e33e74d8032de0f83c40b2bdaaaf04a8cfc03b32186c3481fb534" -"checksum rls-rustc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b21ea952e9bf1569929abf1bb920262cde04b7b1b26d8e0260286302807299d2" +"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e" +"checksum rls-analysis 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39461c31c9ec26c2f15821d6aaa349216bf71e24e69550d9f8eeded78dc435e1" +"checksum rls-blacklist 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "56fb7b8e4850b988fbcf277fbdb1eff36879070d02fc1ca243b559273866973d" +"checksum rls-data 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bea04462e94b5512a78499837eecb7db182ff082144cd1b4bc32ef5d43de6510" +"checksum rls-rustc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "85cfb9dde19e313da3e47738008f8a472e470cc42d910b71595a9238494701f2" "checksum rls-span 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d7c7046dc6a92f2ae02ed302746db4382e75131b9ce20ce967259f6b5867a6a" -"checksum rls-vfs 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd34691a510938bb67fe0444fb363103c73ffb31c121d1e16bc92d8945ea8ff" +"checksum rls-vfs 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "be231e1e559c315bc60ced5ad2cc2d7a9c208ed7d4e2c126500149836fda19bb" +"checksum rustc-ap-rustc_cratesio_shim 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ad5e562044ea78a6764dd75ae8afe4b21fde49f4548024b5fdf6345c21fb524" +"checksum rustc-ap-rustc_data_structures 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c0d65325492aba7db72899e3edbab34d39af98c42ab7c7e450c9a288ffe4ad" +"checksum rustc-ap-rustc_errors 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "87d4ab2e06a671b5b5c5b0359dac346f164c99d059dce6a22feb08f2f56bd182" +"checksum rustc-ap-serialize 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e0745fa445ff41c4b6699936cf35ce3ca49502377dd7b3929c829594772c3a7b" +"checksum rustc-ap-syntax 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "82efedabe30f393161e11214a9130edfa01ad476372d1c6f3fec1f8d30488c9d" +"checksum rustc-ap-syntax_pos 29.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db9de2e927e280c75b8efab9c5f591ad31082d5d2c4c562c68fdba2ee77286b0" "checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" +"checksum same-file 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cfb6eded0b06a0b512c8ddbcf04089138c9b4362c2f696f3c3d76039d68f3637" +"checksum schannel 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "acece75e0f987c48863a6c792ec8b7d6c4177d4a027f8ccc72f849794f437016" "checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" "checksum scopeguard 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "59a076157c1e2dc561d8de585151ee6965d910dd4dcb5dabb7ae3e83981a6c57" -"checksum selectors 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3c89b1c6a3c029c82263f7dd2d44d0005ee7374eb09e254ab59dede4353a8c0" +"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" +"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" "checksum semver 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bee2bc909ab2d8d60dab26e8cad85b25d795b14603a0dcb627b78b9d30b6454b" +"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f7726f29ddf9731b17ff113c461e362c381d9d69433f79de4f3dd572488823e9" -"checksum serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cf823e706be268e73e7747b147aa31c8f633ab4ba31f115efb57e5047c3a76dd" -"checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a" +"checksum serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "db99f3919e20faa51bb2996057f5031d8685019b5a06139b1ce761da671b8526" +"checksum serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)" = "f4ba7591cfe93755e89eeecdbcc668885624829b020050e6aec99c2a03bd3fd0" +"checksum serde_derive_internals 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6e03f1c9530c3fb0a0a5c9b826bdd9246a5921ae995d75f512ac917fc4dd55b5" "checksum serde_ignored 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142" -"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b" +"checksum serde_json 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c9db7266c7d63a4c4b7fe8719656ccdd51acf1bed6124b174f933b009fb10bcb" +"checksum shared_child 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "099b38928dbe4a0a01fcd8c233183072f14a7d126a34bed05880869be66e14cc" "checksum shell-escape 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "dd5cc96481d54583947bfe88bf30c23d53f883c6cd0145368b69989d97b84ef8" -"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537" -"checksum smallvec 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4f8266519bc1d17d0b5b16f6c21295625d562841c708f6376f49028a43e9c11e" -"checksum socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4daf80fcf54186fac4fe049e0b39d36a5cfde69a11a06413e61e77f553cccf9a" +"checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +"checksum smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44db0ecb22921ef790d17ae13a3f6d15784183ff5f2a01aa32098c7498d2b4b9" +"checksum socket2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf5d5aa364bf61a0d744a293da20381617b6445b89eb524800fab857c5aed2d8" "checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" -"checksum string_cache 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "413fc7852aeeb5472f1986ef755f561ddf0c789d3d796e65f0b6fe293ecd4ef8" -"checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7" -"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" -"checksum strings 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "da75d8bf2c4d210d63dd09581a041b036001f9f6e03d9b151dbff810fb7ba26a" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum syn 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6ae6fb0dcc9bd85f89a1a4adc0df2fd90c90c98849d61433983dd7a9df6363f7" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" +"checksum synstructure 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3a761d12e6d8dcb4dcf952a7a89b475e3a9d69e4a69307e01a470977642914bd" "checksum syntex_errors 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9e52bffe6202cfb67587784cf23e0ec5bf26d331eef4922a16d5c42e12aa1e9b" "checksum syntex_pos 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)" = "955ef4b16af4c468e4680d1497f873ff288f557d338180649e18f915af5e15ac" "checksum syntex_syntax 0.52.0 (registry+https://github.com/rust-lang/crates.io-index)" = "76a302e717e348aa372ff577791c3832395650073b8d8432f8b3cb170b34afde" -"checksum tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "281285b717926caa919ad905ef89c63d75805c7d89437fb873100925a53f2b1b" +"checksum tar 0.4.14 (registry+https://github.com/rust-lang/crates.io-index)" = "1605d3388ceb50252952ffebab4b5dc43017ead7e4481b175961c283bb951195" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" -"checksum tendril 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1b72f8e2f5b73b65c315b1a70c730f24b9d7a25f39e98de8acbe2bb795caea" "checksum term 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fa63644f74ce96fbeb9b794f66aff2a52d601cbd5e80f4b97123e3899f4570f1" -"checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209" "checksum termcolor 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9065bced9c3e43453aa3d56f1e98590b8455b341d2fa191a1090c0dd0b242c75" -"checksum textwrap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f728584ea33b0ad19318e20557cb0a39097751dbb07171419673502f848c7af6" +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" "checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" "checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14" +"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" +"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098" "checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" "checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" -"checksum typed-arena 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5934776c3ac1bea4a9d56620d6bf2d483b20d394e49581db40f187e1118ff667" +"checksum toml-query 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6854664bfc6df0360c695480836ee90e2d0c965f06db291d10be9344792d43e8" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "36dff09cafb4ec7c8cf0023eb0b686cb6ce65499116a12201c9e11840ca01beb" "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27" +"checksum url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2" "checksum url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e7d099f1ee52f823d4bdd60c93c3602043c728f5db3b97bdb548467f7bddea" "checksum userenv-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d28ea36bbd9192d75bd9fa9b39f96ddb986eaee824adae5d53b6e51919b2f3" -"checksum utf-8 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f923c601c7ac48ef1d66f7d5b5b2d9a7ba9c51333ab75a3ddf8d0309185a56" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" +"checksum walkdir 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b6d201f4f8998a837196b6de9c73e35af14c992cbb92c4ab641d2c2dce52de" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a39ee4464208f6430992ff20154216ab2357772ac871d994c51628d60e58b8b0" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum xattr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "5f04de8a1346489a2f9e9bd8526b73d135ec554227b17568456e86aa35b6f3fc" -"checksum xz2 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e9510bdf100731599107c61f77daf46713a69a568f75458999c1f9dbf6ba25b0" +"checksum xz2 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "98df591c3504d014dd791d998123ed00a476c7e26dc6b2e873cb55c6ac9e59fa" "checksum yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e66366e18dc58b46801afbf2ca7661a9f59cc8c5962c29892b6039b4f86fa992" diff --git a/src/Cargo.toml b/src/Cargo.toml index 12c074b6a4162..c03301852cd3b 100644 --- a/src/Cargo.toml +++ b/src/Cargo.toml @@ -4,7 +4,9 @@ members = [ "rustc", "libstd", "libtest", + "librustc_trans", "tools/cargotest", + "tools/clippy", "tools/compiletest", "tools/error_index_generator", "tools/linkchecker", @@ -19,25 +21,23 @@ members = [ "tools/rustdoc", "tools/rls", "tools/rustfmt", + "tools/miri", + "tools/rustdoc-themes", # FIXME(https://github.com/rust-lang/cargo/issues/4089): move these to exclude + "tools/rls/test_data/bin_lib", "tools/rls/test_data/borrow_error", - "tools/rls/test_data/completion", - "tools/rls/test_data/find_all_refs", + "tools/rls/test_data/common", + "tools/rls/test_data/deglob", + "tools/rls/test_data/features", "tools/rls/test_data/find_all_refs_no_cfg_test", - "tools/rls/test_data/goto_def", - "tools/rls/test_data/highlight", - "tools/rls/test_data/hover", - "tools/rls/test_data/rename", - "tools/rls/test_data/reformat", - "tools/rls/test_data/bin_lib_no_cfg_test", - "tools/rls/test_data/multiple_bins", - "tools/rls/test_data/bin_lib", - "tools/rls/test_data/reformat_with_range", "tools/rls/test_data/find_impls", "tools/rls/test_data/infer_bin", "tools/rls/test_data/infer_custom_bin", "tools/rls/test_data/infer_lib", - "tools/rls/test_data/omit_init_build", + "tools/rls/test_data/multiple_bins", + "tools/rls/test_data/reformat", + "tools/rls/test_data/reformat_with_range", + "tools/rls/test_data/workspace_symbol", ] # Curiously, compiletest will segfault if compiled with opt-level=3 on 64-bit @@ -57,13 +57,18 @@ debug-assertions = false debug = false debug-assertions = false +# We want the RLS to use the version of Cargo that we've got vendored in this +# repository to ensure that the same exact version of Cargo is used by both the +# RLS and the Cargo binary itself. The RLS depends on Cargo as a git repository +# so we use a `[patch]` here to override the github repository with our local +# vendored copy. [patch."https://github.com/rust-lang/cargo"] cargo = { path = "tools/cargo" } -# Override rustfmt dependencies both on the repo and the crate (the RLS -# sometimes uses either). -# FIXME should only need the crates.io patch, long term. -[patch."https://github.com/rust-lang-nursery/rustfmt"] -rustfmt-nightly = { path = "tools/rustfmt" } [patch.crates-io] +# Similar to Cargo above we want the RLS to use a vendored version of `rustfmt` +# that we're shipping as well (to ensure that the rustfmt in RLS and the +# `rustfmt` executable are the same exact vesion). Unlike Cargo, however, the +# RLS depends on `rustfmt` from crates.io, so we put this in a `[patch]` section +# for crates.io rustfmt-nightly = { path = "tools/rustfmt" } diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000000000..690ab674c64eb --- /dev/null +++ b/src/README.md @@ -0,0 +1,15 @@ +This directory contains the source code of the rust project, including: +- `rustc` and its tests +- `libstd` +- Various submodules for tools, like rustdoc, rls, etc. + +For more information on how various parts of the compiler work, see the [rustc guide]. + +Their is also useful content in the following READMEs, which are gradually being moved over to the guide: +- https://github.com/rust-lang/rust/tree/master/src/librustc/ty/maps +- https://github.com/rust-lang/rust/tree/master/src/librustc/dep_graph +- https://github.com/rust-lang/rust/blob/master/src/librustc/infer/region_constraints +- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/higher_ranked +- https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve + +[rustc guide]: https://rust-lang-nursery.github.io/rustc-guide/about-this-guide.html diff --git a/src/binaryen b/src/binaryen new file mode 160000 index 0000000000000..17841e155edf8 --- /dev/null +++ b/src/binaryen @@ -0,0 +1 @@ +Subproject commit 17841e155edf858c8ea7802dd5f5ecbef54b989f diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml index 85e3b65c1953c..2d47834131784 100644 --- a/src/bootstrap/Cargo.toml +++ b/src/bootstrap/Cargo.toml @@ -34,10 +34,11 @@ cmake = "0.1.23" filetime = "0.1" num_cpus = "1.0" getopts = "0.2" -gcc = "0.3.54" +cc = "1.0.1" libc = "0.2" serde = "1.0.8" serde_derive = "1.0.8" serde_json = "1.0.2" toml = "0.4" lazy_static = "0.2" +time = "0.1" diff --git a/src/bootstrap/README.md b/src/bootstrap/README.md index e543b8c070bcc..9ff681ac68087 100644 --- a/src/bootstrap/README.md +++ b/src/bootstrap/README.md @@ -39,7 +39,7 @@ The script accepts commands, flags, and arguments to determine what to do: ``` If files are dirty that would normally be rebuilt from stage 0, that can be - overidden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps + overridden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps that belong to stage n or earlier: ``` @@ -126,17 +126,17 @@ install a nightly, presumably using `rustup`. You will then want to configure your directory to use this build, like so: ``` -# configure to use local rust instead of downloding a beta. +# configure to use local rust instead of downloading a beta. # `--local-rust-root` is optional here. If elided, we will # use whatever rustc we find on your PATH. -> configure --enable-rustbuild --local-rust-root=~/.cargo/ --enable-local-rebuild +> ./configure --local-rust-root=~/.cargo/ --enable-local-rebuild ``` After that, you can use the `--incremental` flag to actually do incremental builds: ``` -> ../x.py build --incremental +> ./x.py build --incremental ``` The `--incremental` flag will store incremental compilation artifacts diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 848b10d312cea..ca35a896e08c8 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -31,8 +31,6 @@ extern crate bootstrap; use std::env; use std::ffi::OsString; -use std::io; -use std::io::prelude::*; use std::str::FromStr; use std::path::PathBuf; use std::process::{Command, ExitStatus}; @@ -63,6 +61,11 @@ fn main() { args.remove(n); } + if let Some(s) = env::var_os("RUSTC_ERROR_FORMAT") { + args.push("--error-format".into()); + args.push(s); + } + // Detect whether or not we're a build script depending on whether --target // is passed (a bit janky...) let target = args.windows(2) @@ -122,19 +125,9 @@ fn main() { cmd.arg("-L").arg(&root); } - // Pass down extra flags, commonly used to configure `-Clinker` when - // cross compiling. - if let Ok(s) = env::var("RUSTC_FLAGS") { - cmd.args(&s.split(" ").filter(|s| !s.is_empty()).collect::>()); - } - - // Pass down incremental directory, if any. - if let Ok(dir) = env::var("RUSTC_INCREMENTAL") { - cmd.arg(format!("-Zincremental={}", dir)); - - if verbose > 0 { - cmd.arg("-Zincremental-info"); - } + // Override linker if necessary. + if let Ok(target_linker) = env::var("RUSTC_TARGET_LINKER") { + cmd.arg(format!("-Clinker={}", target_linker)); } let crate_name = args.windows(2) @@ -182,12 +175,16 @@ fn main() { if let Ok(s) = env::var("RUSTC_CODEGEN_UNITS") { cmd.arg("-C").arg(format!("codegen-units={}", s)); } + if env::var("RUSTC_THINLTO").is_ok() { + cmd.arg("-Ccodegen-units=16").arg("-Zthinlto"); + } // Emit save-analysis info. if env::var("RUSTC_SAVE_ANALYSIS") == Ok("api".to_string()) { cmd.arg("-Zsave-analysis"); cmd.env("RUST_SAVE_ANALYSIS_CONFIG", - "{\"output_file\": null,\"full_docs\": false,\"pub_only\": true,\ + "{\"output_file\": null,\"full_docs\": false,\ + \"pub_only\": true,\"reachable_only\": false,\ \"distro_crate\": true,\"signatures\": false,\"borrow_data\": false}"); } @@ -249,6 +246,9 @@ fn main() { // When running miri tests, we need to generate MIR for all libraries if env::var("TEST_MIRI").ok().map_or(false, |val| val == "true") { cmd.arg("-Zalways-encode-mir"); + if stage != "0" { + cmd.arg("-Zmiri"); + } cmd.arg("-Zmir-emit-validate=1"); } @@ -258,6 +258,15 @@ fn main() { if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() { cmd.arg("-Z").arg("force-unstable-if-unmarked"); } + } else { + // Override linker if necessary. + if let Ok(host_linker) = env::var("RUSTC_HOST_LINKER") { + cmd.arg(format!("-Clinker={}", host_linker)); + } + } + + if env::var_os("RUSTC_PARALLEL_QUERIES").is_some() { + cmd.arg("--cfg").arg("parallel_queries"); } let color = match env::var("RUSTC_COLOR") { @@ -270,7 +279,7 @@ fn main() { } if verbose > 1 { - writeln!(&mut io::stderr(), "rustc command: {:?}", cmd).unwrap(); + eprintln!("rustc command: {:?}", cmd); } // Actually run the compiler! diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs index d7d72d5dd56c9..798d5c3eb6736 100644 --- a/src/bootstrap/bin/rustdoc.rs +++ b/src/bootstrap/bin/rustdoc.rs @@ -23,10 +23,17 @@ use std::path::PathBuf; fn main() { let args = env::args_os().skip(1).collect::>(); let rustdoc = env::var_os("RUSTDOC_REAL").expect("RUSTDOC_REAL was not set"); - let libdir = env::var_os("RUSTC_LIBDIR").expect("RUSTC_LIBDIR was not set"); + let libdir = env::var_os("RUSTDOC_LIBDIR").expect("RUSTDOC_LIBDIR was not set"); let stage = env::var("RUSTC_STAGE").expect("RUSTC_STAGE was not set"); let sysroot = env::var_os("RUSTC_SYSROOT").expect("RUSTC_SYSROOT was not set"); + use std::str::FromStr; + + let verbose = match env::var("RUSTC_VERBOSE") { + Ok(s) => usize::from_str(&s).expect("RUSTC_VERBOSE should be an integer"), + Err(_) => 0, + }; + let mut dylib_path = bootstrap::util::dylib_path(); dylib_path.insert(0, PathBuf::from(libdir)); @@ -47,6 +54,22 @@ fn main() { if env::var_os("RUSTC_FORCE_UNSTABLE").is_some() { cmd.arg("-Z").arg("force-unstable-if-unmarked"); } + if let Some(linker) = env::var_os("RUSTC_TARGET_LINKER") { + cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options"); + } + + // Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick + // it up so we can make rustdoc print this into the docs + if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") { + // This "unstable-options" can be removed when `--crate-version` is stabilized + cmd.arg("-Z") + .arg("unstable-options") + .arg("--crate-version").arg(version); + } + + if verbose > 1 { + eprintln!("rustdoc command: {:?}", cmd); + } std::process::exit(match cmd.status() { Ok(s) => s.code().unwrap_or(1), diff --git a/src/bootstrap/bin/sccache-plus-cl.rs b/src/bootstrap/bin/sccache-plus-cl.rs index 266dffa5c92c7..8584014d48d5f 100644 --- a/src/bootstrap/bin/sccache-plus-cl.rs +++ b/src/bootstrap/bin/sccache-plus-cl.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -extern crate gcc; +extern crate cc; use std::env; use std::process::{self, Command}; @@ -18,7 +18,7 @@ fn main() { // Locate the actual compiler that we're invoking env::remove_var("CC"); env::remove_var("CXX"); - let mut cfg = gcc::Build::new(); + let mut cfg = cc::Build::new(); cfg.cargo_metadata(false) .out_dir("/") .target(&target) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index f12da29c45b02..5966bb65df9c8 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -8,7 +8,7 @@ # option. This file may not be copied, modified, or distributed # except according to those terms. -from __future__ import print_function +from __future__ import absolute_import, division, print_function import argparse import contextlib import datetime @@ -294,7 +294,7 @@ def default_build_triple(): raise ValueError('unknown byteorder: {}'.format(sys.byteorder)) # only the n64 ABI is supported, indicate it ostype += 'abi64' - elif cputype == 'sparcv9': + elif cputype == 'sparc' or cputype == 'sparcv9' or cputype == 'sparc64': pass else: err = "unknown cpu type: {}".format(cputype) @@ -302,6 +302,7 @@ def default_build_triple(): return "{}-{}".format(cputype, ostype) + class RustBuild(object): """Provide all the methods required to build Rust""" def __init__(self): @@ -350,11 +351,6 @@ def download_stage0(self): with open(self.rustc_stamp(), 'w') as rust_stamp: rust_stamp.write(self.date) - if "pc-windows-gnu" in self.build: - filename = "rust-mingw-{}-{}.tar.gz".format( - rustc_channel, self.build) - self._download_stage0_helper(filename, "rust-mingw") - if self.cargo().startswith(self.bin_root()) and \ (not os.path.exists(self.cargo()) or self.program_out_of_date(self.cargo_stamp())): @@ -498,7 +494,7 @@ def get_toml(self, key): If the key does not exists, the result is None: - >>> rb.get_toml("key3") == None + >>> rb.get_toml("key3") is None True """ for line in self.config_toml.splitlines(): @@ -531,7 +527,7 @@ def program_config(self, program): """ config = self.get_toml(program) if config: - return config + return os.path.expanduser(config) return os.path.join(self.bin_root(), "bin", "{}{}".format( program, self.exe_suffix())) @@ -606,6 +602,7 @@ def build_bootstrap(self): env["LIBRARY_PATH"] = os.path.join(self.bin_root(), "lib") + \ (os.pathsep + env["LIBRARY_PATH"]) \ if "LIBRARY_PATH" in env else "" + env["RUSTFLAGS"] = "-Cdebuginfo=2" env["PATH"] = os.path.join(self.bin_root(), "bin") + \ os.pathsep + env["PATH"] if not os.path.isfile(self.cargo()): @@ -643,13 +640,23 @@ def update_submodules(self): os.path.join(self.rust_root, ".gitmodules"), "--get-regexp", "path"] ).decode(default_encoding).splitlines()] - submodules = [module for module in submodules - if not ((module.endswith("llvm") and - self.get_toml('llvm-config')) or - (module.endswith("jemalloc") and - self.get_toml('jemalloc')))] + filtered_submodules = [] + for module in submodules: + if module.endswith("llvm"): + if self.get_toml('llvm-config'): + continue + if module.endswith("llvm-emscripten"): + backends = self.get_toml('codegen-backends') + if backends is None or not 'emscripten' in backends: + continue + if module.endswith("jemalloc"): + if self.get_toml('use-jemalloc') == 'false': + continue + if self.get_toml('jemalloc'): + continue + filtered_submodules.append(module) run(["git", "submodule", "update", - "--init", "--recursive"] + submodules, + "--init", "--recursive"] + filtered_submodules, cwd=self.rust_root, verbose=self.verbose) run(["git", "submodule", "-q", "foreach", "git", "reset", "-q", "--hard"], @@ -682,7 +689,7 @@ def bootstrap(): try: with open(args.config or 'config.toml') as config: build.config_toml = config.read() - except OSError: + except (OSError, IOError): pass if '\nverbose = 2' in build.config_toml: diff --git a/src/bootstrap/bootstrap_test.py b/src/bootstrap/bootstrap_test.py index 32ea4b4abe638..4db7e2ec016f0 100644 --- a/src/bootstrap/bootstrap_test.py +++ b/src/bootstrap/bootstrap_test.py @@ -10,6 +10,7 @@ """Bootstrap tests""" +from __future__ import absolute_import, division, print_function import os import doctest import unittest diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 7d116f23ef581..1df85323c41ef 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -26,6 +26,7 @@ use util::{exe, libdir, add_lib_path}; use {Build, Mode}; use cache::{INTERNER, Interned, Cache}; use check; +use test; use flags::Subcommand; use doc; use tool; @@ -94,7 +95,7 @@ pub struct RunConfig<'a> { pub builder: &'a Builder<'a>, pub host: Interned, pub target: Interned, - pub path: Option<&'a Path>, + pub path: PathBuf, } struct StepDescription { @@ -104,6 +105,32 @@ struct StepDescription { only_build: bool, should_run: fn(ShouldRun) -> ShouldRun, make_run: fn(RunConfig), + name: &'static str, +} + +#[derive(Debug, Clone, PartialOrd, Ord, PartialEq, Eq)] +struct PathSet { + set: BTreeSet, +} + +impl PathSet { + fn empty() -> PathSet { + PathSet { set: BTreeSet::new() } + } + + fn one>(path: P) -> PathSet { + let mut set = BTreeSet::new(); + set.insert(path.into()); + PathSet { set } + } + + fn has(&self, needle: &Path) -> bool { + self.set.iter().any(|p| p.ends_with(needle)) + } + + fn path(&self, builder: &Builder) -> PathBuf { + self.set.iter().next().unwrap_or(&builder.build.src).to_path_buf() + } } impl StepDescription { @@ -115,10 +142,18 @@ impl StepDescription { only_build: S::ONLY_BUILD, should_run: S::should_run, make_run: S::make_run, + name: unsafe { ::std::intrinsics::type_name::() }, } } - fn maybe_run(&self, builder: &Builder, path: Option<&Path>) { + fn maybe_run(&self, builder: &Builder, pathset: &PathSet) { + if builder.config.exclude.iter().any(|e| pathset.has(e)) { + eprintln!("Skipping {:?} because it is excluded", pathset); + return; + } else if !builder.config.exclude.is_empty() { + eprintln!("{:?} not skipped for {:?} -- not in {:?}", pathset, + self.name, builder.config.exclude); + } let build = builder.build; let hosts = if self.only_build_targets || self.only_build { build.build_triple() @@ -143,7 +178,7 @@ impl StepDescription { for target in targets { let run = RunConfig { builder, - path, + path: pathset.path(builder), host: *host, target: *target, }; @@ -156,24 +191,33 @@ impl StepDescription { let should_runs = v.iter().map(|desc| { (desc.should_run)(ShouldRun::new(builder)) }).collect::>(); + + // sanity checks on rules + for (desc, should_run) in v.iter().zip(&should_runs) { + assert!(!should_run.paths.is_empty(), + "{:?} should have at least one pathset", desc.name); + } + if paths.is_empty() { for (desc, should_run) in v.iter().zip(should_runs) { if desc.default && should_run.is_really_default { - desc.maybe_run(builder, None); + for pathset in &should_run.paths { + desc.maybe_run(builder, pathset); + } } } } else { for path in paths { let mut attempted_run = false; for (desc, should_run) in v.iter().zip(&should_runs) { - if should_run.run(path) { + if let Some(pathset) = should_run.pathset_for_path(path) { attempted_run = true; - desc.maybe_run(builder, Some(path)); + desc.maybe_run(builder, pathset); } } if !attempted_run { - eprintln!("Warning: no rules matched {}.", path.display()); + panic!("Error: no rules matched {}.", path.display()); } } } @@ -184,10 +228,10 @@ impl StepDescription { pub struct ShouldRun<'a> { pub builder: &'a Builder<'a>, // use a BTreeSet to maintain sort order - paths: BTreeSet, + paths: BTreeSet, // If this is a default rule, this is an additional constraint placed on - // it's run. Generally something like compiler docs being enabled. + // its run. Generally something like compiler docs being enabled. is_really_default: bool, } @@ -205,31 +249,53 @@ impl<'a> ShouldRun<'a> { self } + // Unlike `krate` this will create just one pathset. As such, it probably shouldn't actually + // ever be used, but as we transition to having all rules properly handle passing krate(...) by + // actually doing something different for every crate passed. + pub fn all_krates(mut self, name: &str) -> Self { + let mut set = BTreeSet::new(); + for krate in self.builder.in_tree_crates(name) { + set.insert(PathBuf::from(&krate.path)); + } + self.paths.insert(PathSet { set }); + self + } + pub fn krate(mut self, name: &str) -> Self { - for (_, krate_path) in self.builder.crates(name) { - self.paths.insert(PathBuf::from(krate_path)); + for krate in self.builder.in_tree_crates(name) { + self.paths.insert(PathSet::one(&krate.path)); } self } - pub fn path(mut self, path: &str) -> Self { - self.paths.insert(PathBuf::from(path)); + // single, non-aliased path + pub fn path(self, path: &str) -> Self { + self.paths(&[path]) + } + + // multiple aliases for the same job + pub fn paths(mut self, paths: &[&str]) -> Self { + self.paths.insert(PathSet { + set: paths.iter().map(PathBuf::from).collect(), + }); self } // allows being more explicit about why should_run in Step returns the value passed to it - pub fn never(self) -> ShouldRun<'a> { + pub fn never(mut self) -> ShouldRun<'a> { + self.paths.insert(PathSet::empty()); self } - fn run(&self, path: &Path) -> bool { - self.paths.iter().any(|p| path.ends_with(p)) + fn pathset_for_path(&self, path: &Path) -> Option<&PathSet> { + self.paths.iter().find(|pathset| pathset.has(path)) } } #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum Kind { Build, + Check, Test, Bench, Dist, @@ -251,19 +317,28 @@ impl<'a> Builder<'a> { tool::Compiletest, tool::RemoteTestServer, tool::RemoteTestClient, tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc, tool::Clippy, native::Llvm, tool::Rustfmt, tool::Miri), - Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest, - check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Rustdoc, - check::Linkcheck, check::Cargotest, check::Cargo, check::Rls, check::Docs, - check::ErrorIndex, check::Distcheck, check::Rustfmt, check::Miri), - Kind::Bench => describe!(check::Crate, check::CrateLibrustc), + Kind::Check => describe!(check::Std, check::Test, check::Rustc), + Kind::Test => describe!(test::Tidy, test::Bootstrap, test::Ui, test::RunPass, + test::CompileFail, test::ParseFail, test::RunFail, test::RunPassValgrind, + test::MirOpt, test::Codegen, test::CodegenUnits, test::Incremental, test::Debuginfo, + test::UiFullDeps, test::RunPassFullDeps, test::RunFailFullDeps, + test::CompileFailFullDeps, test::IncrementalFullDeps, test::Rustdoc, test::Pretty, + test::RunPassPretty, test::RunFailPretty, test::RunPassValgrindPretty, + test::RunPassFullDepsPretty, test::RunFailFullDepsPretty, test::RunMake, + test::Crate, test::CrateLibrustc, test::Rustdoc, test::Linkcheck, test::Cargotest, + test::Cargo, test::Rls, test::ErrorIndex, test::Distcheck, + test::Nomicon, test::Reference, test::RustdocBook, test::RustByExample, + test::TheBook, test::UnstableBook, + test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme), + Kind::Bench => describe!(test::Crate, test::CrateLibrustc), Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook, doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon, - doc::Reference, doc::Rustdoc, doc::CargoBook), + doc::Reference, doc::Rustdoc, doc::RustByExample, doc::CargoBook), Kind::Dist => describe!(dist::Docs, dist::Mingw, dist::Rustc, dist::DebuggerScripts, dist::Std, dist::Analysis, dist::Src, dist::PlainSourceTarball, dist::Cargo, - dist::Rls, dist::Extended, dist::HashSign, dist::DontDistWithMiriEnabled), + dist::Rls, dist::Rustfmt, dist::Extended, dist::HashSign), Kind::Install => describe!(install::Docs, install::Std, install::Cargo, install::Rls, - install::Analysis, install::Src, install::Rustc), + install::Rustfmt, install::Analysis, install::Src, install::Rustc), } } @@ -292,8 +367,10 @@ impl<'a> Builder<'a> { should_run = (desc.should_run)(should_run); } let mut help = String::from("Available paths:\n"); - for path in should_run.paths { - help.push_str(format!(" ./x.py {} {}\n", subcommand, path.display()).as_str()); + for pathset in should_run.paths { + for path in pathset.set { + help.push_str(format!(" ./x.py {} {}\n", subcommand, path.display()).as_str()); + } } Some(help) } @@ -301,14 +378,21 @@ impl<'a> Builder<'a> { pub fn run(build: &Build) { let (kind, paths) = match build.config.cmd { Subcommand::Build { ref paths } => (Kind::Build, &paths[..]), + Subcommand::Check { ref paths } => (Kind::Check, &paths[..]), Subcommand::Doc { ref paths } => (Kind::Doc, &paths[..]), Subcommand::Test { ref paths, .. } => (Kind::Test, &paths[..]), Subcommand::Bench { ref paths, .. } => (Kind::Bench, &paths[..]), Subcommand::Dist { ref paths } => (Kind::Dist, &paths[..]), Subcommand::Install { ref paths } => (Kind::Install, &paths[..]), - Subcommand::Clean => panic!(), + Subcommand::Clean { .. } => panic!(), }; + if let Some(path) = paths.get(0) { + if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") { + return; + } + } + let builder = Builder { build, top_stage: build.config.stage.unwrap_or(2), @@ -317,6 +401,12 @@ impl<'a> Builder<'a> { stack: RefCell::new(Vec::new()), }; + if kind == Kind::Dist { + assert!(!build.config.test_miri, "Do not distribute with miri enabled.\n\ + The distributed libraries would include all MIR (increasing binary size). + The distributed MIR would include validation statements."); + } + StepDescription::run(&Builder::get_step_descriptions(builder.kind), &builder, paths); } @@ -356,10 +446,11 @@ impl<'a> Builder<'a> { fn run(self, builder: &Builder) -> Interned { let compiler = self.compiler; - let lib = if compiler.stage >= 2 && builder.build.config.libdir_relative.is_some() { - builder.build.config.libdir_relative.clone().unwrap() + let config = &builder.build.config; + let lib = if compiler.stage >= 1 && config.libdir_relative().is_some() { + builder.build.config.libdir_relative().unwrap() } else { - PathBuf::from("lib") + Path::new("lib") }; let sysroot = builder.sysroot(self.compiler).join(lib) .join("rustlib").join(self.target).join("lib"); @@ -371,6 +462,11 @@ impl<'a> Builder<'a> { self.ensure(Libdir { compiler, target }) } + pub fn sysroot_codegen_backends(&self, compiler: Compiler) -> PathBuf { + self.sysroot_libdir(compiler, compiler.host) + .with_file_name("codegen-backends") + } + /// Returns the compiler's libdir where it stores the dynamic libraries that /// it itself links against. /// @@ -413,12 +509,16 @@ impl<'a> Builder<'a> { pub fn rustdoc_cmd(&self, host: Interned) -> Command { let mut cmd = Command::new(&self.out.join("bootstrap/debug/rustdoc")); let compiler = self.compiler(self.top_stage, host); - cmd - .env("RUSTC_STAGE", compiler.stage.to_string()) - .env("RUSTC_SYSROOT", self.sysroot(compiler)) - .env("RUSTC_LIBDIR", self.sysroot_libdir(compiler, self.build.build)) - .env("CFG_RELEASE_CHANNEL", &self.build.config.channel) - .env("RUSTDOC_REAL", self.rustdoc(host)); + cmd.env("RUSTC_STAGE", compiler.stage.to_string()) + .env("RUSTC_SYSROOT", self.sysroot(compiler)) + .env("RUSTDOC_LIBDIR", self.sysroot_libdir(compiler, self.build.build)) + .env("CFG_RELEASE_CHANNEL", &self.build.config.channel) + .env("RUSTDOC_REAL", self.rustdoc(host)) + .env("RUSTDOC_CRATE_VERSION", self.build.rust_version()) + .env("RUSTC_BOOTSTRAP", "1"); + if let Some(linker) = self.build.linker(host) { + cmd.env("RUSTC_TARGET_LINKER", linker); + } cmd } @@ -438,7 +538,8 @@ impl<'a> Builder<'a> { let out_dir = self.stage_out(compiler, mode); cargo.env("CARGO_TARGET_DIR", out_dir) .arg(cmd) - .arg("--target").arg(target); + .arg("--target") + .arg(target); // If we were invoked from `make` then that's already got a jobserver // set up for us so no need to tell Cargo about jobs all over again. @@ -458,6 +559,18 @@ impl<'a> Builder<'a> { stage = compiler.stage; } + let mut extra_args = env::var(&format!("RUSTFLAGS_STAGE_{}", stage)).unwrap_or_default(); + if stage != 0 { + let s = env::var("RUSTFLAGS_STAGE_NOT_0").unwrap_or_default(); + extra_args.push_str(" "); + extra_args.push_str(&s); + } + + if !extra_args.is_empty() { + cargo.env("RUSTFLAGS", + format!("{} {}", env::var("RUSTFLAGS").unwrap_or_default(), extra_args)); + } + // Customize the compiler we're running. Specify the compiler to cargo // as our shim and then pass it some various options used to configure // how the actual compiler itself is called. @@ -468,8 +581,6 @@ impl<'a> Builder<'a> { .env("RUSTC", self.out.join("bootstrap/debug/rustc")) .env("RUSTC_REAL", self.rustc(compiler)) .env("RUSTC_STAGE", stage.to_string()) - .env("RUSTC_CODEGEN_UNITS", - self.config.rust_codegen_units.to_string()) .env("RUSTC_DEBUG_ASSERTIONS", self.config.rust_debug_assertions.to_string()) .env("RUSTC_SYSROOT", self.sysroot(compiler)) @@ -482,14 +593,28 @@ impl<'a> Builder<'a> { PathBuf::from("/path/to/nowhere/rustdoc/not/required") }) .env("TEST_MIRI", self.config.test_miri.to_string()) - .env("RUSTC_FLAGS", self.rustc_flags(target).join(" ")); + .env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir()); + + if let Some(host_linker) = self.build.linker(compiler.host) { + cargo.env("RUSTC_HOST_LINKER", host_linker); + } + if let Some(target_linker) = self.build.linker(target) { + cargo.env("RUSTC_TARGET_LINKER", target_linker); + } + if let Some(ref error_format) = self.config.rustc_error_format { + cargo.env("RUSTC_ERROR_FORMAT", error_format); + } + if cmd != "build" && cmd != "check" { + cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(self.compiler(2, self.build.build))); + } if mode != Mode::Tool { // Tools don't get debuginfo right now, e.g. cargo and rls don't // get compiled with debuginfo. - cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()) - .env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()) - .env("RUSTC_FORCE_UNSTABLE", "1"); + // Adding debuginfo increases their sizes by a factor of 3-4. + cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()); + cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()); + cargo.env("RUSTC_FORCE_UNSTABLE", "1"); // Currently the compiler depends on crates from crates.io, and // then other crates can depend on the compiler (e.g. proc-macro @@ -531,7 +656,10 @@ impl<'a> Builder<'a> { // For other crates, however, we know that we've already got a standard // library up and running, so we can use the normal compiler to compile // build scripts in that situation. - if mode == Mode::Libstd { + // + // If LLVM support is disabled we need to use the snapshot compiler to compile + // build scripts, as the new compiler doesn't support executables. + if mode == Mode::Libstd || !self.build.config.llvm_enabled { cargo.env("RUSTC_SNAPSHOT", &self.initial_rustc) .env("RUSTC_SNAPSHOT_LIBDIR", self.rustc_snapshot_libdir()); } else { @@ -543,8 +671,7 @@ impl<'a> Builder<'a> { // not guaranteeing correctness across builds if the compiler // is changing under your feet.` if self.config.incremental && compiler.stage == 0 { - let incr_dir = self.incremental_dir(compiler); - cargo.env("RUSTC_INCREMENTAL", incr_dir); + cargo.env("CARGO_INCREMENTAL", "1"); } if let Some(ref on_fail) = self.config.on_fail { @@ -553,17 +680,35 @@ impl<'a> Builder<'a> { cargo.env("RUSTC_VERBOSE", format!("{}", self.verbosity)); - // Specify some various options for build scripts used throughout - // the build. + // Throughout the build Cargo can execute a number of build scripts + // compiling C/C++ code and we need to pass compilers, archivers, flags, etc + // obtained previously to those build scripts. + // Build scripts use either the `cc` crate or `configure/make` so we pass + // the options through environment variables that are fetched and understood by both. // // FIXME: the guard against msvc shouldn't need to be here if !target.contains("msvc") { - cargo.env(format!("CC_{}", target), self.cc(target)) - .env(format!("AR_{}", target), self.ar(target).unwrap()) // only msvc is None - .env(format!("CFLAGS_{}", target), self.cflags(target).join(" ")); + let cc = self.cc(target); + cargo.env(format!("CC_{}", target), cc) + .env("CC", cc); + + let cflags = self.cflags(target).join(" "); + cargo.env(format!("CFLAGS_{}", target), cflags.clone()) + .env("CFLAGS", cflags.clone()); + + if let Some(ar) = self.ar(target) { + let ranlib = format!("{} s", ar.display()); + cargo.env(format!("AR_{}", target), ar) + .env("AR", ar) + .env(format!("RANLIB_{}", target), ranlib.clone()) + .env("RANLIB", ranlib); + } if let Ok(cxx) = self.cxx(target) { - cargo.env(format!("CXX_{}", target), cxx); + cargo.env(format!("CXX_{}", target), cxx) + .env("CXX", cxx) + .env(format!("CXXFLAGS_{}", target), cflags.clone()) + .env("CXXFLAGS", cflags); } } @@ -571,6 +716,9 @@ impl<'a> Builder<'a> { cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string()); } + // For `cargo doc` invocations, make rustdoc print the Rust version into the docs + cargo.env("RUSTDOC_CRATE_VERSION", self.build.rust_version()); + // Environment variables *required* throughout the build // // FIXME: should update code to not require this env var @@ -579,13 +727,67 @@ impl<'a> Builder<'a> { // Set this for all builds to make sure doc builds also get it. cargo.env("CFG_RELEASE_CHANNEL", &self.build.config.channel); - if self.is_verbose() { + // This one's a bit tricky. As of the time of this writing the compiler + // links to the `winapi` crate on crates.io. This crate provides raw + // bindings to Windows system functions, sort of like libc does for + // Unix. This crate also, however, provides "import libraries" for the + // MinGW targets. There's an import library per dll in the windows + // distribution which is what's linked to. These custom import libraries + // are used because the winapi crate can reference Windows functions not + // present in the MinGW import libraries. + // + // For example MinGW may ship libdbghelp.a, but it may not have + // references to all the functions in the dbghelp dll. Instead the + // custom import library for dbghelp in the winapi crates has all this + // information. + // + // Unfortunately for us though the import libraries are linked by + // default via `-ldylib=winapi_foo`. That is, they're linked with the + // `dylib` type with a `winapi_` prefix (so the winapi ones don't + // conflict with the system MinGW ones). This consequently means that + // the binaries we ship of things like rustc_trans (aka the rustc_trans + // DLL) when linked against *again*, for example with procedural macros + // or plugins, will trigger the propagation logic of `-ldylib`, passing + // `-lwinapi_foo` to the linker again. This isn't actually available in + // our distribution, however, so the link fails. + // + // To solve this problem we tell winapi to not use its bundled import + // libraries. This means that it will link to the system MinGW import + // libraries by default, and the `-ldylib=foo` directives will still get + // passed to the final linker, but they'll look like `-lfoo` which can + // be resolved because MinGW has the import library. The downside is we + // don't get newer functions from Windows, but we don't use any of them + // anyway. + cargo.env("WINAPI_NO_BUNDLED_LIBRARIES", "1"); + + if self.is_very_verbose() { cargo.arg("-v"); } - // FIXME: cargo bench does not accept `--release` - if self.config.rust_optimize && cmd != "bench" { - cargo.arg("--release"); + + // This must be kept before the thinlto check, as we set codegen units + // to 1 forcibly there. + if let Some(n) = self.config.rust_codegen_units { + cargo.env("RUSTC_CODEGEN_UNITS", n.to_string()); } + + if self.config.rust_optimize { + // FIXME: cargo bench does not accept `--release` + if cmd != "bench" { + cargo.arg("--release"); + } + + if self.config.rust_codegen_units.is_none() && + self.build.is_rust_llvm(compiler.host) && + self.config.rust_thinlto { + cargo.env("RUSTC_THINLTO", "1"); + } else if self.config.rust_codegen_units.is_none() { + // Generally, if ThinLTO has been disabled for some reason, we + // want to set the codegen units to 1. However, we shouldn't do + // this if the option was specifically set by the user. + cargo.env("RUSTC_CODEGEN_UNITS", "1"); + } + } + if self.config.locked_deps { cargo.arg("--locked"); } diff --git a/src/bootstrap/cc.rs b/src/bootstrap/cc.rs deleted file mode 100644 index c77e609d70be0..0000000000000 --- a/src/bootstrap/cc.rs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright 2015 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! C-compiler probing and detection. -//! -//! This module will fill out the `cc` and `cxx` maps of `Build` by looking for -//! C and C++ compilers for each target configured. A compiler is found through -//! a number of vectors (in order of precedence) -//! -//! 1. Configuration via `target.$target.cc` in `config.toml`. -//! 2. Configuration via `target.$target.android-ndk` in `config.toml`, if -//! applicable -//! 3. Special logic to probe on OpenBSD -//! 4. The `CC_$target` environment variable. -//! 5. The `CC` environment variable. -//! 6. "cc" -//! -//! Some of this logic is implemented here, but much of it is farmed out to the -//! `gcc` crate itself, so we end up having the same fallbacks as there. -//! Similar logic is then used to find a C++ compiler, just some s/cc/c++/ is -//! used. -//! -//! It is intended that after this module has run no C/C++ compiler will -//! ever be probed for. Instead the compilers found here will be used for -//! everything. - -use std::process::Command; -use std::iter; - -use build_helper::{cc2ar, output}; -use gcc; - -use Build; -use config::Target; -use cache::Interned; - -pub fn find(build: &mut Build) { - // For all targets we're going to need a C compiler for building some shims - // and such as well as for being a linker for Rust code. - for target in build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) { - let mut cfg = gcc::Build::new(); - cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false) - .target(&target).host(&build.build); - - let config = build.config.target_config.get(&target); - if let Some(cc) = config.and_then(|c| c.cc.as_ref()) { - cfg.compiler(cc); - } else { - set_compiler(&mut cfg, "gcc", target, config, build); - } - - let compiler = cfg.get_compiler(); - let ar = cc2ar(compiler.path(), &target); - build.verbose(&format!("CC_{} = {:?}", &target, compiler.path())); - if let Some(ref ar) = ar { - build.verbose(&format!("AR_{} = {:?}", &target, ar)); - } - build.cc.insert(target, (compiler, ar)); - } - - // For all host triples we need to find a C++ compiler as well - for host in build.hosts.iter().cloned().chain(iter::once(build.build)) { - let mut cfg = gcc::Build::new(); - cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false).cpp(true) - .target(&host).host(&build.build); - let config = build.config.target_config.get(&host); - if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) { - cfg.compiler(cxx); - } else { - set_compiler(&mut cfg, "g++", host, config, build); - } - let compiler = cfg.get_compiler(); - build.verbose(&format!("CXX_{} = {:?}", host, compiler.path())); - build.cxx.insert(host, compiler); - } -} - -fn set_compiler(cfg: &mut gcc::Build, - gnu_compiler: &str, - target: Interned, - config: Option<&Target>, - build: &Build) { - match &*target { - // When compiling for android we may have the NDK configured in the - // config.toml in which case we look there. Otherwise the default - // compiler already takes into account the triple in question. - t if t.contains("android") => { - if let Some(ndk) = config.and_then(|c| c.ndk.as_ref()) { - let target = target.replace("armv7", "arm"); - let compiler = format!("{}-{}", target, gnu_compiler); - cfg.compiler(ndk.join("bin").join(compiler)); - } - } - - // The default gcc version from OpenBSD may be too old, try using egcc, - // which is a gcc version from ports, if this is the case. - t if t.contains("openbsd") => { - let c = cfg.get_compiler(); - if !c.path().ends_with(gnu_compiler) { - return - } - - let output = output(c.to_command().arg("--version")); - let i = match output.find(" 4.") { - Some(i) => i, - None => return, - }; - match output[i + 3..].chars().next().unwrap() { - '0' ... '6' => {} - _ => return, - } - let alternative = format!("e{}", gnu_compiler); - if Command::new(&alternative).output().is_ok() { - cfg.compiler(alternative); - } - } - - "mips-unknown-linux-musl" => { - if cfg.get_compiler().path().to_str() == Some("gcc") { - cfg.compiler("mips-linux-musl-gcc"); - } - } - "mipsel-unknown-linux-musl" => { - if cfg.get_compiler().path().to_str() == Some("gcc") { - cfg.compiler("mipsel-linux-musl-gcc"); - } - } - - t if t.contains("musl") => { - if let Some(root) = build.musl_root(target) { - let guess = root.join("bin/musl-gcc"); - if guess.exists() { - cfg.compiler(guess); - } - } - } - - _ => {} - } -} diff --git a/src/bootstrap/cc_detect.rs b/src/bootstrap/cc_detect.rs new file mode 100644 index 0000000000000..e531fdaf2923b --- /dev/null +++ b/src/bootstrap/cc_detect.rs @@ -0,0 +1,212 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! C-compiler probing and detection. +//! +//! This module will fill out the `cc` and `cxx` maps of `Build` by looking for +//! C and C++ compilers for each target configured. A compiler is found through +//! a number of vectors (in order of precedence) +//! +//! 1. Configuration via `target.$target.cc` in `config.toml`. +//! 2. Configuration via `target.$target.android-ndk` in `config.toml`, if +//! applicable +//! 3. Special logic to probe on OpenBSD +//! 4. The `CC_$target` environment variable. +//! 5. The `CC` environment variable. +//! 6. "cc" +//! +//! Some of this logic is implemented here, but much of it is farmed out to the +//! `cc` crate itself, so we end up having the same fallbacks as there. +//! Similar logic is then used to find a C++ compiler, just some s/cc/c++/ is +//! used. +//! +//! It is intended that after this module has run no C/C++ compiler will +//! ever be probed for. Instead the compilers found here will be used for +//! everything. + +use std::collections::HashSet; +use std::{env, iter}; +use std::path::{Path, PathBuf}; +use std::process::Command; + +use build_helper::output; +use cc; + +use Build; +use config::Target; +use cache::Interned; + +// The `cc` crate doesn't provide a way to obtain a path to the detected archiver, +// so use some simplified logic here. First we respect the environment variable `AR`, then +// try to infer the archiver path from the C compiler path. +// In the future this logic should be replaced by calling into the `cc` crate. +fn cc2ar(cc: &Path, target: &str) -> Option { + if let Some(ar) = env::var_os("AR") { + Some(PathBuf::from(ar)) + } else if target.contains("msvc") { + None + } else if target.contains("musl") { + Some(PathBuf::from("ar")) + } else if target.contains("openbsd") { + Some(PathBuf::from("ar")) + } else { + let parent = cc.parent().unwrap(); + let file = cc.file_name().unwrap().to_str().unwrap(); + for suffix in &["gcc", "cc", "clang"] { + if let Some(idx) = file.rfind(suffix) { + let mut file = file[..idx].to_owned(); + file.push_str("ar"); + return Some(parent.join(&file)); + } + } + Some(parent.join(file)) + } +} + +pub fn find(build: &mut Build) { + // For all targets we're going to need a C compiler for building some shims + // and such as well as for being a linker for Rust code. + let targets = build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) + .collect::>(); + for target in targets.into_iter() { + let mut cfg = cc::Build::new(); + cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false) + .target(&target).host(&build.build); + + let config = build.config.target_config.get(&target); + if let Some(cc) = config.and_then(|c| c.cc.as_ref()) { + cfg.compiler(cc); + } else { + set_compiler(&mut cfg, Language::C, target, config, build); + } + + let compiler = cfg.get_compiler(); + let ar = if let ar @ Some(..) = config.and_then(|c| c.ar.clone()) { + ar + } else { + cc2ar(compiler.path(), &target) + }; + + build.verbose(&format!("CC_{} = {:?}", &target, compiler.path())); + build.cc.insert(target, compiler); + if let Some(ar) = ar { + build.verbose(&format!("AR_{} = {:?}", &target, ar)); + build.ar.insert(target, ar); + } + } + + // For all host triples we need to find a C++ compiler as well + let hosts = build.hosts.iter().cloned().chain(iter::once(build.build)).collect::>(); + for host in hosts.into_iter() { + let mut cfg = cc::Build::new(); + cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false).cpp(true) + .target(&host).host(&build.build); + let config = build.config.target_config.get(&host); + if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) { + cfg.compiler(cxx); + } else { + set_compiler(&mut cfg, Language::CPlusPlus, host, config, build); + } + let compiler = cfg.get_compiler(); + build.verbose(&format!("CXX_{} = {:?}", host, compiler.path())); + build.cxx.insert(host, compiler); + } +} + +fn set_compiler(cfg: &mut cc::Build, + compiler: Language, + target: Interned, + config: Option<&Target>, + build: &Build) { + match &*target { + // When compiling for android we may have the NDK configured in the + // config.toml in which case we look there. Otherwise the default + // compiler already takes into account the triple in question. + t if t.contains("android") => { + if let Some(ndk) = config.and_then(|c| c.ndk.as_ref()) { + let target = target.replace("armv7", "arm"); + let compiler = format!("{}-{}", target, compiler.clang()); + cfg.compiler(ndk.join("bin").join(compiler)); + } + } + + // The default gcc version from OpenBSD may be too old, try using egcc, + // which is a gcc version from ports, if this is the case. + t if t.contains("openbsd") => { + let c = cfg.get_compiler(); + let gnu_compiler = compiler.gcc(); + if !c.path().ends_with(gnu_compiler) { + return + } + + let output = output(c.to_command().arg("--version")); + let i = match output.find(" 4.") { + Some(i) => i, + None => return, + }; + match output[i + 3..].chars().next().unwrap() { + '0' ... '6' => {} + _ => return, + } + let alternative = format!("e{}", gnu_compiler); + if Command::new(&alternative).output().is_ok() { + cfg.compiler(alternative); + } + } + + "mips-unknown-linux-musl" => { + if cfg.get_compiler().path().to_str() == Some("gcc") { + cfg.compiler("mips-linux-musl-gcc"); + } + } + "mipsel-unknown-linux-musl" => { + if cfg.get_compiler().path().to_str() == Some("gcc") { + cfg.compiler("mipsel-linux-musl-gcc"); + } + } + + t if t.contains("musl") => { + if let Some(root) = build.musl_root(target) { + let guess = root.join("bin/musl-gcc"); + if guess.exists() { + cfg.compiler(guess); + } + } + } + + _ => {} + } +} + +/// The target programming language for a native compiler. +enum Language { + /// The compiler is targeting C. + C, + /// The compiler is targeting C++. + CPlusPlus, +} + +impl Language { + /// Obtains the name of a compiler in the GCC collection. + fn gcc(self) -> &'static str { + match self { + Language::C => "gcc", + Language::CPlusPlus => "g++", + } + } + + /// Obtains the name of a compiler in the clang suite. + fn clang(self) -> &'static str { + match self { + Language::C => "clang", + Language::CPlusPlus => "clang++", + } + } +} diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs index 6ed504dfe74a3..72841cb0616c1 100644 --- a/src/bootstrap/channel.rs +++ b/src/bootstrap/channel.rs @@ -24,12 +24,7 @@ use Build; use config::Config; // The version number -pub const CFG_RELEASE_NUM: &str = "1.22.0"; - -// 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 -// versions (section 9) -pub const CFG_PRERELEASE_VERSION: &str = ".1"; +pub const CFG_RELEASE_NUM: &str = "1.26.0"; pub struct GitInfo { inner: Option, diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 25266fc538f1b..767ee4016c6f1 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -1,4 +1,4 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -8,1407 +8,155 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! Implementation of the test-related targets of the build system. -//! -//! This file implements the various regression test suites that we execute on -//! our CI. +//! Implementation of compiling the compiler and standard library, in "check" mode. -use std::collections::HashSet; -use std::env; -use std::ffi::OsString; -use std::iter; -use std::fmt; -use std::fs::{self, File}; -use std::path::{PathBuf, Path}; -use std::process::Command; -use std::io::Read; - -use build_helper::{self, output, BuildExpectation}; - -use builder::{Kind, RunConfig, ShouldRun, Builder, Compiler, Step}; -use cache::{INTERNER, Interned}; -use compile; -use dist; -use native; -use tool::{self, Tool}; -use util::{self, dylib_path, dylib_path_var}; -use {Build, Mode}; -use toolstate::ToolState; - -const ADB_TEST_DIR: &str = "/data/tmp/work"; - -/// The two modes of the test runner; tests or benchmarks. -#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone)] -pub enum TestKind { - /// Run `cargo test` - Test, - /// Run `cargo bench` - Bench, -} - -impl TestKind { - // Return the cargo subcommand for this test kind - fn subcommand(self) -> &'static str { - match self { - TestKind::Test => "test", - TestKind::Bench => "bench", - } - } -} - -impl fmt::Display for TestKind { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str(match *self { - TestKind::Test => "Testing", - TestKind::Bench => "Benchmarking", - }) - } -} - -fn try_run_expecting(build: &Build, cmd: &mut Command, expect: BuildExpectation) { - if !build.fail_fast { - if !build.try_run(cmd, expect) { - let mut failures = build.delayed_failures.borrow_mut(); - failures.push(format!("{:?}", cmd)); - } - } else { - build.run_expecting(cmd, expect); - } -} - -fn try_run(build: &Build, cmd: &mut Command) { - try_run_expecting(build, cmd, BuildExpectation::None) -} - -fn try_run_quiet(build: &Build, cmd: &mut Command) { - if !build.fail_fast { - if !build.try_run_quiet(cmd) { - let mut failures = build.delayed_failures.borrow_mut(); - failures.push(format!("{:?}", cmd)); - } - } else { - build.run_quiet(cmd); - } -} +use compile::{run_cargo, std_cargo, test_cargo, rustc_cargo, add_to_sysroot}; +use builder::{RunConfig, Builder, ShouldRun, Step}; +use {Build, Compiler, Mode}; +use cache::Interned; +use std::path::PathBuf; #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Linkcheck { - host: Interned, +pub struct Std { + pub target: Interned, } -impl Step for Linkcheck { +impl Step for Std { type Output = (); - const ONLY_HOSTS: bool = true; const DEFAULT: bool = true; - /// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler. - /// - /// This tool in `src/tools` will verify the validity of all our links in the - /// documentation to ensure we don't have a bunch of dead ones. - fn run(self, builder: &Builder) { - let build = builder.build; - let host = self.host; - - println!("Linkcheck ({})", host); - - builder.default_doc(None); - - let _time = util::timeit(); - try_run(build, builder.tool_cmd(Tool::Linkchecker) - .arg(build.out.join(host).join("doc"))); - } - fn should_run(run: ShouldRun) -> ShouldRun { - let builder = run.builder; - run.path("src/tools/linkchecker").default_condition(builder.build.config.docs) + run.all_krates("std") } fn make_run(run: RunConfig) { - run.builder.ensure(Linkcheck { host: run.target }); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Cargotest { - stage: u32, - host: Interned, -} - -impl Step for Cargotest { - type Output = (); - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/cargotest") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Cargotest { - stage: run.builder.top_stage, - host: run.target, + run.builder.ensure(Std { + target: run.target, }); } - /// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler. - /// - /// This tool in `src/tools` will check out a few Rust projects and run `cargo - /// test` to ensure that we don't regress the test suites there. fn run(self, builder: &Builder) { let build = builder.build; - let compiler = builder.compiler(self.stage, self.host); - builder.ensure(compile::Rustc { compiler, target: compiler.host }); - - // 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 - // quickly run into path name limit constraints. - let out_dir = build.out.join("ct"); - t!(fs::create_dir_all(&out_dir)); - - let _time = util::timeit(); - let mut cmd = builder.tool_cmd(Tool::CargoTest); - try_run(build, cmd.arg(&build.initial_cargo) - .arg(&out_dir) - .env("RUSTC", builder.rustc(compiler)) - .env("RUSTDOC", builder.rustdoc(compiler.host))); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Cargo { - stage: u32, - host: Interned, -} - -impl Step for Cargo { - type Output = (); - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/cargo") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Cargo { - stage: run.builder.top_stage, - host: run.target, - }); - } - - /// Runs `cargo test` for `cargo` packaged with Rust. - fn run(self, builder: &Builder) { - let build = builder.build; - let compiler = builder.compiler(self.stage, self.host); - - builder.ensure(tool::Cargo { compiler, target: self.host }); - let mut cargo = builder.cargo(compiler, Mode::Tool, self.host, "test"); - cargo.arg("--manifest-path").arg(build.src.join("src/tools/cargo/Cargo.toml")); - if !build.fail_fast { - cargo.arg("--no-fail-fast"); - } - - // 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"); - - try_run(build, cargo.env("PATH", &path_for_cargo(builder, compiler))); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Rls { - stage: u32, - host: Interned, -} - -impl Step for Rls { - type Output = (); - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/rls") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Rls { - stage: run.builder.top_stage, - host: run.target, - }); - } - - /// Runs `cargo test` for the rls. - fn run(self, builder: &Builder) { - let build = builder.build; - let stage = self.stage; - let host = self.host; - let compiler = builder.compiler(stage, host); - - builder.ensure(tool::Rls { compiler, target: self.host }); - let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test"); - cargo.arg("--manifest-path").arg(build.src.join("src/tools/rls/Cargo.toml")); - - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); - - builder.add_rustc_lib_path(compiler, &mut cargo); - - try_run(build, &mut cargo); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Rustfmt { - stage: u32, - host: Interned, -} - -impl Step for Rustfmt { - type Output = (); - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/rustfmt") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Rustfmt { - stage: run.builder.top_stage, - host: run.target, - }); - } - - /// Runs `cargo test` for rustfmt. - fn run(self, builder: &Builder) { - let build = builder.build; - let stage = self.stage; - let host = self.host; - let compiler = builder.compiler(stage, host); - - builder.ensure(tool::Rustfmt { compiler, target: self.host }); - let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test"); - cargo.arg("--manifest-path").arg(build.src.join("src/tools/rustfmt/Cargo.toml")); - - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); - - builder.add_rustc_lib_path(compiler, &mut cargo); - - try_run(build, &mut cargo); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Miri { - host: Interned, -} - -impl Step for Miri { - type Output = (); - const ONLY_HOSTS: bool = true; - const DEFAULT: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - let test_miri = run.builder.build.config.test_miri; - run.path("src/tools/miri").default_condition(test_miri) - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Miri { - host: run.target, - }); - } - - /// Runs `cargo test` for miri. - fn run(self, builder: &Builder) { - let build = builder.build; - let host = self.host; - let compiler = builder.compiler(1, host); - - let miri = builder.ensure(tool::Miri { compiler, target: self.host }); - let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test"); - cargo.arg("--manifest-path").arg(build.src.join("src/tools/miri/Cargo.toml")); - - // Don't build tests dynamically, just a pain to work with - cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); - // miri tests need to know about the stage sysroot - cargo.env("MIRI_SYSROOT", builder.sysroot(compiler)); - cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); - cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler)); - cargo.env("MIRI_PATH", miri); - - builder.add_rustc_lib_path(compiler, &mut cargo); - - try_run_expecting( - build, - &mut cargo, - builder.build.config.toolstate.miri.passes(ToolState::Testing), - ); - } -} - - -fn path_for_cargo(builder: &Builder, compiler: Compiler) -> OsString { - // 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 = builder.sysroot(compiler).join("bin"); - let old_path = env::var_os("PATH").unwrap_or_default(); - env::join_paths(iter::once(path).chain(env::split_paths(&old_path))).expect("") -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Tidy { - host: Interned, -} - -impl Step for Tidy { - type Output = (); - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; - const ONLY_BUILD: bool = true; - - /// Runs the `tidy` tool as compiled in `stage` by the `host` compiler. - /// - /// This tool in `src/tools` checks up on various bits and pieces of style and - /// otherwise just implements a few lint-like checks that are specific to the - /// compiler itself. - fn run(self, builder: &Builder) { - let build = builder.build; - let host = self.host; - - let _folder = build.fold_output(|| "tidy"); - println!("tidy check ({})", host); - let mut cmd = builder.tool_cmd(Tool::Tidy); - cmd.arg(build.src.join("src")); - if !build.config.vendor { - cmd.arg("--no-vendor"); - } - if build.config.quiet_tests { - cmd.arg("--quiet"); - } - try_run(build, &mut cmd); - } - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/tidy") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Tidy { - host: run.builder.build.build, - }); - } -} - -fn testdir(build: &Build, host: Interned) -> PathBuf { - build.out.join(host).join("test") -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -struct Test { - path: &'static str, - mode: &'static str, - suite: &'static str, -} - -static DEFAULT_COMPILETESTS: &[Test] = &[ - Test { path: "src/test/ui", mode: "ui", suite: "ui" }, - Test { path: "src/test/run-pass", mode: "run-pass", suite: "run-pass" }, - Test { path: "src/test/compile-fail", mode: "compile-fail", suite: "compile-fail" }, - Test { path: "src/test/parse-fail", mode: "parse-fail", suite: "parse-fail" }, - Test { path: "src/test/run-fail", mode: "run-fail", suite: "run-fail" }, - Test { - path: "src/test/run-pass-valgrind", - mode: "run-pass-valgrind", - suite: "run-pass-valgrind" - }, - Test { path: "src/test/mir-opt", mode: "mir-opt", suite: "mir-opt" }, - Test { path: "src/test/codegen", mode: "codegen", suite: "codegen" }, - Test { path: "src/test/codegen-units", mode: "codegen-units", suite: "codegen-units" }, - Test { path: "src/test/incremental", mode: "incremental", suite: "incremental" }, - - // What this runs varies depending on the native platform being apple - Test { path: "src/test/debuginfo", mode: "debuginfo-XXX", suite: "debuginfo" }, -]; - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct DefaultCompiletest { - compiler: Compiler, - target: Interned, - mode: &'static str, - suite: &'static str, -} - -impl Step for DefaultCompiletest { - type Output = (); - const DEFAULT: bool = true; - - fn should_run(mut run: ShouldRun) -> ShouldRun { - for test in DEFAULT_COMPILETESTS { - run = run.path(test.path); - } - run - } - - fn make_run(run: RunConfig) { - let compiler = run.builder.compiler(run.builder.top_stage, run.host); - - let test = run.path.map(|path| { - DEFAULT_COMPILETESTS.iter().find(|&&test| { - path.ends_with(test.path) - }).unwrap_or_else(|| { - panic!("make_run in compile test to receive test path, received {:?}", path); - }) - }); - - if let Some(test) = test { - run.builder.ensure(DefaultCompiletest { - compiler, - target: run.target, - mode: test.mode, - suite: test.suite, - }); - } else { - for test in DEFAULT_COMPILETESTS { - run.builder.ensure(DefaultCompiletest { - compiler, - target: run.target, - mode: test.mode, - suite: test.suite - }); - } - } - } - - fn run(self, builder: &Builder) { - builder.ensure(Compiletest { - compiler: self.compiler, - target: self.target, - mode: self.mode, - suite: self.suite, - }) - } -} - -// Also default, but host-only. -static HOST_COMPILETESTS: &[Test] = &[ - Test { path: "src/test/ui-fulldeps", mode: "ui", suite: "ui-fulldeps" }, - Test { path: "src/test/run-pass-fulldeps", mode: "run-pass", suite: "run-pass-fulldeps" }, - Test { path: "src/test/run-fail-fulldeps", mode: "run-fail", suite: "run-fail-fulldeps" }, - Test { - path: "src/test/compile-fail-fulldeps", - mode: "compile-fail", - suite: "compile-fail-fulldeps", - }, - Test { path: "src/test/run-make", mode: "run-make", suite: "run-make" }, - Test { path: "src/test/rustdoc", mode: "rustdoc", suite: "rustdoc" }, - - Test { path: "src/test/pretty", mode: "pretty", suite: "pretty" }, - Test { path: "src/test/run-pass/pretty", mode: "pretty", suite: "run-pass" }, - Test { path: "src/test/run-fail/pretty", mode: "pretty", suite: "run-fail" }, - Test { path: "src/test/run-pass-valgrind/pretty", mode: "pretty", suite: "run-pass-valgrind" }, - Test { path: "src/test/run-pass-fulldeps/pretty", mode: "pretty", suite: "run-pass-fulldeps" }, - Test { path: "src/test/run-fail-fulldeps/pretty", mode: "pretty", suite: "run-fail-fulldeps" }, -]; - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct HostCompiletest { - compiler: Compiler, - target: Interned, - mode: &'static str, - suite: &'static str, -} - -impl Step for HostCompiletest { - type Output = (); - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; - - fn should_run(mut run: ShouldRun) -> ShouldRun { - for test in HOST_COMPILETESTS { - run = run.path(test.path); - } - run - } - - fn make_run(run: RunConfig) { - let compiler = run.builder.compiler(run.builder.top_stage, run.host); - - let test = run.path.map(|path| { - HOST_COMPILETESTS.iter().find(|&&test| { - path.ends_with(test.path) - }).unwrap_or_else(|| { - panic!("make_run in compile test to receive test path, received {:?}", path); - }) - }); - - if let Some(test) = test { - run.builder.ensure(HostCompiletest { - compiler, - target: run.target, - mode: test.mode, - suite: test.suite, - }); - } else { - for test in HOST_COMPILETESTS { - if test.mode == "pretty" { - continue; - } - run.builder.ensure(HostCompiletest { - compiler, - target: run.target, - mode: test.mode, - suite: test.suite - }); - } - } - } - - fn run(self, builder: &Builder) { - builder.ensure(Compiletest { - compiler: self.compiler, - target: self.target, - mode: self.mode, - suite: self.suite, - }) - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -struct Compiletest { - compiler: Compiler, - target: Interned, - mode: &'static str, - suite: &'static str, -} - -impl Step for Compiletest { - type Output = (); - - fn should_run(run: ShouldRun) -> ShouldRun { - run.never() - } - - /// Executes the `compiletest` tool to run a suite of tests. - /// - /// Compiles all tests with `compiler` for `target` with the specified - /// compiletest `mode` and `suite` arguments. For example `mode` can be - /// "run-pass" or `suite` can be something like `debuginfo`. - fn run(self, builder: &Builder) { - let build = builder.build; - let compiler = self.compiler; let target = self.target; - let mode = self.mode; - let suite = self.suite; - - // Skip codegen tests if they aren't enabled in configuration. - if !build.config.codegen_tests && suite == "codegen" { - return; - } - - if suite == "debuginfo" { - // Skip debuginfo tests on MSVC - if build.build.contains("msvc") { - return; - } - - if mode == "debuginfo-XXX" { - return if build.build.contains("apple") { - builder.ensure(Compiletest { - mode: "debuginfo-lldb", - ..self - }); - } else { - builder.ensure(Compiletest { - mode: "debuginfo-gdb", - ..self - }); - }; - } - - builder.ensure(dist::DebuggerScripts { - sysroot: builder.sysroot(compiler), - host: target - }); - } - - if suite.ends_with("fulldeps") || - // FIXME: Does pretty need librustc compiled? Note that there are - // fulldeps test suites with mode = pretty as well. - mode == "pretty" || - mode == "rustdoc" || - mode == "run-make" { - builder.ensure(compile::Rustc { compiler, target }); - } - - builder.ensure(compile::Test { compiler, target }); - builder.ensure(native::TestHelpers { target }); - builder.ensure(RemoteCopyLibs { compiler, target }); - - let _folder = build.fold_output(|| format!("test_{}", suite)); - println!("Check compiletest suite={} mode={} ({} -> {})", - suite, mode, &compiler.host, target); - let mut cmd = builder.tool_cmd(Tool::Compiletest); - - // compiletest currently has... a lot of arguments, so let's just pass all - // of them! - - cmd.arg("--compile-lib-path").arg(builder.rustc_libdir(compiler)); - cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target)); - cmd.arg("--rustc-path").arg(builder.rustc(compiler)); - - // Avoid depending on rustdoc when we don't need it. - if mode == "rustdoc" || mode == "run-make" { - cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler.host)); - } - - cmd.arg("--src-base").arg(build.src.join("src/test").join(suite)); - cmd.arg("--build-base").arg(testdir(build, compiler.host).join(suite)); - cmd.arg("--stage-id").arg(format!("stage{}-{}", compiler.stage, target)); - cmd.arg("--mode").arg(mode); - cmd.arg("--target").arg(target); - cmd.arg("--host").arg(&*compiler.host); - cmd.arg("--llvm-filecheck").arg(build.llvm_filecheck(build.build)); - - if let Some(ref nodejs) = build.config.nodejs { - cmd.arg("--nodejs").arg(nodejs); - } - - let mut flags = vec!["-Crpath".to_string()]; - if build.config.rust_optimize_tests { - flags.push("-O".to_string()); - } - if build.config.rust_debuginfo_tests { - flags.push("-g".to_string()); - } - - let mut hostflags = build.rustc_flags(compiler.host); - hostflags.extend(flags.clone()); - cmd.arg("--host-rustcflags").arg(hostflags.join(" ")); - - let mut targetflags = build.rustc_flags(target); - targetflags.extend(flags); - targetflags.push(format!("-Lnative={}", - build.test_helpers_out(target).display())); - cmd.arg("--target-rustcflags").arg(targetflags.join(" ")); - - cmd.arg("--docck-python").arg(build.python()); - - if build.build.ends_with("apple-darwin") { - // Force /usr/bin/python on macOS for LLDB tests because we're loading the - // LLDB plugin's compiled module which only works with the system python - // (namely not Homebrew-installed python) - cmd.arg("--lldb-python").arg("/usr/bin/python"); - } else { - cmd.arg("--lldb-python").arg(build.python()); - } - - if let Some(ref gdb) = build.config.gdb { - cmd.arg("--gdb").arg(gdb); - } - if let Some(ref vers) = build.lldb_version { - cmd.arg("--lldb-version").arg(vers); - } - if let Some(ref dir) = build.lldb_python_dir { - cmd.arg("--lldb-python-dir").arg(dir); - } - - cmd.args(&build.config.cmd.test_args()); - - if build.is_verbose() { - cmd.arg("--verbose"); - } - - if build.config.quiet_tests { - cmd.arg("--quiet"); - } - - if build.config.llvm_enabled { - let llvm_config = build.llvm_config(target); - let llvm_version = output(Command::new(&llvm_config).arg("--version")); - cmd.arg("--llvm-version").arg(llvm_version); - if !build.is_rust_llvm(target) { - cmd.arg("--system-llvm"); - } - - // Only pass correct values for these flags for the `run-make` suite as it - // requires that a C++ compiler was configured which isn't always the case. - if suite == "run-make" { - let llvm_components = output(Command::new(&llvm_config).arg("--components")); - let llvm_cxxflags = output(Command::new(&llvm_config).arg("--cxxflags")); - cmd.arg("--cc").arg(build.cc(target)) - .arg("--cxx").arg(build.cxx(target).unwrap()) - .arg("--cflags").arg(build.cflags(target).join(" ")) - .arg("--llvm-components").arg(llvm_components.trim()) - .arg("--llvm-cxxflags").arg(llvm_cxxflags.trim()); - } - } - if suite == "run-make" && !build.config.llvm_enabled { - println!("Ignoring run-make test suite as they generally dont work without LLVM"); - return; - } - - if suite != "run-make" { - cmd.arg("--cc").arg("") - .arg("--cxx").arg("") - .arg("--cflags").arg("") - .arg("--llvm-components").arg("") - .arg("--llvm-cxxflags").arg(""); - } - - if build.remote_tested(target) { - cmd.arg("--remote-test-client").arg(builder.tool_exe(Tool::RemoteTestClient)); - } - - // Running a C compiler on MSVC requires a few env vars to be set, to be - // sure to set them here. - // - // Note that if we encounter `PATH` we make sure to append to our own `PATH` - // rather than stomp over it. - if target.contains("msvc") { - for &(ref k, ref v) in build.cc[&target].0.env() { - if k != "PATH" { - cmd.env(k, v); - } - } - } - cmd.env("RUSTC_BOOTSTRAP", "1"); - build.add_rust_test_threads(&mut cmd); - - if build.config.sanitizers { - cmd.env("SANITIZER_SUPPORT", "1"); - } - - if build.config.profiler { - cmd.env("PROFILER_SUPPORT", "1"); - } - - cmd.arg("--adb-path").arg("adb"); - cmd.arg("--adb-test-dir").arg(ADB_TEST_DIR); - if target.contains("android") { - // Assume that cc for this target comes from the android sysroot - cmd.arg("--android-cross-path") - .arg(build.cc(target).parent().unwrap().parent().unwrap()); - } else { - cmd.arg("--android-cross-path").arg(""); - } - - build.ci_env.force_coloring_in_ci(&mut cmd); - - let _time = util::timeit(); - try_run(build, &mut cmd); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Docs { - compiler: Compiler, -} + let compiler = builder.compiler(0, build.build); -impl Step for Docs { - type Output = (); - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; + let _folder = build.fold_output(|| format!("stage{}-std", compiler.stage)); + println!("Checking std artifacts ({} -> {})", &compiler.host, target); - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/doc") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Docs { - compiler: run.builder.compiler(run.builder.top_stage, run.host), - }); - } - - /// Run `rustdoc --test` for all documentation in `src/doc`. - /// - /// This will run all tests in our markdown documentation (e.g. the book) - /// located in `src/doc`. The `rustdoc` that's run is the one that sits next to - /// `compiler`. - fn run(self, builder: &Builder) { - let build = builder.build; - let compiler = self.compiler; - - builder.ensure(compile::Test { compiler, target: compiler.host }); - - // Do a breadth-first traversal of the `src/doc` directory and just run - // tests for all files that end in `*.md` - let mut stack = vec![build.src.join("src/doc")]; - let _time = util::timeit(); - let _folder = build.fold_output(|| "test_docs"); - - while let Some(p) = stack.pop() { - if p.is_dir() { - stack.extend(t!(p.read_dir()).map(|p| t!(p).path())); - continue - } - - if p.extension().and_then(|s| s.to_str()) != Some("md") { - continue; - } - - // The nostarch directory in the book is for no starch, and so isn't - // guaranteed to build. We don't care if it doesn't build, so skip it. - if p.to_str().map_or(false, |p| p.contains("nostarch")) { - continue; - } - - markdown_test(builder, compiler, &p); - } + let out_dir = build.stage_out(compiler, Mode::Libstd); + build.clear_if_dirty(&out_dir, &builder.rustc(compiler)); + let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "check"); + std_cargo(build, &compiler, target, &mut cargo); + run_cargo(build, + &mut cargo, + &libstd_stamp(build, compiler, target), + true); + let libdir = builder.sysroot_libdir(compiler, target); + add_to_sysroot(&libdir, &libstd_stamp(build, compiler, target)); } } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct ErrorIndex { - compiler: Compiler, +pub struct Rustc { + pub target: Interned, } -impl Step for ErrorIndex { +impl Step for Rustc { type Output = (); - const DEFAULT: bool = true; const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/error_index_generator") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(ErrorIndex { - compiler: run.builder.compiler(run.builder.top_stage, run.host), - }); - } - - /// Run the error index generator tool to execute the tests located in the error - /// index. - /// - /// The `error_index_generator` tool lives in `src/tools` and is used to - /// generate a markdown file from the error indexes of the code base which is - /// then passed to `rustdoc --test`. - fn run(self, builder: &Builder) { - let build = builder.build; - let compiler = self.compiler; - - builder.ensure(compile::Std { compiler, target: compiler.host }); - - let _folder = build.fold_output(|| "test_error_index"); - println!("Testing error-index stage{}", compiler.stage); - - let dir = testdir(build, compiler.host); - t!(fs::create_dir_all(&dir)); - let output = dir.join("error-index.md"); - - let _time = util::timeit(); - build.run(builder.tool_cmd(Tool::ErrorIndex) - .arg("markdown") - .arg(&output) - .env("CFG_BUILD", &build.build)); - - markdown_test(builder, compiler, &output); - } -} - -fn markdown_test(builder: &Builder, compiler: Compiler, markdown: &Path) { - let build = builder.build; - let mut file = t!(File::open(markdown)); - let mut contents = String::new(); - t!(file.read_to_string(&mut contents)); - if !contents.contains("```") { - return; - } - - println!("doc tests for: {}", markdown.display()); - let mut cmd = builder.rustdoc_cmd(compiler.host); - build.add_rust_test_threads(&mut cmd); - cmd.arg("--test"); - cmd.arg(markdown); - cmd.env("RUSTC_BOOTSTRAP", "1"); - - let test_args = build.config.cmd.test_args().join(" "); - cmd.arg("--test-args").arg(test_args); - - if build.config.quiet_tests { - try_run_quiet(build, &mut cmd); - } else { - try_run(build, &mut cmd); - } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct CrateLibrustc { - compiler: Compiler, - target: Interned, - test_kind: TestKind, - krate: Option>, -} - -impl Step for CrateLibrustc { - type Output = (); const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - run.krate("rustc-main") + run.all_krates("rustc-main") } fn make_run(run: RunConfig) { - let builder = run.builder; - let compiler = builder.compiler(builder.top_stage, run.host); - - let make = |name: Option>| { - let test_kind = if builder.kind == Kind::Test { - TestKind::Test - } else if builder.kind == Kind::Bench { - TestKind::Bench - } else { - panic!("unexpected builder.kind in crate: {:?}", builder.kind); - }; - - builder.ensure(CrateLibrustc { - compiler, - target: run.target, - test_kind, - krate: name, - }); - }; - - if let Some(path) = run.path { - for (name, krate_path) in builder.crates("rustc-main") { - if path.ends_with(krate_path) { - make(Some(name)); - } - } - } else { - make(None); - } - } - - - fn run(self, builder: &Builder) { - builder.ensure(Crate { - compiler: self.compiler, - target: self.target, - mode: Mode::Librustc, - test_kind: self.test_kind, - krate: self.krate, + run.builder.ensure(Rustc { + target: run.target, }); } -} - -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Crate { - compiler: Compiler, - target: Interned, - mode: Mode, - test_kind: TestKind, - krate: Option>, -} - -impl Step for Crate { - type Output = (); - const DEFAULT: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.krate("std").krate("test") - } - - fn make_run(run: RunConfig) { - let builder = run.builder; - let compiler = builder.compiler(builder.top_stage, run.host); - - let make = |mode: Mode, name: Option>| { - let test_kind = if builder.kind == Kind::Test { - TestKind::Test - } else if builder.kind == Kind::Bench { - TestKind::Bench - } else { - panic!("unexpected builder.kind in crate: {:?}", builder.kind); - }; - - builder.ensure(Crate { - compiler, - target: run.target, - mode, - test_kind, - krate: name, - }); - }; - - if let Some(path) = run.path { - for (name, krate_path) in builder.crates("std") { - if path.ends_with(krate_path) { - make(Mode::Libstd, Some(name)); - } - } - for (name, krate_path) in builder.crates("test") { - if path.ends_with(krate_path) { - make(Mode::Libtest, Some(name)); - } - } - } else { - make(Mode::Libstd, None); - make(Mode::Libtest, None); - } - } - /// Run all unit tests plus documentation tests for an entire crate DAG defined - /// by a `Cargo.toml` - /// - /// This is what runs tests for crates like the standard library, compiler, etc. - /// It essentially is the driver for running `cargo test`. + /// Build the compiler. /// - /// Currently this runs all tests for a DAG by passing a bunch of `-p foo` - /// arguments, and those arguments are discovered from `cargo metadata`. + /// This will build the compiler for a particular stage of the build using + /// the `compiler` targeting the `target` architecture. The artifacts + /// created will also be linked into the sysroot directory. fn run(self, builder: &Builder) { let build = builder.build; - let compiler = self.compiler; + let compiler = builder.compiler(0, build.build); let target = self.target; - let mode = self.mode; - let test_kind = self.test_kind; - let krate = self.krate; - - builder.ensure(compile::Test { compiler, target }); - builder.ensure(RemoteCopyLibs { compiler, target }); - - // If we're not doing a full bootstrap but we're testing a stage2 version of - // libstd, then what we're actually testing is the libstd produced in - // stage1. Reflect that here by updating the compiler that we're working - // with automatically. - let compiler = if build.force_use_stage1(compiler, target) { - builder.compiler(1, compiler.host) - } else { - compiler.clone() - }; - - let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand()); - let (name, root) = match mode { - Mode::Libstd => { - compile::std_cargo(build, &compiler, target, &mut cargo); - ("libstd", "std") - } - Mode::Libtest => { - compile::test_cargo(build, &compiler, target, &mut cargo); - ("libtest", "test") - } - Mode::Librustc => { - builder.ensure(compile::Rustc { compiler, target }); - compile::rustc_cargo(build, &compiler, target, &mut cargo); - ("librustc", "rustc-main") - } - _ => panic!("can only test libraries"), - }; - let root = INTERNER.intern_string(String::from(root)); - let _folder = build.fold_output(|| { - format!("{}_stage{}-{}", test_kind.subcommand(), compiler.stage, name) - }); - println!("{} {} stage{} ({} -> {})", test_kind, name, compiler.stage, - &compiler.host, target); - - // Build up the base `cargo test` command. - // - // Pass in some standard flags then iterate over the graph we've discovered - // in `cargo metadata` with the maps above and figure out what `-p` - // arguments need to get passed. - if test_kind.subcommand() == "test" && !build.fail_fast { - cargo.arg("--no-fail-fast"); - } - match krate { - Some(krate) => { - cargo.arg("-p").arg(krate); - } - None => { - let mut visited = HashSet::new(); - let mut next = vec![root]; - while let Some(name) = next.pop() { - // Right now jemalloc and the sanitizer crates are - // target-specific crate in the sense that it's not present - // on all platforms. Custom skip it here for now, but if we - // add more this probably wants to get more generalized. - // - // Also skip `build_helper` as it's not compiled normally - // for target during the bootstrap and it's just meant to be - // a helper crate, not tested. If it leaks through then it - // ends up messing with various mtime calculations and such. - if !name.contains("jemalloc") && - *name != *"build_helper" && - !(name.starts_with("rustc_") && name.ends_with("san")) { - cargo.arg("-p").arg(&format!("{}:0.0.0", name)); - } - for dep in build.crates[&name].deps.iter() { - if visited.insert(dep) { - next.push(*dep); - } - } - } - } - } + let _folder = build.fold_output(|| format!("stage{}-rustc", compiler.stage)); + println!("Checking compiler artifacts ({} -> {})", &compiler.host, target); - // The tests are going to run with the *target* libraries, so we need to - // ensure that those libraries show up in the LD_LIBRARY_PATH equivalent. - // - // Note that to run the compiler we need to run with the *host* libraries, - // but our wrapper scripts arrange for that to be the case anyway. - let mut dylib_path = dylib_path(); - dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target))); - cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap()); + let stage_out = builder.stage_out(compiler, Mode::Librustc); + build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target)); + build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target)); - cargo.arg("--"); - cargo.args(&build.config.cmd.test_args()); - - if build.config.quiet_tests { - cargo.arg("--quiet"); - } - - let _time = util::timeit(); - - if target.contains("emscripten") { - cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target)), - build.config.nodejs.as_ref().expect("nodejs not configured")); - } else if build.remote_tested(target) { - cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target)), - format!("{} run", - builder.tool_exe(Tool::RemoteTestClient).display())); - } - try_run(build, &mut cargo); + let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "check"); + rustc_cargo(build, &mut cargo); + run_cargo(build, + &mut cargo, + &librustc_stamp(build, compiler, target), + true); + let libdir = builder.sysroot_libdir(compiler, target); + add_to_sysroot(&libdir, &librustc_stamp(build, compiler, target)); } } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Rustdoc { - host: Interned, - test_kind: TestKind, +pub struct Test { + pub target: Interned, } -impl Step for Rustdoc { +impl Step for Test { type Output = (); const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/librustdoc").path("src/tools/rustdoc") + run.all_krates("test") } fn make_run(run: RunConfig) { - let builder = run.builder; - - let test_kind = if builder.kind == Kind::Test { - TestKind::Test - } else if builder.kind == Kind::Bench { - TestKind::Bench - } else { - panic!("unexpected builder.kind in crate: {:?}", builder.kind); - }; - - builder.ensure(Rustdoc { - host: run.host, - test_kind, + run.builder.ensure(Test { + target: run.target, }); } fn run(self, builder: &Builder) { let build = builder.build; - let test_kind = self.test_kind; - - let compiler = builder.compiler(builder.top_stage, self.host); - let target = compiler.host; - - let mut cargo = tool::prepare_tool_cargo(builder, - compiler, - target, - test_kind.subcommand(), - "src/tools/rustdoc"); - let _folder = build.fold_output(|| { - format!("{}_stage{}-rustdoc", test_kind.subcommand(), compiler.stage) - }); - println!("{} rustdoc stage{} ({} -> {})", test_kind, compiler.stage, - &compiler.host, target); - - if test_kind.subcommand() == "test" && !build.fail_fast { - cargo.arg("--no-fail-fast"); - } - - cargo.arg("-p").arg("rustdoc:0.0.0"); - - cargo.arg("--"); - cargo.args(&build.config.cmd.test_args()); - - if build.config.quiet_tests { - cargo.arg("--quiet"); - } - - let _time = util::timeit(); - - try_run(build, &mut cargo); - } -} - -fn envify(s: &str) -> String { - s.chars().map(|c| { - match c { - '-' => '_', - c => c, - } - }).flat_map(|c| c.to_uppercase()).collect() -} - -/// Some test suites are run inside emulators or on remote devices, and most -/// of our test binaries are linked dynamically which means we need to ship -/// the standard library and such to the emulator ahead of time. This step -/// represents this and is a dependency of all test suites. -/// -/// Most of the time this is a noop. For some steps such as shipping data to -/// QEMU we have to build our own tools so we've got conditional dependencies -/// on those programs as well. Note that the remote test client is built for -/// the build target (us) and the server is built for the target. -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct RemoteCopyLibs { - compiler: Compiler, - target: Interned, -} - -impl Step for RemoteCopyLibs { - type Output = (); - - fn should_run(run: ShouldRun) -> ShouldRun { - run.never() - } - - fn run(self, builder: &Builder) { - let build = builder.build; - let compiler = self.compiler; let target = self.target; - if !build.remote_tested(target) { - return - } - - builder.ensure(compile::Test { compiler, target }); + let compiler = builder.compiler(0, build.build); - println!("REMOTE copy libs to emulator ({})", target); - t!(fs::create_dir_all(build.out.join("tmp"))); - - let server = builder.ensure(tool::RemoteTestServer { compiler, target }); - - // Spawn the emulator and wait for it to come online - let tool = builder.tool_exe(Tool::RemoteTestClient); - let mut cmd = Command::new(&tool); - cmd.arg("spawn-emulator") - .arg(target) - .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 - for f in t!(builder.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(&tool) - .arg("push") - .arg(f.path())); - } - } + let _folder = build.fold_output(|| format!("stage{}-test", compiler.stage)); + println!("Checking test artifacts ({} -> {})", &compiler.host, target); + let out_dir = build.stage_out(compiler, Mode::Libtest); + build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target)); + let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "check"); + test_cargo(build, &compiler, target, &mut cargo); + run_cargo(build, + &mut cargo, + &libtest_stamp(build, compiler, target), + true); + let libdir = builder.sysroot_libdir(compiler, target); + add_to_sysroot(&libdir, &libtest_stamp(build, compiler, target)); } } -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Distcheck; - -impl Step for Distcheck { - type Output = (); - const ONLY_BUILD: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("distcheck") - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Distcheck); - } - - /// Run "distcheck", a 'make check' from a tarball - fn run(self, builder: &Builder) { - let build = builder.build; - - println!("Distcheck"); - let dir = build.out.join("tmp").join("distcheck"); - let _ = fs::remove_dir_all(&dir); - t!(fs::create_dir_all(&dir)); - - // Guarantee that these are built before we begin running. - builder.ensure(dist::PlainSourceTarball); - builder.ensure(dist::Src); - - let mut cmd = Command::new("tar"); - cmd.arg("-xzf") - .arg(builder.ensure(dist::PlainSourceTarball)) - .arg("--strip-components=1") - .current_dir(&dir); - build.run(&mut cmd); - build.run(Command::new("./configure") - .args(&build.config.configure_args) - .arg("--enable-vendor") - .current_dir(&dir)); - build.run(Command::new(build_helper::make(&build.build)) - .arg("check") - .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(builder.ensure(dist::Src)) - .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.initial_cargo) - .arg("generate-lockfile") - .arg("--manifest-path") - .arg(&toml) - .current_dir(&dir)); - } +/// Cargo's output path for the standard library in a given stage, compiled +/// by a particular compiler for the specified target. +pub fn libstd_stamp(build: &Build, compiler: Compiler, target: Interned) -> PathBuf { + build.cargo_out(compiler, Mode::Libstd, target).join(".libstd-check.stamp") } -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub struct Bootstrap; - -impl Step for Bootstrap { - type Output = (); - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; - const ONLY_BUILD: bool = true; - - /// Test the build system itself - fn run(self, builder: &Builder) { - let build = builder.build; - let mut cmd = Command::new(&build.initial_cargo); - cmd.arg("test") - .current_dir(build.src.join("src/bootstrap")) - .env("CARGO_TARGET_DIR", build.out.join("bootstrap")) - .env("RUSTC_BOOTSTRAP", "1") - .env("RUSTC", &build.initial_rustc); - if !build.fail_fast { - cmd.arg("--no-fail-fast"); - } - cmd.arg("--").args(&build.config.cmd.test_args()); - try_run(build, &mut cmd); - } - - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/bootstrap") - } +/// Cargo's output path for libtest in a given stage, compiled by a particular +/// compiler for the specified target. +pub fn libtest_stamp(build: &Build, compiler: Compiler, target: Interned) -> PathBuf { + build.cargo_out(compiler, Mode::Libtest, target).join(".libtest-check.stamp") +} - fn make_run(run: RunConfig) { - run.builder.ensure(Bootstrap); - } +/// Cargo's output path for librustc in a given stage, compiled by a particular +/// compiler for the specified target. +pub fn librustc_stamp(build: &Build, compiler: Compiler, target: Interned) -> PathBuf { + build.cargo_out(compiler, Mode::Librustc, target).join(".librustc-check.stamp") } diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs index 119340a0190c4..87f194fb7d2f8 100644 --- a/src/bootstrap/clean.rs +++ b/src/bootstrap/clean.rs @@ -13,7 +13,7 @@ //! Responsible for cleaning out a build directory of all old and stale //! artifacts to prepare for a fresh build. Currently doesn't remove the //! `build/cache` directory (download cache) or the `build/$target/llvm` -//! directory as we want that cached between builds. +//! directory unless the --all flag is present. use std::fs; use std::io::{self, ErrorKind}; @@ -21,24 +21,29 @@ use std::path::Path; use Build; -pub fn clean(build: &Build) { +pub fn clean(build: &Build, all: bool) { rm_rf("tmp".as_ref()); - rm_rf(&build.out.join("tmp")); - rm_rf(&build.out.join("dist")); - for host in &build.hosts { - let entries = match build.out.join(host).read_dir() { - Ok(iter) => iter, - Err(_) => continue, - }; + if all { + rm_rf(&build.out); + } else { + rm_rf(&build.out.join("tmp")); + rm_rf(&build.out.join("dist")); - for entry in entries { - let entry = t!(entry); - if entry.file_name().to_str() == Some("llvm") { - continue + for host in &build.hosts { + let entries = match build.out.join(host).read_dir() { + Ok(iter) => iter, + Err(_) => continue, + }; + + for entry in entries { + let entry = t!(entry); + if entry.file_name().to_str() == Some("llvm") { + continue + } + let path = t!(entry.path().canonicalize()); + rm_rf(&path); } - let path = t!(entry.path().canonicalize()); - rm_rf(&path); } } } diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 335e1690a2ea0..408d63be6c6bf 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -29,7 +29,7 @@ use build_helper::{output, mtime, up_to_date}; use filetime::FileTime; use serde_json; -use util::{exe, libdir, is_dylib, copy}; +use util::{exe, libdir, is_dylib, copy, read_stamp_file, CiEnv}; use {Build, Compiler, Mode}; use native; use tool; @@ -48,7 +48,7 @@ impl Step for Std { const DEFAULT: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/libstd").krate("std") + run.all_krates("std") } fn make_run(run: RunConfig) { @@ -80,7 +80,7 @@ impl Step for Std { // Even if we're not building std this stage, the new sysroot must // still contain the musl startup objects. - if target.contains("musl") && !target.contains("mips") { + if target.contains("musl") { let libdir = builder.sysroot_libdir(compiler, target); copy_musl_third_party_objects(build, target, &libdir); } @@ -97,18 +97,19 @@ impl Step for Std { println!("Building stage{} std artifacts ({} -> {})", compiler.stage, &compiler.host, target); - if target.contains("musl") && !target.contains("mips") { + if target.contains("musl") { let libdir = builder.sysroot_libdir(compiler, target); copy_musl_third_party_objects(build, target, &libdir); } - let out_dir = build.cargo_out(compiler, Mode::Libstd, target); + let out_dir = build.stage_out(compiler, Mode::Libstd); build.clear_if_dirty(&out_dir, &builder.rustc(compiler)); let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build"); std_cargo(build, &compiler, target, &mut cargo); run_cargo(build, - &mut cargo, - &libstd_stamp(build, compiler, target)); + &mut cargo, + &libstd_stamp(build, compiler, target), + false); builder.ensure(StdLink { compiler: builder.compiler(compiler.stage, build.build), @@ -299,7 +300,11 @@ impl Step for StartupObjects { } for obj in ["crt2.o", "dllcrt2.o"].iter() { - copy(&compiler_file(build.cc(target), obj), &sysroot_dir.join(obj)); + let src = compiler_file(build, + build.cc(target), + target, + obj); + copy(&src, &sysroot_dir.join(obj)); } } } @@ -315,7 +320,7 @@ impl Step for Test { const DEFAULT: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/libtest").krate("test") + run.all_krates("test") } fn make_run(run: RunConfig) { @@ -354,13 +359,14 @@ impl Step for Test { let _folder = build.fold_output(|| format!("stage{}-test", compiler.stage)); println!("Building stage{} test artifacts ({} -> {})", compiler.stage, &compiler.host, target); - let out_dir = build.cargo_out(compiler, Mode::Libtest, target); + let out_dir = build.stage_out(compiler, Mode::Libtest); build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target)); let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "build"); test_cargo(build, &compiler, target, &mut cargo); run_cargo(build, - &mut cargo, - &libtest_stamp(build, compiler, target)); + &mut cargo, + &libtest_stamp(build, compiler, target), + false); builder.ensure(TestLink { compiler: builder.compiler(compiler.stage, build.build), @@ -430,7 +436,7 @@ impl Step for Rustc { const DEFAULT: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/librustc").krate("rustc-main") + run.all_krates("rustc-main") } fn make_run(run: RunConfig) { @@ -452,10 +458,6 @@ impl Step for Rustc { builder.ensure(Test { compiler, target }); - // Build LLVM for our target. This will implicitly build the host LLVM - // if necessary. - builder.ensure(native::Llvm { target }); - if build.force_use_stage1(compiler, target) { builder.ensure(Rustc { compiler: builder.compiler(1, build.build), @@ -480,14 +482,16 @@ impl Step for Rustc { println!("Building stage{} compiler artifacts ({} -> {})", compiler.stage, &compiler.host, target); - let out_dir = build.cargo_out(compiler, Mode::Librustc, target); - build.clear_if_dirty(&out_dir, &libtest_stamp(build, compiler, target)); + let stage_out = builder.stage_out(compiler, Mode::Librustc); + build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target)); + build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target)); let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build"); - rustc_cargo(build, &compiler, target, &mut cargo); + rustc_cargo(build, &mut cargo); run_cargo(build, &mut cargo, - &librustc_stamp(build, compiler, target)); + &librustc_stamp(build, compiler, target), + false); builder.ensure(RustcLink { compiler: builder.compiler(compiler.stage, build.build), @@ -497,15 +501,14 @@ impl Step for Rustc { } } -/// Same as `std_cargo`, but for libtest -pub fn rustc_cargo(build: &Build, - compiler: &Compiler, - target: Interned, - cargo: &mut Command) { +pub fn rustc_cargo(build: &Build, cargo: &mut Command) { cargo.arg("--features").arg(build.rustc_features()) .arg("--manifest-path") .arg(build.src.join("src/rustc/Cargo.toml")); + rustc_cargo_env(build, cargo); +} +fn rustc_cargo_env(build: &Build, cargo: &mut Command) { // Set some configuration variables picked up by build scripts and // the compiler alike cargo.env("CFG_RELEASE", build.rust_release()) @@ -513,13 +516,8 @@ pub fn rustc_cargo(build: &Build, .env("CFG_VERSION", build.rust_version()) .env("CFG_PREFIX", build.config.prefix.clone().unwrap_or_default()); - if compiler.stage == 0 { - cargo.env("CFG_LIBDIR_RELATIVE", "lib"); - } else { - let libdir_relative = - build.config.libdir_relative.clone().unwrap_or(PathBuf::from("lib")); - cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative); - } + let libdir_relative = build.config.libdir_relative().unwrap_or(Path::new("lib")); + cargo.env("CFG_LIBDIR_RELATIVE", libdir_relative); // If we're not building a compiler with debugging information then remove // these two env vars which would be set otherwise. @@ -537,31 +535,11 @@ pub fn rustc_cargo(build: &Build, if !build.unstable_features() { cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1"); } - // Flag that rust llvm is in use - if build.is_rust_llvm(target) { - cargo.env("LLVM_RUSTLLVM", "1"); - } - cargo.env("LLVM_CONFIG", build.llvm_config(target)); - let target_config = build.config.target_config.get(&target); - if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) { - cargo.env("CFG_LLVM_ROOT", s); - } - // Building with a static libstdc++ is only supported on linux right now, - // not for MSVC or macOS - if build.config.llvm_static_stdcpp && - !target.contains("windows") && - !target.contains("apple") { - cargo.env("LLVM_STATIC_STDCPP", - compiler_file(build.cxx(target).unwrap(), "libstdc++.a")); - } - if build.config.llvm_link_shared { - cargo.env("LLVM_LINK_SHARED", "1"); - } if let Some(ref s) = build.config.rustc_default_linker { cargo.env("CFG_DEFAULT_LINKER", s); } - if let Some(ref s) = build.config.rustc_default_ar { - cargo.env("CFG_DEFAULT_AR", s); + if build.config.rustc_parallel_queries { + cargo.env("RUSTC_PARALLEL_QUERIES", "1"); } } @@ -601,6 +579,173 @@ impl Step for RustcLink { } } +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct CodegenBackend { + pub compiler: Compiler, + pub target: Interned, + pub backend: Interned, +} + +impl Step for CodegenBackend { + type Output = (); + const ONLY_HOSTS: bool = true; + const DEFAULT: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.all_krates("rustc_trans") + } + + fn make_run(run: RunConfig) { + let backend = run.builder.config.rust_codegen_backends.get(0); + let backend = backend.cloned().unwrap_or_else(|| { + INTERNER.intern_str("llvm") + }); + run.builder.ensure(CodegenBackend { + compiler: run.builder.compiler(run.builder.top_stage, run.host), + target: run.target, + backend + }); + } + + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = self.compiler; + let target = self.target; + + builder.ensure(Rustc { compiler, target }); + + if build.force_use_stage1(compiler, target) { + builder.ensure(CodegenBackend { + compiler: builder.compiler(1, build.build), + target, + backend: self.backend, + }); + return; + } + + let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build"); + let mut features = build.rustc_features().to_string(); + cargo.arg("--manifest-path") + .arg(build.src.join("src/librustc_trans/Cargo.toml")); + rustc_cargo_env(build, &mut cargo); + + let _folder = build.fold_output(|| format!("stage{}-rustc_trans", compiler.stage)); + + match &*self.backend { + "llvm" | "emscripten" => { + // Build LLVM for our target. This will implicitly build the + // host LLVM if necessary. + let llvm_config = builder.ensure(native::Llvm { + target, + emscripten: self.backend == "emscripten", + }); + + if self.backend == "emscripten" { + features.push_str(" emscripten"); + } + + println!("Building stage{} codegen artifacts ({} -> {}, {})", + compiler.stage, &compiler.host, target, self.backend); + + // Pass down configuration from the LLVM build into the build of + // librustc_llvm and librustc_trans. + if build.is_rust_llvm(target) { + cargo.env("LLVM_RUSTLLVM", "1"); + } + cargo.env("LLVM_CONFIG", &llvm_config); + if self.backend != "emscripten" { + let target_config = build.config.target_config.get(&target); + if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) { + cargo.env("CFG_LLVM_ROOT", s); + } + } + // Building with a static libstdc++ is only supported on linux right now, + // not for MSVC or macOS + if build.config.llvm_static_stdcpp && + !target.contains("freebsd") && + !target.contains("windows") && + !target.contains("apple") { + let file = compiler_file(build, + build.cxx(target).unwrap(), + target, + "libstdc++.a"); + cargo.env("LLVM_STATIC_STDCPP", file); + } + if build.config.llvm_link_shared { + cargo.env("LLVM_LINK_SHARED", "1"); + } + } + _ => panic!("unknown backend: {}", self.backend), + } + + let tmp_stamp = build.cargo_out(compiler, Mode::Librustc, target) + .join(".tmp.stamp"); + let files = run_cargo(build, + cargo.arg("--features").arg(features), + &tmp_stamp, + false); + let mut files = files.into_iter() + .filter(|f| { + let filename = f.file_name().unwrap().to_str().unwrap(); + is_dylib(filename) && filename.contains("rustc_trans-") + }); + let codegen_backend = match files.next() { + Some(f) => f, + None => panic!("no dylibs built for codegen backend?"), + }; + if let Some(f) = files.next() { + panic!("codegen backend built two dylibs:\n{}\n{}", + codegen_backend.display(), + f.display()); + } + let stamp = codegen_backend_stamp(build, compiler, target, self.backend); + let codegen_backend = codegen_backend.to_str().unwrap(); + t!(t!(File::create(&stamp)).write_all(codegen_backend.as_bytes())); + } +} + +/// Creates the `codegen-backends` folder for a compiler that's about to be +/// assembled as a complete compiler. +/// +/// This will take the codegen artifacts produced by `compiler` and link them +/// into an appropriate location for `target_compiler` to be a functional +/// compiler. +fn copy_codegen_backends_to_sysroot(builder: &Builder, + compiler: Compiler, + target_compiler: Compiler) { + let build = builder.build; + let target = target_compiler.host; + + // Note that this step is different than all the other `*Link` steps in + // that it's not assembling a bunch of libraries but rather is primarily + // moving the codegen backend into place. The codegen backend of rustc is + // not linked into the main compiler by default but is rather dynamically + // selected at runtime for inclusion. + // + // Here we're looking for the output dylib of the `CodegenBackend` step and + // we're copying that into the `codegen-backends` folder. + let dst = builder.sysroot_codegen_backends(target_compiler); + t!(fs::create_dir_all(&dst)); + + for backend in builder.config.rust_codegen_backends.iter() { + let stamp = codegen_backend_stamp(build, compiler, target, *backend); + let mut dylib = String::new(); + t!(t!(File::open(&stamp)).read_to_string(&mut dylib)); + let file = Path::new(&dylib); + let filename = file.file_name().unwrap().to_str().unwrap(); + // change `librustc_trans-xxxxxx.so` to `librustc_trans-llvm.so` + let target_filename = { + let dash = filename.find("-").unwrap(); + let dot = filename.find(".").unwrap(); + format!("{}-{}{}", + &filename[..dash], + backend, + &filename[dot..]) + }; + copy(&file, &dst.join(target_filename)); + } +} + /// Cargo's output path for the standard library in a given stage, compiled /// by a particular compiler for the specified target. pub fn libstd_stamp(build: &Build, compiler: Compiler, target: Interned) -> PathBuf { @@ -619,9 +764,22 @@ pub fn librustc_stamp(build: &Build, compiler: Compiler, target: Interned PathBuf { - let out = output(Command::new(compiler) - .arg(format!("-print-file-name={}", file))); +fn codegen_backend_stamp(build: &Build, + compiler: Compiler, + target: Interned, + backend: Interned) -> PathBuf { + build.cargo_out(compiler, Mode::Librustc, target) + .join(format!(".librustc_trans-{}.stamp", backend)) +} + +fn compiler_file(build: &Build, + compiler: &Path, + target: Interned, + file: &str) -> PathBuf { + let mut cmd = Command::new(compiler); + cmd.args(build.cflags(target)); + cmd.arg(format!("-print-file-name={}", file)); + let out = output(&mut cmd); PathBuf::from(out.trim()) } @@ -670,7 +828,7 @@ impl Step for Assemble { type Output = Compiler; fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/rustc") + run.all_krates("rustc-main") } /// Prepare a new compiler from the artifacts in `stage` @@ -690,20 +848,23 @@ impl Step for Assemble { } // Get the compiler that we'll use to bootstrap ourselves. - let build_compiler = if target_compiler.host != build.build { - // Build a compiler for the host platform. We cannot use the stage0 - // compiler for the host platform for this because it doesn't have - // the libraries we need. FIXME: Perhaps we should download those - // libraries? It would make builds faster... - // FIXME: It may be faster if we build just a stage 1 - // compiler and then use that to bootstrap this compiler - // forward. - builder.compiler(target_compiler.stage - 1, build.build) - } else { - // Build the compiler we'll use to build the stage requested. This - // may build more than one compiler (going down to stage 0). - builder.compiler(target_compiler.stage - 1, target_compiler.host) - }; + // + // Note that this is where the recursive nature of the bootstrap + // happens, as this will request the previous stage's compiler on + // downwards to stage 0. + // + // Also note that we're building a compiler for the host platform. We + // only assume that we can run `build` artifacts, which means that to + // produce some other architecture compiler we need to start from + // `build` to get there. + // + // FIXME: Perhaps we should download those libraries? + // It would make builds faster... + // + // FIXME: It may be faster if we build just a stage 1 compiler and then + // use that to bootstrap this compiler forward. + let build_compiler = + builder.compiler(target_compiler.stage - 1, build.build); // Build the libraries for this compiler to link to (i.e., the libraries // it uses at runtime). NOTE: Crates the target compiler compiles don't @@ -721,7 +882,17 @@ impl Step for Assemble { builder.ensure(RustcLink { compiler, target_compiler, target }); } } else { - builder.ensure(Rustc { compiler: build_compiler, target: target_compiler.host }); + builder.ensure(Rustc { + compiler: build_compiler, + target: target_compiler.host, + }); + for &backend in build.config.rust_codegen_backends.iter() { + builder.ensure(CodegenBackend { + compiler: build_compiler, + target: target_compiler.host, + backend, + }); + } } let stage = target_compiler.stage; @@ -740,9 +911,12 @@ impl Step for Assemble { } } - let out_dir = build.cargo_out(build_compiler, Mode::Librustc, host); + copy_codegen_backends_to_sysroot(builder, + build_compiler, + target_compiler); // Link the compiler binary itself into place + let out_dir = build.cargo_out(build_compiler, Mode::Librustc, host); let rustc = out_dir.join(exe("rustc", &*host)); let bindir = sysroot.join("bin"); t!(fs::create_dir_all(&bindir)); @@ -758,17 +932,9 @@ impl Step for Assemble { /// /// For a particular stage this will link the file listed in `stamp` into the /// `sysroot_dst` provided. -fn add_to_sysroot(sysroot_dst: &Path, stamp: &Path) { +pub fn add_to_sysroot(sysroot_dst: &Path, stamp: &Path) { t!(fs::create_dir_all(&sysroot_dst)); - let mut contents = Vec::new(); - t!(t!(File::open(stamp)).read_to_end(&mut contents)); - // This is the method we use for extracting paths from the stamp file passed to us. See - // run_cargo for more information (in this file). - for part in contents.split(|b| *b == 0) { - if part.is_empty() { - continue - } - let path = Path::new(t!(str::from_utf8(part))); + for path in read_stamp_file(stamp) { copy(&path, &sysroot_dst.join(path.file_name().unwrap())); } } @@ -796,13 +962,15 @@ fn stderr_isatty() -> bool { } } -fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { +pub fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path, is_check: bool) + -> Vec +{ // Instruct Cargo to give us json messages on stdout, critically leaving // stderr as piped so we can get those pretty colors. cargo.arg("--message-format").arg("json") .stdout(Stdio::piped()); - if stderr_isatty() { + if stderr_isatty() && build.ci_env == CiEnv::None { // since we pass message-format=json to cargo, we need to tell the rustc // wrapper to give us colored output if necessary. This is because we // only want Cargo's JSON output, not rustcs. @@ -840,6 +1008,10 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { continue }; if json["reason"].as_str() != Some("compiler-artifact") { + if build.config.rustc_error_format.as_ref().map_or(false, |e| e == "json") { + // most likely not a cargo message, so let's send it out as well + println!("{}", line); + } continue } for filename in json["filenames"].as_array().unwrap() { @@ -847,7 +1019,8 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { // Skip files like executables if !filename.ends_with(".rlib") && !filename.ends_with(".lib") && - !is_dylib(&filename) { + !is_dylib(&filename) && + !(is_check && filename.ends_with(".rmeta")) { continue } @@ -870,10 +1043,19 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { // have a hash in the name, but there's a version of this file in // the `deps` folder which *does* have a hash in the name. That's // the one we'll want to we'll probe for it later. - toplevel.push((filename.file_stem().unwrap() - .to_str().unwrap().to_string(), - filename.extension().unwrap().to_owned() - .to_str().unwrap().to_string())); + // + // We do not use `Path::file_stem` or `Path::extension` here, + // because some generated files may have multiple extensions e.g. + // `std-.dll.lib` on Windows. The aforementioned methods only + // split the file name by the last extension (`.lib`) while we need + // to split by all extensions (`.dll.lib`). + let expected_len = t!(filename.metadata()).len(); + let filename = filename.file_name().unwrap().to_str().unwrap(); + let mut parts = filename.splitn(2, '.'); + let file_stem = parts.next().unwrap().to_owned(); + let extension = parts.next().unwrap().to_owned(); + + toplevel.push((file_stem, extension, expected_len)); } } @@ -893,11 +1075,12 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { .map(|e| t!(e)) .map(|e| (e.path(), e.file_name().into_string().unwrap(), t!(e.metadata()))) .collect::>(); - for (prefix, extension) in toplevel { - let candidates = contents.iter().filter(|&&(_, ref filename, _)| { + for (prefix, extension, expected_len) in toplevel { + let candidates = contents.iter().filter(|&&(_, ref filename, ref meta)| { filename.starts_with(&prefix[..]) && filename[prefix.len()..].starts_with("-") && - filename.ends_with(&extension[..]) + filename.ends_with(&extension[..]) && + meta.len() == expected_len }); let max = candidates.max_by_key(|&&(_, _, ref metadata)| { FileTime::from_last_modification_time(metadata) @@ -929,8 +1112,8 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { let mut new_contents = Vec::new(); let mut max = None; let mut max_path = None; - for dep in deps { - let mtime = mtime(&dep); + for dep in deps.iter() { + let mtime = mtime(dep); if Some(mtime) > max { max = Some(mtime); max_path = Some(dep.clone()); @@ -941,7 +1124,9 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { let max = max.unwrap(); let max_path = max_path.unwrap(); if stamp_contents == new_contents && max <= stamp_mtime { - return + build.verbose(&format!("not updating {:?}; contents equal and {} <= {}", + stamp, max, stamp_mtime)); + return deps } if max > stamp_mtime { build.verbose(&format!("updating {:?} as {:?} changed", stamp, max_path)); @@ -949,4 +1134,5 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { build.verbose(&format!("updating {:?} as deps changed", stamp)); } t!(t!(File::create(stamp)).write_all(&new_contents)); + deps } diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index c8b2ed042c119..6bc20181a0330 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -13,11 +13,11 @@ //! This module implements parsing `config.toml` configuration files to tweak //! how the build runs. -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use std::env; use std::fs::File; use std::io::prelude::*; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use std::process; use std::cmp; @@ -27,7 +27,6 @@ use util::exe; use cache::{INTERNER, Interned}; use flags::Flags; pub use flags::Subcommand; -use toolstate::ToolStates; /// Global configuration for the entire build and/or bootstrap. /// @@ -53,9 +52,12 @@ pub struct Config { pub target_config: HashMap, Target>, pub full_bootstrap: bool, pub extended: bool, + pub tools: Option>, pub sanitizers: bool, pub profiler: bool, pub ignore_git: bool, + pub exclude: Vec, + pub rustc_error_format: Option, pub run_host_only: bool, @@ -76,22 +78,24 @@ pub struct Config { pub llvm_static_stdcpp: bool, pub llvm_link_shared: bool, pub llvm_targets: Option, - pub llvm_experimental_targets: Option, + pub llvm_experimental_targets: String, pub llvm_link_jobs: Option, // rust codegen options pub rust_optimize: bool, - pub rust_codegen_units: u32, + pub rust_codegen_units: Option, + pub rust_thinlto: bool, pub rust_debug_assertions: bool, pub rust_debuginfo: bool, pub rust_debuginfo_lines: bool, pub rust_debuginfo_only_std: bool, pub rust_rpath: bool, + pub rustc_parallel_queries: bool, pub rustc_default_linker: Option, - pub rustc_default_ar: Option, pub rust_optimize_tests: bool, pub rust_debuginfo_tests: bool, pub rust_dist_src: bool, + pub rust_codegen_backends: Vec>, pub build: Interned, pub hosts: Vec>, @@ -107,12 +111,15 @@ pub struct Config { pub debug_jemalloc: bool, pub use_jemalloc: bool, pub backtrace: bool, // support for RUST_BACKTRACE + pub wasm_syscall: bool, // misc pub low_priority: bool, pub channel: String, pub quiet_tests: bool, pub test_miri: bool, + pub save_toolstates: Option, + // Fallback musl-root for all targets pub musl_root: Option, pub prefix: Option, @@ -120,7 +127,6 @@ pub struct Config { pub docdir: Option, pub bindir: Option, pub libdir: Option, - pub libdir_relative: Option, pub mandir: Option, pub codegen_tests: bool, pub nodejs: Option, @@ -132,8 +138,6 @@ pub struct Config { // These are either the stage0 downloaded binaries or the locally installed ones. pub initial_cargo: PathBuf, pub initial_rustc: PathBuf, - - pub toolstate: ToolStates, } /// Per-target configuration stored in the global configuration structure. @@ -144,6 +148,8 @@ pub struct Target { pub jemalloc: Option, pub cc: Option, pub cxx: Option, + pub ar: Option, + pub linker: Option, pub ndk: Option, pub crt_static: Option, pub musl_root: Option, @@ -188,6 +194,7 @@ struct Build { python: Option, full_bootstrap: Option, extended: Option, + tools: Option>, verbose: Option, sanitizers: Option, profiler: Option, @@ -206,6 +213,11 @@ struct Install { bindir: Option, libdir: Option, mandir: Option, + + // standard paths, currently unused + datadir: Option, + infodir: Option, + localstatedir: Option, } /// TOML representation of how the LLVM build is configured. @@ -254,15 +266,16 @@ impl Default for StringOrBool { struct Rust { optimize: Option, codegen_units: Option, + thinlto: Option, debug_assertions: Option, debuginfo: Option, debuginfo_lines: Option, debuginfo_only_std: Option, + experimental_parallel_queries: Option, debug_jemalloc: Option, use_jemalloc: Option, backtrace: Option, default_linker: Option, - default_ar: Option, channel: Option, musl_root: Option, rpath: Option, @@ -274,6 +287,9 @@ struct Rust { dist_src: Option, quiet_tests: Option, test_miri: Option, + save_toolstates: Option, + codegen_backends: Option>, + wasm_syscall: Option, } /// TOML representation of how each build target is configured. @@ -284,6 +300,8 @@ struct TomlTarget { jemalloc: Option, cc: Option, cxx: Option, + ar: Option, + linker: Option, android_ndk: Option, crt_static: Option, musl_root: Option, @@ -295,8 +313,10 @@ impl Config { let flags = Flags::parse(&args); let file = flags.config.clone(); let mut config = Config::default(); + config.exclude = flags.exclude; config.llvm_enabled = true; config.llvm_optimize = true; + config.llvm_version_check = true; config.use_jemalloc = true; config.backtrace = true; config.rust_optimize = true; @@ -304,13 +324,14 @@ impl Config { config.submodules = true; config.docs = true; config.rust_rpath = true; - config.rust_codegen_units = 1; config.channel = "dev".to_string(); config.codegen_tests = true; config.ignore_git = false; config.rust_dist_src = true; config.test_miri = false; + config.rust_codegen_backends = vec![INTERNER.intern_str("llvm")]; + config.rustc_error_format = flags.rustc_error_format; config.on_fail = flags.on_fail; config.stage = flags.stage; config.src = flags.src; @@ -336,18 +357,6 @@ impl Config { } }).unwrap_or_else(|| TomlConfig::default()); - let toolstate_toml_path = config.src.join("src/tools/toolstate.toml"); - let parse_toolstate = || -> Result<_, Box<::std::error::Error>> { - let mut f = File::open(toolstate_toml_path)?; - let mut contents = String::new(); - f.read_to_string(&mut contents)?; - Ok(toml::from_str(&contents)?) - }; - config.toolstate = parse_toolstate().unwrap_or_else(|err| { - println!("failed to parse TOML configuration 'toolstate.toml': {}", err); - process::exit(2); - }); - let build = toml.build.clone().unwrap_or(Build::default()); set(&mut config.build, build.build.clone().map(|x| INTERNER.intern_string(x))); set(&mut config.build, flags.build); @@ -392,6 +401,7 @@ impl Config { set(&mut config.vendor, build.vendor); set(&mut config.full_bootstrap, build.full_bootstrap); set(&mut config.extended, build.extended); + config.tools = build.tools; set(&mut config.verbose, build.verbose); set(&mut config.sanitizers, build.sanitizers); set(&mut config.profiler, build.profiler); @@ -411,6 +421,7 @@ impl Config { // Store off these values as options because if they're not provided // we'll infer default values for them later + let mut thinlto = None; let mut llvm_assertions = None; let mut debuginfo_lines = None; let mut debuginfo_only_std = None; @@ -440,7 +451,8 @@ impl Config { set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp); set(&mut config.llvm_link_shared, llvm.link_shared); config.llvm_targets = llvm.targets.clone(); - config.llvm_experimental_targets = llvm.experimental_targets.clone(); + config.llvm_experimental_targets = llvm.experimental_targets.clone() + .unwrap_or("WebAssembly".to_string()); config.llvm_link_jobs = llvm.link_jobs; } @@ -453,6 +465,7 @@ impl Config { optimize = rust.optimize; ignore_git = rust.ignore_git; debug_jemalloc = rust.debug_jemalloc; + thinlto = rust.thinlto; set(&mut config.rust_optimize_tests, rust.optimize_tests); set(&mut config.rust_debuginfo_tests, rust.debuginfo_tests); set(&mut config.codegen_tests, rust.codegen_tests); @@ -463,13 +476,21 @@ impl Config { set(&mut config.rust_dist_src, rust.dist_src); set(&mut config.quiet_tests, rust.quiet_tests); set(&mut config.test_miri, rust.test_miri); + set(&mut config.wasm_syscall, rust.wasm_syscall); + config.rustc_parallel_queries = rust.experimental_parallel_queries.unwrap_or(false); config.rustc_default_linker = rust.default_linker.clone(); - config.rustc_default_ar = rust.default_ar.clone(); config.musl_root = rust.musl_root.clone().map(PathBuf::from); + config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from); + + if let Some(ref backends) = rust.codegen_backends { + config.rust_codegen_backends = backends.iter() + .map(|s| INTERNER.intern_str(s)) + .collect(); + } match rust.codegen_units { - Some(0) => config.rust_codegen_units = num_cpus::get() as u32, - Some(n) => config.rust_codegen_units = n, + Some(0) => config.rust_codegen_units = Some(num_cpus::get() as u32), + Some(n) => config.rust_codegen_units = Some(n), None => {} } } @@ -487,8 +508,10 @@ impl Config { if let Some(ref s) = cfg.android_ndk { target.ndk = Some(env::current_dir().unwrap().join(s)); } - target.cxx = cfg.cxx.clone().map(PathBuf::from); target.cc = cfg.cc.clone().map(PathBuf::from); + target.cxx = cfg.cxx.clone().map(PathBuf::from); + target.ar = cfg.ar.clone().map(PathBuf::from); + target.linker = cfg.linker.clone().map(PathBuf::from); target.crt_static = cfg.crt_static.clone(); target.musl_root = cfg.musl_root.clone().map(PathBuf::from); target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from); @@ -520,13 +543,14 @@ impl Config { // Now that we've reached the end of our configuration, infer the // default values for all options that we haven't otherwise stored yet. - let default = config.channel == "nightly"; + let default = false; config.llvm_assertions = llvm_assertions.unwrap_or(default); let default = match &config.channel[..] { "stable" | "beta" | "nightly" => true, _ => false, }; + config.rust_thinlto = thinlto.unwrap_or(true); config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default); config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default); @@ -542,6 +566,17 @@ impl Config { config } + /// Try to find the relative path of `libdir`. + pub fn libdir_relative(&self) -> Option<&Path> { + let libdir = self.libdir.as_ref()?; + if libdir.is_relative() { + Some(libdir) + } else { + // Try to make it relative to the prefix. + libdir.strip_prefix(self.prefix.as_ref()?).ok() + } + } + pub fn verbose(&self) -> bool { self.verbose > 0 } diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py index 2438be89776da..99a3ee4e4c369 100755 --- a/src/bootstrap/configure.py +++ b/src/bootstrap/configure.py @@ -11,6 +11,7 @@ # ignore-tidy-linelength +from __future__ import absolute_import, division, print_function import sys import os rust_dir = os.path.dirname(os.path.abspath(__file__)) @@ -19,21 +20,26 @@ sys.path.append(os.path.join(rust_dir, "src", "bootstrap")) import bootstrap -class Option: + +class Option(object): def __init__(self, name, rustbuild, desc, value): self.name = name self.rustbuild = rustbuild self.desc = desc self.value = value + options = [] + def o(*args): options.append(Option(*args, value=False)) + def v(*args): options.append(Option(*args, value=True)) + o("debug", "rust.debug", "debug mode; disables optimization unless `--enable-optimize` given") o("docs", "build.docs", "build standard library documentation") o("compiler-docs", "build.compiler-docs", "build compiler documentation") @@ -59,10 +65,12 @@ def v(*args): o("dist-src", "rust.dist-src", "when building tarballs enables building a source tarball") o("cargo-openssl-static", "build.openssl-static", "static openssl in cargo") o("profiler", "build.profiler", "build the profiler runtime") +o("emscripten", None, "compile the emscripten backend as well as LLVM") # Optimization and debugging options. These may be overridden by the release # channel, etc. o("optimize", "rust.optimize", "build optimized rust code") +o("thinlto", "rust.thinlto", "build Rust with ThinLTO enabled") o("optimize-llvm", "llvm.optimize", "build optimized LLVM") o("llvm-assertions", "llvm.assertions", "build LLVM with assertions") o("debug-assertions", "rust.debug-assertions", "build with debugging assertions") @@ -71,6 +79,7 @@ def v(*args): o("debuginfo-lines", "rust.debuginfo-lines", "build with line number debugger metadata") o("debuginfo-only-std", "rust.debuginfo-only-std", "build only libstd with debugging information") o("debug-jemalloc", "rust.debug-jemalloc", "build jemalloc with --enable-debug --enable-fill") +v("save-toolstates", "rust.save-toolstates", "save build and test status of external tools into this file") v("prefix", "install.prefix", "set installation prefix") v("localstatedir", "install.localstatedir", "local state directory") @@ -101,6 +110,8 @@ def v(*args): "MUSL root installation directory (deprecated)") v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root", "x86_64-unknown-linux-musl install directory") +v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root", + "i586-unknown-linux-musl install directory") v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root", "i686-unknown-linux-musl install directory") v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root", @@ -109,6 +120,12 @@ def v(*args): "arm-unknown-linux-musleabihf install directory") v("musl-root-armv7", "target.armv7-unknown-linux-musleabihf.musl-root", "armv7-unknown-linux-musleabihf install directory") +v("musl-root-aarch64", "target.aarch64-unknown-linux-musl.musl-root", + "aarch64-unknown-linux-musl install directory") +v("musl-root-mips", "target.mips-unknown-linux-musl.musl-root", + "mips-unknown-linux-musl install directory") +v("musl-root-mipsel", "target.mipsel-unknown-linux-musl.musl-root", + "mipsel-unknown-linux-musl install directory") v("qemu-armhf-rootfs", "target.arm-unknown-linux-gnueabihf.qemu-rootfs", "rootfs in qemu testing, you probably don't want to use this") v("qemu-aarch64-rootfs", "target.aarch64-unknown-linux-gnu.qemu-rootfs", @@ -117,9 +134,8 @@ def v(*args): "experimental LLVM targets to build") v("release-channel", "rust.channel", "the name of the release channel to build") -# Used on systems where "cc" and "ar" are unavailable +# Used on systems where "cc" is unavailable v("default-linker", "rust.default-linker", "the default linker") -v("default-ar", "rust.default-ar", "the default ar") # Many of these are saved below during the "writing configuration" step # (others are conditionally saved). @@ -128,19 +144,23 @@ def v(*args): o("full-bootstrap", "build.full-bootstrap", "build three compilers instead of two") o("extended", "build.extended", "build an extended rust tool set") +v("tools", "build.tools", "List of extended tools will be installed") v("build", "build.build", "GNUs ./configure syntax LLVM build triple") v("host", None, "GNUs ./configure syntax LLVM host triples") v("target", None, "GNUs ./configure syntax LLVM target triples") v("set", None, "set arbitrary key/value pairs in TOML configuration") + def p(msg): print("configure: " + msg) + def err(msg): print("configure: error: " + msg) sys.exit(1) + if '--help' in sys.argv or '-h' in sys.argv: print('Usage: ./configure [options]') print('') @@ -206,7 +226,7 @@ def err(msg): continue found = True - if not option.name in known_args: + if option.name not in known_args: known_args[option.name] = [] known_args[option.name].append((option, value)) break @@ -215,7 +235,12 @@ def err(msg): unknown_args.append(arg) p("") -if 'option-checking' not in known_args or known_args['option-checking'][1]: +# Note: here and a few other places, we use [-1] to apply the *last* value +# passed. But if option-checking is enabled, then the known_args loop will +# also assert that options are only passed once. +option_checking = ('option-checking' not in known_args + or known_args['option-checking'][-1][1]) +if option_checking: if len(unknown_args) > 0: err("Option '" + unknown_args[0] + "' is not recognized") if len(need_value_args) > 0: @@ -225,27 +250,30 @@ def err(msg): # TOML we're going to write out config = {} + def build(): if 'build' in known_args: - return known_args['build'][0][1] + return known_args['build'][-1][1] return bootstrap.default_build_triple() + def set(key, value): - s = "{:20} := {}".format(key, value) - if len(s) < 70: - p(s) - else: - p(s[:70] + " ...") - - arr = config - parts = key.split('.') - for i, part in enumerate(parts): - if i == len(parts) - 1: - arr[part] = value - else: - if not part in arr: - arr[part] = {} - arr = arr[part] + s = "{:20} := {}".format(key, value) + if len(s) < 70: + p(s) + else: + p(s[:70] + " ...") + + arr = config + parts = key.split('.') + for i, part in enumerate(parts): + if i == len(parts) - 1: + arr[part] = value + else: + if part not in arr: + arr[part] = {} + arr = arr[part] + for key in known_args: # The `set` option is special and can be passed a bunch of times @@ -263,9 +291,9 @@ def set(key, value): # Ensure each option is only passed once arr = known_args[key] - if len(arr) > 1: + if option_checking and len(arr) > 1: err("Option '{}' provided more than once".format(key)) - option, value = arr[0] + option, value = arr[-1] # If we have a clear avenue to set our value in rustbuild, do so if option.rustbuild is not None: @@ -296,6 +324,8 @@ def set(key, value): set('build.host', value.split(',')) elif option.name == 'target': set('build.target', value.split(',')) + elif option.name == 'emscripten': + set('rust.codegen-backends', ['llvm', 'emscripten']) elif option.name == 'option-checking': # this was handled above pass @@ -343,8 +373,9 @@ def set(key, value): targets[target] = sections['target'][:] targets[target][0] = targets[target][0].replace("x86_64-unknown-linux-gnu", target) + # Here we walk through the constructed configuration we have from the parsed -# command line arguemnts. We then apply each piece of configuration by +# command line arguments. We then apply each piece of configuration by # basically just doing a `sed` to change the various configuration line to what # we've got configure. def to_toml(value): @@ -358,7 +389,8 @@ def to_toml(value): elif isinstance(value, str): return "'" + value + "'" else: - raise 'no toml' + raise RuntimeError('no toml') + def configure_section(lines, config): for key in config: @@ -373,10 +405,11 @@ def configure_section(lines, config): if not found: raise RuntimeError("failed to find config line for {}".format(key)) + for section_key in config: section_config = config[section_key] - if not section_key in sections: - raise RuntimeError("config key {} not in sections".format(key)) + if section_key not in sections: + raise RuntimeError("config key {} not in sections".format(section_key)) if section_key == 'target': for target in section_config: @@ -405,11 +438,6 @@ def configure_section(lines, config): contents = contents.replace("$(CFG_PYTHON)", sys.executable) f.write(contents) -# Finally, clean up with a bit of a help message -relpath = os.path.dirname(__file__) -if relpath == '': - relpath = '.' - p("") -p("run `python {}/x.py --help`".format(relpath)) +p("run `python {}/x.py --help`".format(rust_dir)) p("") diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 5188604b0a69a..e7aed7eb4fead 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -28,17 +28,21 @@ use build_helper::output; use {Build, Compiler, Mode}; use channel; -use util::{cp_r, libdir, is_dylib, cp_filtered, copy}; +use util::{cp_r, libdir, is_dylib, cp_filtered, copy, replace_in_file}; use builder::{Builder, RunConfig, ShouldRun, Step}; use compile; +use native; use tool::{self, Tool}; use cache::{INTERNER, Interned}; +use time; pub fn pkgname(build: &Build, component: &str) -> String { if component == "cargo" { format!("{}-{}", component, build.cargo_package_vers()) } else if component == "rls" { format!("{}-{}", component, build.rls_package_vers()) + } else if component == "rustfmt" { + format!("{}-{}", component, build.rustfmt_package_vers()) } else { assert!(component.starts_with("rust")); format!("{}-{}", component, build.rust_package_vers()) @@ -176,7 +180,7 @@ fn make_win_dist( } } - let target_tools = ["gcc.exe", "ld.exe", "ar.exe", "dlltool.exe", "libwinpthread-1.dll"]; + let target_tools = ["gcc.exe", "ld.exe", "dlltool.exe", "libwinpthread-1.dll"]; let mut rustc_dlls = vec!["libstdc++-6.dll", "libwinpthread-1.dll"]; if target_triple.starts_with("i686-") { rustc_dlls.push("libgcc_s_dw2-1.dll"); @@ -222,6 +226,8 @@ fn make_win_dist( "libwinspool.a", "libws2_32.a", "libwsock32.a", + "libdbghelp.a", + "libmsimg32.a", ]; //Find mingw artifacts we want to bundle @@ -430,9 +436,30 @@ impl Step for Rustc { } } + // Copy over the codegen backends + let backends_src = builder.sysroot_codegen_backends(compiler); + let backends_rel = backends_src.strip_prefix(&src).unwrap(); + let backends_dst = image.join(&backends_rel); + t!(fs::create_dir_all(&backends_dst)); + cp_r(&backends_src, &backends_dst); + // Man pages t!(fs::create_dir_all(image.join("share/man/man1"))); - cp_r(&build.src.join("src/doc/man"), &image.join("share/man/man1")); + let man_src = build.src.join("src/doc/man"); + let man_dst = image.join("share/man/man1"); + let month_year = t!(time::strftime("%B %Y", &time::now())); + // don't use our `bootstrap::util::{copy, cp_r}`, because those try + // to hardlink, and we don't want to edit the source templates + for entry_result in t!(fs::read_dir(man_src)) { + let file_entry = t!(entry_result); + let page_src = file_entry.path(); + let page_dst = man_dst.join(file_entry.file_name()); + t!(fs::copy(&page_src, &page_dst)); + // template in month/year and version number + replace_in_file(&page_dst, + &[("", &month_year), + ("", channel::CFG_RELEASE_NUM)]); + } // Debugger scripts builder.ensure(DebuggerScripts { @@ -487,6 +514,7 @@ impl Step for DebuggerScripts { install(&build.src.join("src/etc/rust-windbg.cmd"), &sysroot.join("bin"), 0o755); + cp_debugger_script("natvis/intrinsic.natvis"); cp_debugger_script("natvis/liballoc.natvis"); cp_debugger_script("natvis/libcore.natvis"); } else { @@ -561,7 +589,9 @@ impl Step for Std { t!(fs::create_dir_all(&dst)); let mut src = builder.sysroot_libdir(compiler, target).to_path_buf(); src.pop(); // Remove the trailing /lib folder from the sysroot_libdir - cp_r(&src, &dst); + cp_filtered(&src, &dst, &|path| { + path.file_name().and_then(|s| s.to_str()) != Some("codegen-backends") + }); let mut cmd = rust_installer(builder); cmd.arg("generate") @@ -630,7 +660,7 @@ impl Step for Analysis { let image = tmpdir(build).join(format!("{}-{}-image", name, target)); let src = build.stage_out(compiler, Mode::Libstd) - .join(target).join("release").join("deps"); + .join(target).join(build.cargo_dir()).join("deps"); let image_src = src.join("save-analysis"); let dst = image.join("lib/rustlib").join(target).join("analysis"); @@ -670,6 +700,9 @@ fn copy_src_dirs(build: &Build, src_dirs: &[&str], exclude_dirs: &[&str], dst_di spath.ends_with(".s")) { return false } + if spath.contains("test/emscripten") || spath.contains("test\\emscripten") { + return false + } let full_path = Path::new(dir).join(path); if exclude_dirs.iter().any(|excl| full_path == Path::new(excl)) { @@ -734,17 +767,16 @@ impl Step for Src { // (essentially libstd and all of its path dependencies) let std_src_dirs = [ "src/build_helper", + "src/dlmalloc", "src/liballoc", "src/liballoc_jemalloc", "src/liballoc_system", "src/libbacktrace", - "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", @@ -754,6 +786,7 @@ impl Step for Src { "src/libunwind", "src/rustc/compiler_builtins_shim", "src/rustc/libc_shim", + "src/rustc/dlmalloc_shim", "src/libtest", "src/libterm", "src/jemalloc", @@ -866,6 +899,12 @@ impl Step for PlainSourceTarball { .arg("--vers").arg(CARGO_VENDOR_VERSION) .arg("cargo-vendor") .env("RUSTC", &build.initial_rustc); + if let Some(dir) = build.openssl_install_dir(build.config.build) { + builder.ensure(native::Openssl { + target: build.config.build, + }); + cmd.env("OPENSSL_DIR", dir); + } build.run(&mut cmd); } @@ -1035,7 +1074,7 @@ pub struct Rls { } impl Step for Rls { - type Output = PathBuf; + type Output = Option; const ONLY_BUILD_TARGETS: bool = true; const ONLY_HOSTS: bool = true; @@ -1050,7 +1089,7 @@ impl Step for Rls { }); } - fn run(self, builder: &Builder) -> PathBuf { + fn run(self, builder: &Builder) -> Option { let build = builder.build; let stage = self.stage; let target = self.target; @@ -1068,10 +1107,13 @@ impl Step for Rls { t!(fs::create_dir_all(&image)); // Prepare the image directory + // We expect RLS to build, because we've exited this step above if tool + // state for RLS isn't testing. let rls = builder.ensure(tool::Rls { compiler: builder.compiler(stage, build.build), target - }); + }).or_else(|| { println!("Unable to build RLS, skipping dist"); None })?; + install(&rls, &image.join("bin"), 0o755); let doc = image.join("share/doc/rls"); install(&src.join("README.md"), &doc, 0o644); @@ -1098,44 +1140,99 @@ impl Step for Rls { .arg("--output-dir").arg(&distdir(build)) .arg("--non-installed-overlay").arg(&overlay) .arg(format!("--package-name={}-{}", name, target)) - .arg("--legacy-manifest-dirs=rustlib,cargo"); - - if build.config.channel == "nightly" { - cmd.arg("--component-name=rls"); - } else { - cmd.arg("--component-name=rls-preview"); - } + .arg("--legacy-manifest-dirs=rustlib,cargo") + .arg("--component-name=rls-preview"); build.run(&mut cmd); - distdir(build).join(format!("{}-{}.tar.gz", name, target)) + Some(distdir(build).join(format!("{}-{}.tar.gz", name, target))) } } #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct DontDistWithMiriEnabled; +pub struct Rustfmt { + pub stage: u32, + pub target: Interned, +} -impl Step for DontDistWithMiriEnabled { - type Output = PathBuf; - const DEFAULT: bool = true; +impl Step for Rustfmt { + type Output = Option; + const ONLY_BUILD_TARGETS: bool = true; + const ONLY_HOSTS: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - let build_miri = run.builder.build.config.test_miri; - run.default_condition(build_miri) + run.path("rustfmt") } fn make_run(run: RunConfig) { - run.builder.ensure(DontDistWithMiriEnabled); + run.builder.ensure(Rustfmt { + stage: run.builder.top_stage, + target: run.target, + }); } - fn run(self, _: &Builder) -> PathBuf { - panic!("Do not distribute with miri enabled.\n\ - The distributed libraries would include all MIR (increasing binary size). - The distributed MIR would include validation statements."); + fn run(self, builder: &Builder) -> Option { + let build = builder.build; + let stage = self.stage; + let target = self.target; + assert!(build.config.extended); + + println!("Dist Rustfmt stage{} ({})", stage, target); + let src = build.src.join("src/tools/rustfmt"); + let release_num = build.release_num("rustfmt"); + let name = pkgname(build, "rustfmt"); + let version = build.rustfmt_info.version(build, &release_num); + + let tmp = tmpdir(build); + let image = tmp.join("rustfmt-image"); + drop(fs::remove_dir_all(&image)); + t!(fs::create_dir_all(&image)); + + // Prepare the image directory + let rustfmt = builder.ensure(tool::Rustfmt { + compiler: builder.compiler(stage, build.build), + target + }).or_else(|| { println!("Unable to build Rustfmt, skipping dist"); None })?; + let cargofmt = builder.ensure(tool::Cargofmt { + compiler: builder.compiler(stage, build.build), + target + }).or_else(|| { println!("Unable to build Cargofmt, skipping dist"); None })?; + + install(&rustfmt, &image.join("bin"), 0o755); + install(&cargofmt, &image.join("bin"), 0o755); + let doc = image.join("share/doc/rustfmt"); + 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("rustfmt-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 = rust_installer(builder); + cmd.arg("generate") + .arg("--product-name=Rust") + .arg("--rel-manifest-dir=rustlib") + .arg("--success-message=rustfmt-ready-to-fmt.") + .arg("--image-dir").arg(&image) + .arg("--work-dir").arg(&tmpdir(build)) + .arg("--output-dir").arg(&distdir(build)) + .arg("--non-installed-overlay").arg(&overlay) + .arg(format!("--package-name={}-{}", name, target)) + .arg("--legacy-manifest-dirs=rustlib,cargo") + .arg("--component-name=rustfmt-preview"); + + build.run(&mut cmd); + Some(distdir(build).join(format!("{}-{}.tar.gz", name, target))) } } - #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct Extended { stage: u32, @@ -1174,6 +1271,7 @@ impl Step for Extended { compiler: builder.compiler(stage, target), }); let cargo_installer = builder.ensure(Cargo { stage, target }); + let rustfmt_installer = builder.ensure(Rustfmt { stage, target }); let rls_installer = builder.ensure(Rls { stage, target }); let mingw_installer = builder.ensure(Mingw { host: target }); let analysis_installer = builder.ensure(Analysis { @@ -1207,8 +1305,13 @@ impl Step for Extended { // upgrades rustc was upgraded before rust-std. To avoid rustc clobbering // the std files during uninstall. To do this ensure that rustc comes // before rust-std in the list below. - let mut tarballs = vec![rustc_installer, cargo_installer, rls_installer, - analysis_installer, std_installer]; + let mut tarballs = Vec::new(); + tarballs.push(rustc_installer); + tarballs.push(cargo_installer); + tarballs.extend(rls_installer.clone()); + tarballs.extend(rustfmt_installer.clone()); + tarballs.push(analysis_installer); + tarballs.push(std_installer); if build.config.docs { tarballs.push(docs_installer); } @@ -1250,35 +1353,41 @@ impl Step for Extended { } rtf.push_str("}"); + fn filter(contents: &str, marker: &str) -> String { + let start = format!("tool-{}-start", marker); + let end = format!("tool-{}-end", marker); + let mut lines = Vec::new(); + let mut omitted = false; + for line in contents.lines() { + if line.contains(&start) { + omitted = true; + } else if line.contains(&end) { + omitted = false; + } else if !omitted { + lines.push(line); + } + } + + lines.join("\n") + } + + let xform = |p: &Path| { + let mut contents = String::new(); + t!(t!(File::open(p)).read_to_string(&mut contents)); + if rls_installer.is_none() { + contents = filter(&contents, "rls"); + } + if rustfmt_installer.is_none() { + contents = filter(&contents, "rustfmt"); + } + let ret = tmp.join(p.file_name().unwrap()); + t!(t!(File::create(&ret)).write_all(contents.as_bytes())); + return ret + }; + if target.contains("apple-darwin") { let pkg = tmp.join("pkg"); let _ = fs::remove_dir_all(&pkg); - t!(fs::create_dir_all(pkg.join("rustc"))); - t!(fs::create_dir_all(pkg.join("cargo"))); - t!(fs::create_dir_all(pkg.join("rust-docs"))); - t!(fs::create_dir_all(pkg.join("rust-std"))); - t!(fs::create_dir_all(pkg.join("rls"))); - t!(fs::create_dir_all(pkg.join("rust-analysis"))); - - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rustc"), target)), - &pkg.join("rustc")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "cargo"), target)), - &pkg.join("cargo")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-docs"), target)), - &pkg.join("rust-docs")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target)), - &pkg.join("rust-std")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target)), - &pkg.join("rls")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target)), - &pkg.join("rust-analysis")); - - install(&etc.join("pkg/postinstall"), &pkg.join("rustc"), 0o755); - install(&etc.join("pkg/postinstall"), &pkg.join("cargo"), 0o755); - install(&etc.join("pkg/postinstall"), &pkg.join("rust-docs"), 0o755); - install(&etc.join("pkg/postinstall"), &pkg.join("rust-std"), 0o755); - install(&etc.join("pkg/postinstall"), &pkg.join("rls"), 0o755); - install(&etc.join("pkg/postinstall"), &pkg.join("rust-analysis"), 0o755); let pkgbuild = |component: &str| { let mut cmd = Command::new("pkgbuild"); @@ -1288,12 +1397,23 @@ impl Step for Extended { .arg(pkg.join(component).with_extension("pkg")); build.run(&mut cmd); }; - pkgbuild("rustc"); - pkgbuild("cargo"); - pkgbuild("rust-docs"); - pkgbuild("rust-std"); - pkgbuild("rls"); - pkgbuild("rust-analysis"); + + let prepare = |name: &str| { + t!(fs::create_dir_all(pkg.join(name))); + cp_r(&work.join(&format!("{}-{}", pkgname(build, name), target)), + &pkg.join(name)); + install(&etc.join("pkg/postinstall"), &pkg.join(name), 0o755); + pkgbuild(name); + }; + prepare("rustc"); + prepare("cargo"); + prepare("rust-docs"); + prepare("rust-std"); + prepare("rust-analysis"); + + if rls_installer.is_some() { + prepare("rls"); + } // create an 'uninstall' package install(&etc.join("pkg/postinstall"), &pkg.join("uninstall"), 0o755); @@ -1303,7 +1423,7 @@ impl Step for Extended { t!(t!(File::create(pkg.join("res/LICENSE.txt"))).write_all(license.as_bytes())); install(&etc.join("gfx/rust-logo.png"), &pkg.join("res"), 0o644); let mut cmd = Command::new("productbuild"); - cmd.arg("--distribution").arg(etc.join("pkg/Distribution.xml")) + cmd.arg("--distribution").arg(xform(&etc.join("pkg/Distribution.xml"))) .arg("--resources").arg(pkg.join("res")) .arg(distdir(build).join(format!("{}-{}.pkg", pkgname(build, "rust"), @@ -1315,50 +1435,34 @@ impl Step for Extended { if target.contains("windows") { let exe = tmp.join("exe"); let _ = fs::remove_dir_all(&exe); - t!(fs::create_dir_all(exe.join("rustc"))); - t!(fs::create_dir_all(exe.join("cargo"))); - t!(fs::create_dir_all(exe.join("rls"))); - t!(fs::create_dir_all(exe.join("rust-analysis"))); - t!(fs::create_dir_all(exe.join("rust-docs"))); - t!(fs::create_dir_all(exe.join("rust-std"))); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rustc"), target)) - .join("rustc"), - &exe.join("rustc")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "cargo"), target)) - .join("cargo"), - &exe.join("cargo")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-docs"), target)) - .join("rust-docs"), - &exe.join("rust-docs")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target)) - .join(format!("rust-std-{}", target)), - &exe.join("rust-std")); - let rls_path = if build.config.channel == "nightly" { - work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls") - } else { - work.join(&format!("{}-{}", pkgname(build, "rls"), target)).join("rls-preview") - }; - cp_r(&rls_path, &exe.join("rls")); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target)) - .join(format!("rust-analysis-{}", target)), - &exe.join("rust-analysis")); - - t!(fs::remove_file(exe.join("rustc/manifest.in"))); - t!(fs::remove_file(exe.join("cargo/manifest.in"))); - t!(fs::remove_file(exe.join("rust-docs/manifest.in"))); - t!(fs::remove_file(exe.join("rust-std/manifest.in"))); - t!(fs::remove_file(exe.join("rls/manifest.in"))); - t!(fs::remove_file(exe.join("rust-analysis/manifest.in"))); + let prepare = |name: &str| { + t!(fs::create_dir_all(exe.join(name))); + let dir = if name == "rust-std" || name == "rust-analysis" { + format!("{}-{}", name, target) + } else if name == "rls" { + "rls-preview".to_string() + } else { + name.to_string() + }; + cp_r(&work.join(&format!("{}-{}", pkgname(build, name), target)) + .join(dir), + &exe.join(name)); + t!(fs::remove_file(exe.join(name).join("manifest.in"))); + }; + prepare("rustc"); + prepare("cargo"); + prepare("rust-analysis"); + prepare("rust-docs"); + prepare("rust-std"); + if rls_installer.is_some() { + prepare("rls"); + } if target.contains("windows-gnu") { - t!(fs::create_dir_all(exe.join("rust-mingw"))); - cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-mingw"), target)) - .join("rust-mingw"), - &exe.join("rust-mingw")); - t!(fs::remove_file(exe.join("rust-mingw/manifest.in"))); + prepare("rust-mingw"); } - install(&etc.join("exe/rust.iss"), &exe, 0o644); + install(&xform(&etc.join("exe/rust.iss")), &exe, 0o644); install(&etc.join("exe/modpath.iss"), &exe, 0o644); install(&etc.join("exe/upgrade.iss"), &exe, 0o644); install(&etc.join("gfx/rust-logo.ico"), &exe, 0o644); @@ -1422,16 +1526,18 @@ impl Step for Extended { .arg("-dr").arg("Std") .arg("-var").arg("var.StdDir") .arg("-out").arg(exe.join("StdGroup.wxs"))); - build.run(Command::new(&heat) - .current_dir(&exe) - .arg("dir") - .arg("rls") - .args(&heat_flags) - .arg("-cg").arg("RlsGroup") - .arg("-dr").arg("Rls") - .arg("-var").arg("var.RlsDir") - .arg("-out").arg(exe.join("RlsGroup.wxs")) - .arg("-t").arg(etc.join("msi/remove-duplicates.xsl"))); + if rls_installer.is_some() { + build.run(Command::new(&heat) + .current_dir(&exe) + .arg("dir") + .arg("rls") + .args(&heat_flags) + .arg("-cg").arg("RlsGroup") + .arg("-dr").arg("Rls") + .arg("-var").arg("var.RlsDir") + .arg("-out").arg(exe.join("RlsGroup.wxs")) + .arg("-t").arg(etc.join("msi/remove-duplicates.xsl"))); + } build.run(Command::new(&heat) .current_dir(&exe) .arg("dir") @@ -1465,26 +1571,30 @@ impl Step for Extended { .arg("-dDocsDir=rust-docs") .arg("-dCargoDir=cargo") .arg("-dStdDir=rust-std") - .arg("-dRlsDir=rls") .arg("-dAnalysisDir=rust-analysis") .arg("-arch").arg(&arch) .arg("-out").arg(&output) .arg(&input); add_env(build, &mut cmd, target); + if rls_installer.is_some() { + cmd.arg("-dRlsDir=rls"); + } if target.contains("windows-gnu") { cmd.arg("-dGccDir=rust-mingw"); } build.run(&mut cmd); }; - candle(&etc.join("msi/rust.wxs")); + candle(&xform(&etc.join("msi/rust.wxs"))); candle(&etc.join("msi/ui.wxs")); candle(&etc.join("msi/rustwelcomedlg.wxs")); candle("RustcGroup.wxs".as_ref()); candle("DocsGroup.wxs".as_ref()); candle("CargoGroup.wxs".as_ref()); candle("StdGroup.wxs".as_ref()); - candle("RlsGroup.wxs".as_ref()); + if rls_installer.is_some() { + candle("RlsGroup.wxs".as_ref()); + } candle("AnalysisGroup.wxs".as_ref()); if target.contains("windows-gnu") { @@ -1508,10 +1618,13 @@ impl Step for Extended { .arg("DocsGroup.wixobj") .arg("CargoGroup.wixobj") .arg("StdGroup.wixobj") - .arg("RlsGroup.wixobj") .arg("AnalysisGroup.wixobj") .current_dir(&exe); + if rls_installer.is_some() { + cmd.arg("RlsGroup.wixobj"); + } + if target.contains("windows-gnu") { cmd.arg("GccGroup.wixobj"); } @@ -1530,7 +1643,6 @@ fn add_env(build: &Build, cmd: &mut Command, target: Interned) { cmd.env("CFG_RELEASE_INFO", build.rust_version()) .env("CFG_RELEASE_NUM", channel::CFG_RELEASE_NUM) .env("CFG_RELEASE", build.rust_release()) - .env("CFG_PRERELEASE_VERSION", channel::CFG_PRERELEASE_VERSION) .env("CFG_VER_MAJOR", parts.next().unwrap()) .env("CFG_VER_MINOR", parts.next().unwrap()) .env("CFG_VER_PATCH", parts.next().unwrap()) @@ -1595,6 +1707,7 @@ impl Step for HashSign { cmd.arg(build.rust_package_vers()); cmd.arg(build.package_vers(&build.release_num("cargo"))); cmd.arg(build.package_vers(&build.release_num("rls"))); + cmd.arg(build.package_vers(&build.release_num("rustfmt"))); cmd.arg(addr); t!(fs::create_dir_all(distdir(build))); diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index b9a52a66793df..55d9723527e6d 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -12,7 +12,7 @@ //! //! This module implements generation for all bits and pieces of documentation //! for the Rust project. This notably includes suites like the rust book, the -//! nomicon, standalone documentation, etc. +//! nomicon, rust by example, standalone documentation, etc. //! //! Everything here is basically just a shim around calling either `rustbook` or //! `rustdoc`. @@ -66,9 +66,10 @@ macro_rules! book { } book!( - Nomicon, "src/doc/book", "nomicon"; + Nomicon, "src/doc/nomicon", "nomicon"; Reference, "src/doc/reference", "reference"; Rustdoc, "src/doc/rustdoc", "rustdoc"; + RustByExample, "src/doc/rust-by-example", "rust-by-example"; ); #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -132,6 +133,52 @@ impl Step for UnstableBook { } } +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct CargoBook { + target: Interned, + name: Interned, +} + +impl Step for CargoBook { + type Output = (); + const DEFAULT: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + let builder = run.builder; + run.path("src/tools/cargo/src/doc/book").default_condition(builder.build.config.docs) + } + + fn make_run(run: RunConfig) { + run.builder.ensure(CargoBook { + target: run.target, + name: INTERNER.intern_str("cargo"), + }); + } + + fn run(self, builder: &Builder) { + let build = builder.build; + + let target = self.target; + let name = self.name; + let src = build.src.join("src/tools/cargo/src/doc"); + + let out = build.doc_out(target); + t!(fs::create_dir_all(&out)); + + let out = out.join(name); + + println!("Cargo Book ({}) - {}", target, name); + + let _ = fs::remove_dir_all(&out); + + build.run(builder.tool_cmd(Tool::Rustbook) + .arg("build") + .arg(&src) + .arg("-d") + .arg(out)); + } +} + #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] struct RustbookSrc { target: Interned, @@ -205,10 +252,12 @@ impl Step for TheBook { /// /// * Book (first edition) /// * Book (second edition) + /// * Version info and CSS /// * Index page /// * Redirect pages fn run(self, builder: &Builder) { let build = builder.build; + let compiler = self.compiler; let target = self.target; let name = self.name; // build book first edition @@ -223,10 +272,16 @@ impl Step for TheBook { name: INTERNER.intern_string(format!("{}/second-edition", name)), }); + // build the version info page and CSS + builder.ensure(Standalone { + compiler, + target, + }); + // build the index page let index = format!("{}/index.md", name); println!("Documenting book index ({})", target); - invoke_rustdoc(builder, self.compiler, target, &index); + invoke_rustdoc(builder, compiler, target, &index); // build the redirect pages println!("Documenting book redirect pages ({})", target); @@ -235,56 +290,11 @@ impl Step for TheBook { let path = file.path(); let path = path.to_str().unwrap(); - invoke_rustdoc(builder, self.compiler, target, path); + invoke_rustdoc(builder, compiler, target, path); } } } -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct CargoBook { - target: Interned, -} - -impl Step for CargoBook { - type Output = (); - const DEFAULT: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - let builder = run.builder; - run.path("src/doc/cargo").default_condition(builder.build.config.docs) - } - - fn make_run(run: RunConfig) { - run.builder.ensure(CargoBook { - target: run.target, - }); - } - - /// Create a placeholder for the cargo documentation so that doc.rust-lang.org/cargo will - /// redirect to doc.crates.io. We want to publish doc.rust-lang.org/cargo in the paper - /// version of the book, but we don't want to rush the process of switching cargo's docs - /// over to mdbook and deploying them. When the cargo book is ready, this implementation - /// should build the mdbook instead of this redirect page. - fn run(self, builder: &Builder) { - let build = builder.build; - let out = build.doc_out(self.target); - - let cargo_dir = out.join("cargo"); - t!(fs::create_dir_all(&cargo_dir)); - - let index = cargo_dir.join("index.html"); - let redirect_html = r#" - - - - - "#; - - println!("Creating cargo book redirect page"); - t!(t!(File::create(&index)).write_all(redirect_html.as_bytes())); - } -} - fn invoke_rustdoc(builder: &Builder, compiler: Compiler, target: Interned, markdown: &str) { let build = builder.build; let out = build.doc_out(target); @@ -293,25 +303,12 @@ fn invoke_rustdoc(builder: &Builder, compiler: Compiler, target: Interned, + pub stage: u32, + pub target: Interned, } impl Step for Std { @@ -432,7 +429,7 @@ impl Step for Std { fn should_run(run: ShouldRun) -> ShouldRun { let builder = run.builder; - run.krate("std").default_condition(builder.build.config.docs) + run.all_krates("std").default_condition(builder.build.config.docs) } fn make_run(run: RunConfig) { @@ -490,7 +487,7 @@ impl Step for Std { // for which docs must be built. if !build.config.compiler_docs { cargo.arg("--no-deps"); - for krate in &["alloc", "collections", "core", "std", "std_unicode"] { + for krate in &["alloc", "core", "std", "std_unicode"] { cargo.arg("-p").arg(krate); // Create all crate output directories first to make sure rustdoc uses // relative links. @@ -620,14 +617,12 @@ impl Step for Rustc { t!(symlink_dir_force(&my_out, &out_dir)); let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "doc"); - compile::rustc_cargo(build, &compiler, target, &mut cargo); + compile::rustc_cargo(build, &mut cargo); if build.config.compiler_docs { - // src/rustc/Cargo.toml contains bin crates called rustc and rustdoc - // which would otherwise overwrite the docs for the real rustc and - // rustdoc lib crates. - cargo.arg("-p").arg("rustc_driver") - .arg("-p").arg("rustdoc"); + // src/rustc/Cargo.toml contains a bin crate called rustc which + // would otherwise overwrite the docs for the real rustc lib crate. + cargo.arg("-p").arg("rustc_driver"); } else { // Like with libstd above if compiler docs aren't enabled then we're not // documenting internal dependencies, so we have a whitelist. @@ -677,7 +672,8 @@ impl Step for ErrorIndex { index.arg(out.join("error-index.html")); // FIXME: shouldn't have to pass this env var - index.env("CFG_BUILD", &build.build); + index.env("CFG_BUILD", &build.build) + .env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir()); build.run(&mut index); } diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 7546d7fd4f07a..af50ad1e96b9f 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -42,25 +42,34 @@ pub struct Flags { pub jobs: Option, pub cmd: Subcommand, pub incremental: bool, + pub exclude: Vec, + pub rustc_error_format: Option, } pub enum Subcommand { Build { paths: Vec, }, + Check { + paths: Vec, + }, Doc { paths: Vec, }, Test { paths: Vec, test_args: Vec, + rustc_args: Vec, fail_fast: bool, + doc_tests: bool, }, Bench { paths: Vec, test_args: Vec, }, - Clean, + Clean { + all: bool, + }, Dist { paths: Vec, }, @@ -85,6 +94,7 @@ Usage: x.py [options] [...] Subcommands: build Compile either the compiler or libraries + check Compile either the compiler or libraries, using cargo check test Build and run some test suites bench Build and run some benchmarks doc Build documentation @@ -102,12 +112,14 @@ To learn more about a subcommand, run `./x.py -h`"); opts.optopt("", "build", "build target of the stage0 compiler", "BUILD"); opts.optmulti("", "host", "host targets to build", "HOST"); opts.optmulti("", "target", "target targets to build", "TARGET"); + opts.optmulti("", "exclude", "build paths to exclude", "PATH"); opts.optopt("", "on-fail", "command to run on failure", "CMD"); opts.optopt("", "stage", "stage to build", "N"); opts.optopt("", "keep-stage", "stage to keep without recompiling", "N"); opts.optopt("", "src", "path to the root of the rust checkout", "DIR"); opts.optopt("j", "jobs", "number of jobs to run in parallel", "JOBS"); opts.optflag("h", "help", "print this help message"); + opts.optopt("", "error-format", "rustc error format", "FORMAT"); // fn usage() let usage = |exit_code: i32, opts: &Options, subcommand_help: &str, extra_help: &str| -> ! { @@ -125,6 +137,7 @@ To learn more about a subcommand, run `./x.py -h`"); // there on out. let subcommand = args.iter().find(|&s| (s == "build") + || (s == "check") || (s == "test") || (s == "bench") || (s == "doc") @@ -134,9 +147,12 @@ To learn more about a subcommand, run `./x.py -h`"); let subcommand = match subcommand { Some(s) => s, None => { - // No subcommand -- show the general usage and subcommand help + // No or an invalid subcommand -- show the general usage and subcommand help + // An exit code will be 0 when no subcommand is given, and 1 in case of an invalid + // subcommand. println!("{}\n", subcommand_help); - process::exit(1); + let exit_code = if args.is_empty() { 0 } else { 1 }; + process::exit(exit_code); } }; @@ -145,8 +161,16 @@ To learn more about a subcommand, run `./x.py -h`"); "test" => { opts.optflag("", "no-fail-fast", "Run all tests regardless of failure"); opts.optmulti("", "test-args", "extra arguments", "ARGS"); + opts.optmulti( + "", + "rustc-args", + "extra options to pass the compiler when running tests", + "ARGS", + ); + opts.optflag("", "doc", "run doc tests"); }, "bench" => { opts.optmulti("", "test-args", "extra arguments", "ARGS"); }, + "clean" => { opts.optflag("", "all", "clean all build artifacts"); }, _ => { }, }; @@ -204,6 +228,21 @@ Arguments: arguments would), and then use the compiler built in stage 0 to build src/libtest and its dependencies. Once this is done, build/$ARCH/stage1 contains a usable compiler."); + } + "check" => { + subcommand_help.push_str("\n +Arguments: + This subcommand accepts a number of paths to directories to the crates + and/or artifacts to compile. For example: + + ./x.py check src/libcore + ./x.py check src/libcore src/libproc_macro + + If no arguments are passed then the complete artifacts are compiled: std, test, and rustc. Note + also that since we use `cargo check`, by default this will automatically enable incremental + compilation, so there's no need to pass it separately, though it won't hurt. We also completely + ignore the stage passed, as there's no way to compile in non-stage 0 without actually building + the compiler."); } "test" => { subcommand_help.push_str("\n @@ -240,7 +279,10 @@ Arguments: }; // 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::>(); + let src = matches.opt_str("src").map(PathBuf::from) + .or_else(|| env::var_os("SRC").map(PathBuf::from)) + .unwrap_or(cwd.clone()); + let paths = matches.free[1..].iter().map(|p| p.into()).collect::>(); let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| { if fs::metadata("config.toml").is_ok() { @@ -250,7 +292,7 @@ Arguments: } }); - // All subcommands can have an optional "Available paths" section + // All subcommands except `clean` can have an optional "Available paths" section if matches.opt_present("verbose") { let config = Config::parse(&["build".to_string()]); let mut build = Build::new(config); @@ -258,9 +300,10 @@ Arguments: let maybe_rules_help = Builder::get_help(&build, subcommand.as_str()); extra_help.push_str(maybe_rules_help.unwrap_or_default().as_str()); - } else { - extra_help.push_str(format!("Run `./x.py {} -h -v` to see a list of available paths.", - subcommand).as_str()); + } else if subcommand.as_str() != "clean" { + extra_help.push_str(format!( + "Run `./x.py {} -h -v` to see a list of available paths.", + subcommand).as_str()); } // User passed in -h/--help? @@ -272,11 +315,16 @@ Arguments: "build" => { Subcommand::Build { paths: paths } } + "check" => { + Subcommand::Check { paths: paths } + } "test" => { Subcommand::Test { paths, test_args: matches.opt_strs("test-args"), + rustc_args: matches.opt_strs("rustc-args"), fail_fast: !matches.opt_present("no-fail-fast"), + doc_tests: matches.opt_present("doc"), } } "bench" => { @@ -290,10 +338,13 @@ Arguments: } "clean" => { if paths.len() > 0 { - println!("\nclean takes no arguments\n"); + println!("\nclean does not take a path argument\n"); usage(1, &opts, &subcommand_help, &extra_help); } - Subcommand::Clean + + Subcommand::Clean { + all: matches.opt_present("all"), + } } "dist" => { Subcommand::Dist { @@ -317,15 +368,11 @@ Arguments: stage = Some(1); } - let cwd = t!(env::current_dir()); - let src = matches.opt_str("src").map(PathBuf::from) - .or_else(|| env::var_os("SRC").map(PathBuf::from)) - .unwrap_or(cwd); - Flags { verbose: matches.opt_count("verbose"), stage, on_fail: matches.opt_str("on-fail"), + rustc_error_format: matches.opt_str("error-format"), keep_stage: matches.opt_str("keep-stage").map(|j| j.parse().unwrap()), build: matches.opt_str("build").map(|s| INTERNER.intern_string(s)), host: split(matches.opt_strs("host")) @@ -333,10 +380,12 @@ Arguments: target: split(matches.opt_strs("target")) .into_iter().map(|x| INTERNER.intern_string(x)).collect::>(), config: cfg_file, - src, jobs: matches.opt_str("jobs").map(|j| j.parse().unwrap()), cmd, incremental: matches.opt_present("incremental"), + exclude: split(matches.opt_strs("exclude")) + .into_iter().map(|p| p.into()).collect::>(), + src, } } } @@ -352,12 +401,28 @@ impl Subcommand { } } + pub fn rustc_args(&self) -> Vec<&str> { + match *self { + Subcommand::Test { ref rustc_args, .. } => { + rustc_args.iter().flat_map(|s| s.split_whitespace()).collect() + } + _ => Vec::new(), + } + } + pub fn fail_fast(&self) -> bool { match *self { Subcommand::Test { fail_fast, .. } => fail_fast, _ => false, } } + + pub fn doc_tests(&self) -> bool { + match *self { + Subcommand::Test { doc_tests, .. } => doc_tests, + _ => false, + } + } } fn split(s: Vec) -> Vec { diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs index 608924c9c28d1..20f7d379a6967 100644 --- a/src/bootstrap/install.rs +++ b/src/bootstrap/install.rs @@ -22,15 +22,14 @@ use dist::{self, pkgname, sanitize_sh, tmpdir}; use builder::{Builder, RunConfig, ShouldRun, Step}; use cache::Interned; +use config::Config; pub fn install_docs(builder: &Builder, stage: u32, host: Interned) { install_sh(builder, "docs", "rust-docs", stage, Some(host)); } -pub fn install_std(builder: &Builder, stage: u32) { - for target in &builder.build.targets { - install_sh(builder, "std", "rust-std", stage, Some(*target)); - } +pub fn install_std(builder: &Builder, stage: u32, target: Interned) { + install_sh(builder, "std", "rust-std", stage, Some(target)); } pub fn install_cargo(builder: &Builder, stage: u32, host: Interned) { @@ -41,6 +40,10 @@ pub fn install_rls(builder: &Builder, stage: u32, host: Interned) { install_sh(builder, "rls", "rls", stage, Some(host)); } +pub fn install_rustfmt(builder: &Builder, stage: u32, host: Interned) { + install_sh(builder, "rustfmt", "rustfmt", stage, Some(host)); +} + pub fn install_analysis(builder: &Builder, stage: u32, host: Interned) { install_sh(builder, "analysis", "rust-analysis", stage, Some(host)); } @@ -142,6 +145,19 @@ macro_rules! install { pub host: Interned, } + impl $name { + #[allow(dead_code)] + fn should_build(config: &Config) -> bool { + config.extended && config.tools.as_ref() + .map_or(true, |t| t.contains($path)) + } + + #[allow(dead_code)] + fn should_install(builder: &Builder) -> bool { + builder.config.tools.as_ref().map_or(false, |t| t.contains($path)) + } + } + impl Step for $name { type Output = (); const DEFAULT: bool = true; @@ -175,28 +191,42 @@ install!((self, builder, _config), install_docs(builder, self.stage, self.target); }; Std, "src/libstd", true, only_hosts: true, { - builder.ensure(dist::Std { - compiler: builder.compiler(self.stage, self.host), - target: self.target - }); - install_std(builder, self.stage); + for target in &builder.build.targets { + builder.ensure(dist::Std { + compiler: builder.compiler(self.stage, self.host), + target: *target + }); + install_std(builder, self.stage, *target); + } }; - Cargo, "cargo", _config.extended, only_hosts: true, { + Cargo, "cargo", Self::should_build(_config), only_hosts: true, { builder.ensure(dist::Cargo { stage: self.stage, target: self.target }); install_cargo(builder, self.stage, self.target); }; - Rls, "rls", _config.extended, only_hosts: true, { - builder.ensure(dist::Rls { stage: self.stage, target: self.target }); - install_rls(builder, self.stage, self.target); + Rls, "rls", Self::should_build(_config), only_hosts: true, { + if builder.ensure(dist::Rls { stage: self.stage, target: self.target }).is_some() || + Self::should_install(builder) { + install_rls(builder, self.stage, self.target); + } else { + println!("skipping Install RLS stage{} ({})", self.stage, self.target); + } + }; + Rustfmt, "rustfmt", Self::should_build(_config), only_hosts: true, { + if builder.ensure(dist::Rustfmt { stage: self.stage, target: self.target }).is_some() || + Self::should_install(builder) { + install_rustfmt(builder, self.stage, self.target); + } else { + println!("skipping Install Rustfmt stage{} ({})", self.stage, self.target); + } }; - Analysis, "analysis", _config.extended, only_hosts: false, { + Analysis, "analysis", Self::should_build(_config), only_hosts: false, { builder.ensure(dist::Analysis { compiler: builder.compiler(self.stage, self.host), target: self.target }); install_analysis(builder, self.stage, self.target); }; - Src, "src", _config.extended, only_hosts: true, { + Src, "src", Self::should_build(_config) , only_hosts: true, { builder.ensure(dist::Src); install_src(builder, self.stage); }, ONLY_BUILD; diff --git a/src/bootstrap/job.rs b/src/bootstrap/job.rs index 72a5d1338b8d0..fa3ba02482f56 100644 --- a/src/bootstrap/job.rs +++ b/src/bootstrap/job.rs @@ -185,7 +185,7 @@ pub unsafe fn setup(build: &mut Build) { 0, FALSE, DUPLICATE_SAME_ACCESS); // If this failed, well at least we tried! An example of DuplicateHandle - // failing in the past has been when the wrong python2 package spawed this + // failing in the past has been when the wrong python2 package spawned this // build system (e.g. the `python2` package in MSYS instead of // `mingw-w64-x86_64-python2`. Not sure why it failed, but the "failure // mode" here is that we only clean everything up when the build system diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 06c7c4c2faffc..90f50275b6bb4 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -113,9 +113,8 @@ //! More documentation can be found in each respective module below, and you can //! also check out the `src/bootstrap/README.md` file for more information. -#![deny(warnings)] -#![allow(stable_features)] -#![feature(associated_consts)] +//#![deny(warnings)] +#![feature(core_intrinsics)] #[macro_use] extern crate build_helper; @@ -126,15 +125,16 @@ extern crate lazy_static; extern crate serde_json; extern crate cmake; extern crate filetime; -extern crate gcc; +extern crate cc; extern crate getopts; extern crate num_cpus; extern crate toml; +extern crate time; #[cfg(unix)] extern crate libc; -use std::cell::RefCell; +use std::cell::{RefCell, Cell}; use std::collections::{HashSet, HashMap}; use std::env; use std::fs::{self, File}; @@ -143,14 +143,14 @@ use std::path::{PathBuf, Path}; use std::process::{self, Command}; use std::slice; -use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime, - BuildExpectation}; +use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppressed, output, mtime}; use util::{exe, libdir, OutputFolder, CiEnv}; -mod cc; +mod cc_detect; mod channel; mod check; +mod test; mod clean; mod compile; mod metadata; @@ -190,6 +190,7 @@ mod job { pub use config::Config; use flags::Subcommand; use cache::{Interned, INTERNER}; +use toolstate::ToolState; /// A structure representing a Rust compiler. /// @@ -222,8 +223,10 @@ pub struct Build { rust_info: channel::GitInfo, cargo_info: channel::GitInfo, rls_info: channel::GitInfo, + rustfmt_info: channel::GitInfo, local_rebuild: bool, fail_fast: bool, + doc_tests: bool, verbosity: usize, // Targets for which to build. @@ -240,14 +243,16 @@ pub struct Build { lldb_python_dir: Option, // Runtime state filled in later on - // target -> (cc, ar) - cc: HashMap, (gcc::Tool, Option)>, - // host -> (cc, ar) - cxx: HashMap, gcc::Tool>, + // C/C++ compilers and archiver for all targets + cc: HashMap, cc::Tool>, + cxx: HashMap, cc::Tool>, + ar: HashMap, PathBuf>, + // Misc crates: HashMap, Crate>, is_sudo: bool, ci_env: CiEnv, delayed_failures: RefCell>, + prerelease_version: Cell>, } #[derive(Debug)] @@ -262,6 +267,18 @@ struct Crate { bench_step: String, } +impl Crate { + fn is_local(&self, build: &Build) -> bool { + self.path.starts_with(&build.config.src) && + !self.path.to_string_lossy().ends_with("_shim") + } + + fn local_path(&self, build: &Build) -> PathBuf { + assert!(self.is_local(build)); + self.path.strip_prefix(&build.config.src).unwrap().into() + } +} + /// The various "modes" of invoking Cargo. /// /// These entries currently correspond to the various output directories of the @@ -303,12 +320,14 @@ impl Build { let rust_info = channel::GitInfo::new(&config, &src); let cargo_info = channel::GitInfo::new(&config, &src.join("src/tools/cargo")); let rls_info = channel::GitInfo::new(&config, &src.join("src/tools/rls")); + let rustfmt_info = channel::GitInfo::new(&config, &src.join("src/tools/rustfmt")); Build { initial_rustc: config.initial_rustc.clone(), initial_cargo: config.initial_cargo.clone(), local_rebuild: config.local_rebuild, fail_fast: config.cmd.fail_fast(), + doc_tests: config.cmd.doc_tests(), verbosity: config.verbose, build: config.build, @@ -322,14 +341,17 @@ impl Build { rust_info, cargo_info, rls_info, + rustfmt_info, cc: HashMap::new(), cxx: HashMap::new(), + ar: HashMap::new(), crates: HashMap::new(), lldb_version: None, lldb_python_dir: None, is_sudo, ci_env: CiEnv::current(), delayed_failures: RefCell::new(Vec::new()), + prerelease_version: Cell::new(None), } } @@ -345,12 +367,12 @@ impl Build { job::setup(self); } - if let Subcommand::Clean = self.config.cmd { - return clean::clean(self); + if let Subcommand::Clean { all } = self.config.cmd { + return clean::clean(self, all); } self.verbose("finding compilers"); - cc::find(self); + cc_detect::find(self); self.verbose("running sanity check"); sanity::check(self); // If local-rust is the same major.minor as the current version, then force a local-rebuild @@ -383,16 +405,19 @@ impl Build { /// Clear out `dir` if `input` is newer. /// /// After this executes, it will also ensure that `dir` exists. - fn clear_if_dirty(&self, dir: &Path, input: &Path) { + fn clear_if_dirty(&self, dir: &Path, input: &Path) -> bool { let stamp = dir.join(".stamp"); + let mut cleared = false; if mtime(&stamp) < mtime(input) { self.verbose(&format!("Dirty - {}", dir.display())); let _ = fs::remove_dir_all(dir); + cleared = true; } else if stamp.exists() { - return + return cleared; } t!(fs::create_dir_all(dir)); t!(File::create(stamp)); + cleared } /// Get the space-separated set of activated features for the standard @@ -412,6 +437,9 @@ impl Build { if self.config.profiler { features.push_str(" profiler"); } + if self.config.wasm_syscall { + features.push_str(" wasm_syscall"); + } features } @@ -421,9 +449,6 @@ impl Build { if self.config.use_jemalloc { features.push_str(" jemalloc"); } - if self.config.llvm_enabled { - features.push_str(" llvm"); - } features } @@ -433,10 +458,10 @@ impl Build { if self.config.rust_optimize {"release"} else {"debug"} } - /// Get the directory for incremental by-products when using the - /// given compiler. - fn incremental_dir(&self, compiler: Compiler) -> PathBuf { - self.out.join(&*compiler.host).join(format!("stage{}-incremental", compiler.stage)) + fn tools_dir(&self, compiler: Compiler) -> PathBuf { + let out = self.out.join(&*compiler.host).join(format!("stage{}-tools-bin", compiler.stage)); + t!(fs::create_dir_all(&out)); + out } /// Returns the root directory for all output generated in a particular @@ -472,6 +497,10 @@ impl Build { self.out.join(&*target).join("llvm") } + fn emscripten_llvm_out(&self, target: Interned) -> PathBuf { + self.out.join(&*target).join("llvm-emscripten") + } + /// Output directory for all documentation for a target fn doc_out(&self, target: Interned) -> PathBuf { self.out.join(&*target).join("doc") @@ -554,31 +583,24 @@ impl Build { .join(libdir(&self.config.build)) } - /// Runs a command, printing out nice contextual information if its build - /// status is not the expected one - fn run_expecting(&self, cmd: &mut Command, expect: BuildExpectation) { - self.verbose(&format!("running: {:?}", cmd)); - run_silent(cmd, expect) - } - /// Runs a command, printing out nice contextual information if it fails. fn run(&self, cmd: &mut Command) { - self.run_expecting(cmd, BuildExpectation::None) + self.verbose(&format!("running: {:?}", cmd)); + run_silent(cmd) } /// Runs a command, printing out nice contextual information if it fails. fn run_quiet(&self, cmd: &mut Command) { self.verbose(&format!("running: {:?}", cmd)); - run_suppressed(cmd, BuildExpectation::None) + run_suppressed(cmd) } - /// Runs a command, printing out nice contextual information if its build - /// status is not the expected one. - /// Exits if the command failed to execute at all, otherwise returns whether - /// the expectation was met - fn try_run(&self, cmd: &mut Command, expect: BuildExpectation) -> bool { + /// Runs a command, printing out nice contextual information if it fails. + /// Exits if the command failed to execute at all, otherwise returns its + /// `status.success()`. + fn try_run(&self, cmd: &mut Command) -> bool { self.verbose(&format!("running: {:?}", cmd)); - try_run_silent(cmd, expect) + try_run_silent(cmd) } /// Runs a command, printing out nice contextual information if it fails. @@ -586,7 +608,7 @@ impl Build { /// `status.success()`. fn try_run_quiet(&self, cmd: &mut Command) -> bool { self.verbose(&format!("running: {:?}", cmd)); - try_run_suppressed(cmd, BuildExpectation::None) + try_run_suppressed(cmd) } pub fn is_verbose(&self) -> bool { @@ -612,15 +634,15 @@ impl Build { /// Returns the path to the C compiler for the target specified. fn cc(&self, target: Interned) -> &Path { - self.cc[&target].0.path() + self.cc[&target].path() } /// Returns a list of flags to pass to the C compiler for the target /// specified. fn cflags(&self, target: Interned) -> Vec { // Filter out -O and /O (the optimization flags) that we picked up from - // gcc-rs because the build scripts will determine that for themselves. - let mut base = self.cc[&target].0.args().iter() + // cc-rs because the build scripts will determine that for themselves. + let mut base = self.cc[&target].args().iter() .map(|s| s.to_string_lossy().into_owned()) .filter(|s| !s.starts_with("-O") && !s.starts_with("/O")) .collect::>(); @@ -644,7 +666,7 @@ impl Build { /// Returns the path to the `ar` archive utility for the target specified. fn ar(&self, target: Interned) -> Option<&Path> { - self.cc[&target].1.as_ref().map(|p| &**p) + self.ar.get(&target).map(|p| &**p) } /// Returns the path to the C++ compiler for the target specified. @@ -657,21 +679,17 @@ impl Build { } } - /// Returns flags to pass to the compiler to generate code for `target`. - fn rustc_flags(&self, target: Interned) -> Vec { - // New flags should be added here with great caution! - // - // It's quite unfortunate to **require** flags to generate code for a - // target, so it should only be passed here if absolutely necessary! - // Most default configuration should be done through target specs rather - // than an entry here. - - let mut base = Vec::new(); - if target != self.config.build && !target.contains("msvc") && - !target.contains("emscripten") { - base.push(format!("-Clinker={}", self.cc(target).display())); + /// Returns the path to the linker for the given target if it needs to be overridden. + fn linker(&self, target: Interned) -> Option<&Path> { + if let Some(linker) = self.config.target_config.get(&target) + .and_then(|c| c.linker.as_ref()) { + Some(linker) + } else if target != self.config.build && + !target.contains("msvc") && !target.contains("emscripten") { + Some(self.cc(target)) + } else { + None } - base } /// Returns if this target should statically link the C runtime, if specified @@ -715,6 +733,11 @@ impl Build { self.config.python.as_ref().unwrap() } + /// Temporary directory that extended error information is emitted to. + fn extended_error_dir(&self) -> PathBuf { + self.out.join("tmp/extended-error-metadata") + } + /// Tests whether the `compiler` compiling for `target` should be forced to /// use a stage1 compiler instead. /// @@ -766,12 +789,63 @@ impl Build { fn release(&self, num: &str) -> String { match &self.config.channel[..] { "stable" => num.to_string(), - "beta" => format!("{}-beta{}", num, channel::CFG_PRERELEASE_VERSION), + "beta" => if self.rust_info.is_git() { + format!("{}-beta.{}", num, self.beta_prerelease_version()) + } else { + format!("{}-beta", num) + }, "nightly" => format!("{}-nightly", num), _ => format!("{}-dev", num), } } + fn beta_prerelease_version(&self) -> u32 { + if let Some(s) = self.prerelease_version.get() { + return s + } + + let beta = output( + Command::new("git") + .arg("ls-remote") + .arg("origin") + .arg("beta") + .current_dir(&self.src) + ); + let beta = beta.trim().split_whitespace().next().unwrap(); + let master = output( + Command::new("git") + .arg("ls-remote") + .arg("origin") + .arg("master") + .current_dir(&self.src) + ); + let master = master.trim().split_whitespace().next().unwrap(); + + // Figure out where the current beta branch started. + let base = output( + Command::new("git") + .arg("merge-base") + .arg(beta) + .arg(master) + .current_dir(&self.src), + ); + let base = base.trim(); + + // Next figure out how many merge commits happened since we branched off + // beta. That's our beta number! + let count = output( + Command::new("git") + .arg("rev-list") + .arg("--count") + .arg("--merges") + .arg(format!("{}...HEAD", base)) + .current_dir(&self.src), + ); + let n = count.trim().parse().unwrap(); + self.prerelease_version.set(Some(n)); + n + } + /// Returns the value of `release` above for Rust itself. fn rust_release(&self) -> String { self.release(channel::CFG_RELEASE_NUM) @@ -807,6 +881,11 @@ impl Build { self.package_vers(&self.release_num("rls")) } + /// Returns the value of `package_vers` above for rustfmt + fn rustfmt_package_vers(&self) -> String { + self.package_vers(&self.release_num("rustfmt")) + } + /// Returns the `version` string associated with this compiler for Rust /// itself. /// @@ -859,22 +938,42 @@ impl Build { } } - /// Get a list of crates from a root crate. + /// Updates the actual toolstate of a tool. /// - /// Returns Vec<(crate, path to crate, is_root_crate)> - fn crates(&self, root: &str) -> Vec<(Interned, &Path)> { - let interned = INTERNER.intern_string(root.to_owned()); + /// The toolstates are saved to the file specified by the key + /// `rust.save-toolstates` in `config.toml`. If unspecified, nothing will be + /// done. The file is updated immediately after this function completes. + pub fn save_toolstate(&self, tool: &str, state: ToolState) { + use std::io::{Seek, SeekFrom}; + + if let Some(ref path) = self.config.save_toolstates { + let mut file = t!(fs::OpenOptions::new() + .create(true) + .read(true) + .write(true) + .open(path)); + + let mut current_toolstates: HashMap, ToolState> = + serde_json::from_reader(&mut file).unwrap_or_default(); + current_toolstates.insert(tool.into(), state); + t!(file.seek(SeekFrom::Start(0))); + t!(file.set_len(0)); + t!(serde_json::to_writer(file, ¤t_toolstates)); + } + } + + fn in_tree_crates(&self, root: &str) -> Vec<&Crate> { let mut ret = Vec::new(); - let mut list = vec![interned]; + let mut list = vec![INTERNER.intern_str(root)]; let mut visited = HashSet::new(); while let Some(krate) = list.pop() { let krate = &self.crates[&krate]; - // If we can't strip prefix, then out-of-tree path - let path = krate.path.strip_prefix(&self.src).unwrap_or(&krate.path); - ret.push((krate.name, path)); - for dep in &krate.deps { - if visited.insert(dep) && dep != "build_helper" { - list.push(*dep); + if krate.is_local(self) { + ret.push(krate); + for dep in &krate.deps { + if visited.insert(dep) && dep != "build_helper" { + list.push(*dep); + } } } } diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index 004f0c31024cd..925a361f0b22e 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -52,11 +52,8 @@ check: $(Q)$(BOOTSTRAP) test $(BOOTSTRAP_ARGS) check-aux: $(Q)$(BOOTSTRAP) test \ - src/tools/cargotest \ src/tools/cargo \ - src/tools/rls \ - src/tools/rustfmt \ - src/tools/miri \ + src/tools/cargotest \ src/test/pretty \ src/test/run-pass/pretty \ src/test/run-fail/pretty \ diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 99077d03dbe03..653606e5d24b5 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -22,15 +22,15 @@ use std::env; use std::ffi::OsString; use std::fs::{self, File}; use std::io::{Read, Write}; -use std::path::Path; +use std::path::{Path, PathBuf}; use std::process::Command; use build_helper::output; use cmake; -use gcc; +use cc; use Build; -use util; +use util::{self, exe}; use build_helper::up_to_date; use builder::{Builder, RunConfig, ShouldRun, Step}; use cache::Interned; @@ -38,35 +38,40 @@ use cache::Interned; #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct Llvm { pub target: Interned, + pub emscripten: bool, } impl Step for Llvm { - type Output = (); + type Output = PathBuf; // path to llvm-config + const ONLY_HOSTS: bool = true; fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/llvm") + run.path("src/llvm").path("src/llvm-emscripten") } fn make_run(run: RunConfig) { - run.builder.ensure(Llvm { target: run.target }) + let emscripten = run.path.ends_with("llvm-emscripten"); + run.builder.ensure(Llvm { + target: run.target, + emscripten, + }); } /// Compile LLVM for `target`. - fn run(self, builder: &Builder) { + fn run(self, builder: &Builder) -> PathBuf { let build = builder.build; let target = self.target; - - // If we're not compiling for LLVM bail out here. - if !build.config.llvm_enabled { - return; - } + let emscripten = self.emscripten; // If we're using a custom LLVM bail out here, but we can only use a // custom LLVM for the build triple. - if let Some(config) = build.config.target_config.get(&target) { - if let Some(ref s) = config.llvm_config { - return check_llvm_version(build, s); + if !self.emscripten { + if let Some(config) = build.config.target_config.get(&target) { + if let Some(ref s) = config.llvm_config { + check_llvm_version(build, s); + return s.to_path_buf() + } } } @@ -74,8 +79,17 @@ impl Step for Llvm { let mut rebuild_trigger_contents = String::new(); t!(t!(File::open(&rebuild_trigger)).read_to_string(&mut rebuild_trigger_contents)); - let out_dir = build.llvm_out(target); + let (out_dir, llvm_config_ret_dir) = if emscripten { + let dir = build.emscripten_llvm_out(target); + let config_dir = dir.join("bin"); + (dir, config_dir) + } else { + (build.llvm_out(target), + build.llvm_out(build.config.build).join("bin")) + }; let done_stamp = out_dir.join("llvm-finished-building"); + let build_llvm_config = llvm_config_ret_dir + .join(exe("llvm-config", &*build.config.build)); if done_stamp.exists() { let mut done_contents = String::new(); t!(t!(File::open(&done_stamp)).read_to_string(&mut done_contents)); @@ -83,17 +97,19 @@ impl Step for Llvm { // If LLVM was already built previously and contents of the rebuild-trigger file // didn't change from the previous build, then no action is required. if done_contents == rebuild_trigger_contents { - return + return build_llvm_config } } let _folder = build.fold_output(|| "llvm"); - println!("Building LLVM for {}", target); + let descriptor = if emscripten { "Emscripten " } else { "" }; + println!("Building {}LLVM for {}", descriptor, target); let _time = util::timeit(); t!(fs::create_dir_all(&out_dir)); // http://llvm.org/docs/CMake.html - let mut cfg = cmake::Config::new(build.src.join("src/llvm")); + let root = if self.emscripten { "src/llvm-emscripten" } else { "src/llvm" }; + let mut cfg = cmake::Config::new(build.src.join(root)); if build.config.ninja { cfg.generator("Ninja"); } @@ -104,15 +120,21 @@ impl Step for Llvm { (true, true) => "RelWithDebInfo", }; - // NOTE: remember to also update `config.toml.example` when changing the defaults! - let llvm_targets = match build.config.llvm_targets { - Some(ref s) => s, - None => "X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon", + // NOTE: remember to also update `config.toml.example` when changing the + // defaults! + let llvm_targets = if self.emscripten { + "JSBackend" + } else { + match build.config.llvm_targets { + Some(ref s) => s, + None => "X86;ARM;AArch64;Mips;PowerPC;SystemZ;MSP430;Sparc;NVPTX;Hexagon", + } }; - let llvm_exp_targets = match build.config.llvm_experimental_targets { - Some(ref s) => s, - None => "", + let llvm_exp_targets = if self.emscripten { + "" + } else { + &build.config.llvm_experimental_targets[..] }; let assertions = if build.config.llvm_assertions {"ON"} else {"OFF"}; @@ -135,6 +157,14 @@ impl Step for Llvm { .define("LLVM_TARGET_ARCH", target.split('-').next().unwrap()) .define("LLVM_DEFAULT_TARGET_TRIPLE", target); + // By default, LLVM will automatically find OCaml and, if it finds it, + // install the LLVM bindings in LLVM_OCAML_INSTALL_PATH, which defaults + // to /usr/bin/ocaml. + // This causes problem for non-root builds of Rust. Side-step the issue + // by setting LLVM_OCAML_INSTALL_PATH to a relative path, so it installs + // in the prefix. + cfg.define("LLVM_OCAML_INSTALL_PATH", + env::var_os("LLVM_OCAML_INSTALL_PATH").unwrap_or_else(|| "usr/lib/ocaml".into())); // This setting makes the LLVM tools link to the dynamic LLVM library, // which saves both memory during parallel links and overall disk space @@ -162,8 +192,11 @@ impl Step for Llvm { } // http://llvm.org/docs/HowToCrossCompileLLVM.html - if target != build.build { - builder.ensure(Llvm { target: build.build }); + if target != build.build && !emscripten { + builder.ensure(Llvm { + target: build.build, + emscripten: false, + }); // FIXME: if the llvm root for the build triple is overridden then we // should use llvm-tblgen from there, also should verify that it // actually exists most of the time in normal installs of LLVM. @@ -227,6 +260,13 @@ impl Step for Llvm { cfg.build_arg("-j").build_arg(build.jobs().to_string()); cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" ")); cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" ")); + if let Some(ar) = build.ar(target) { + if ar.is_absolute() { + // LLVM build breaks if `CMAKE_AR` is a relative path, for some reason it + // tries to resolve this path in the LLVM build directory. + cfg.define("CMAKE_AR", sanitize_cc(ar)); + } + } }; configure_compilers(&mut cfg); @@ -242,6 +282,8 @@ impl Step for Llvm { cfg.build(); t!(t!(File::create(&done_stamp)).write_all(rebuild_trigger_contents.as_bytes())); + + build_llvm_config } } @@ -252,11 +294,14 @@ fn check_llvm_version(build: &Build, llvm_config: &Path) { let mut cmd = Command::new(llvm_config); let version = output(cmd.arg("--version")); - if version.starts_with("3.5") || version.starts_with("3.6") || - version.starts_with("3.7") { - return + let mut parts = version.split('.').take(2) + .filter_map(|s| s.parse::().ok()); + if let (Some(major), Some(minor)) = (parts.next(), parts.next()) { + if major > 3 || (major == 3 && minor >= 9) { + return + } } - panic!("\n\nbad LLVM version: {}, need >=3.5\n\n", version) + panic!("\n\nbad LLVM version: {}, need >=3.9\n\n", version) } #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -268,7 +313,7 @@ impl Step for TestHelpers { type Output = (); fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/rt/rust_test_helpers.c") + run.path("src/test/auxiliary/rust_test_helpers.c") } fn make_run(run: RunConfig) { @@ -281,7 +326,7 @@ impl Step for TestHelpers { let build = builder.build; let target = self.target; let dst = build.test_helpers_out(target); - let src = build.src.join("src/rt/rust_test_helpers.c"); + let src = build.src.join("src/test/auxiliary/rust_test_helpers.c"); if up_to_date(&src, &dst.join("librust_test_helpers.a")) { return } @@ -289,7 +334,7 @@ impl Step for TestHelpers { let _folder = build.fold_output(|| "build_test_helpers"); println!("Building test helpers"); t!(fs::create_dir_all(&dst)); - let mut cfg = gcc::Build::new(); + let mut cfg = cc::Build::new(); // We may have found various cross-compilers a little differently due to our // extra configuration, so inform gcc of these compilers. Note, though, that @@ -308,14 +353,14 @@ impl Step for TestHelpers { .opt_level(0) .warnings(false) .debug(false) - .file(build.src.join("src/rt/rust_test_helpers.c")) - .compile("librust_test_helpers.a"); + .file(build.src.join("src/test/auxiliary/rust_test_helpers.c")) + .compile("rust_test_helpers"); } } -const OPENSSL_VERS: &'static str = "1.0.2k"; +const OPENSSL_VERS: &'static str = "1.0.2m"; const OPENSSL_SHA256: &'static str = - "6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0"; + "8c6ff15ec6b319b50788f42c7abc2890c08ba5a1cdcd3810eb9092deada37b0f"; #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct Openssl { @@ -352,34 +397,51 @@ impl Step for Openssl { // originally from https://www.openssl.org/source/... let url = format!("https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/{}", name); - let mut ok = false; + let mut last_error = None; for _ in 0..3 { let status = Command::new("curl") .arg("-o").arg(&tmp) + .arg("-f") // make curl fail if the URL does not return HTTP 200 .arg(&url) .status() .expect("failed to spawn curl"); - if status.success() { - ok = true; - break + + // Retry if download failed. + if !status.success() { + last_error = Some(status.to_string()); + continue; } + + // Ensure the hash is correct. + let mut shasum = if target.contains("apple") || build.build.contains("netbsd") { + let mut cmd = Command::new("shasum"); + cmd.arg("-a").arg("256"); + cmd + } else { + Command::new("sha256sum") + }; + let output = output(&mut shasum.arg(&tmp)); + let found = output.split_whitespace().next().unwrap(); + + // If the hash is wrong, probably the download is incomplete or S3 served an error + // page. In any case, retry. + if found != OPENSSL_SHA256 { + last_error = Some(format!( + "downloaded openssl sha256 different\n\ + expected: {}\n\ + found: {}\n", + OPENSSL_SHA256, + found + )); + continue; + } + + // Everything is fine, so exit the retry loop. + last_error = None; + break; } - if !ok { - panic!("failed to download openssl source") - } - let mut shasum = if target.contains("apple") { - let mut cmd = Command::new("shasum"); - cmd.arg("-a").arg("256"); - cmd - } else { - Command::new("sha256sum") - }; - let output = output(&mut shasum.arg(&tmp)); - let found = output.split_whitespace().next().unwrap(); - if found != OPENSSL_SHA256 { - panic!("downloaded openssl sha256 different\n\ - expected: {}\n\ - found: {}\n", OPENSSL_SHA256, found); + if let Some(error) = last_error { + panic!("failed to download openssl source: {}", error); } t!(fs::rename(&tmp, &tarball)); } @@ -387,7 +449,7 @@ impl Step for Openssl { let dst = build.openssl_install_dir(target).unwrap(); drop(fs::remove_dir_all(&obj)); drop(fs::remove_dir_all(&dst)); - build.run(Command::new("tar").arg("xf").arg(&tarball).current_dir(&out)); + build.run(Command::new("tar").arg("zxf").arg(&tarball).current_dir(&out)); let mut configure = Command::new("perl"); configure.arg(obj.join("Configure")); @@ -399,11 +461,14 @@ impl Step for Openssl { let os = match &*target { "aarch64-linux-android" => "linux-aarch64", "aarch64-unknown-linux-gnu" => "linux-aarch64", + "aarch64-unknown-linux-musl" => "linux-aarch64", "arm-linux-androideabi" => "android", "arm-unknown-linux-gnueabi" => "linux-armv4", "arm-unknown-linux-gnueabihf" => "linux-armv4", "armv7-linux-androideabi" => "android-armv7", "armv7-unknown-linux-gnueabihf" => "linux-armv4", + "i586-unknown-linux-gnu" => "linux-elf", + "i586-unknown-linux-musl" => "linux-elf", "i686-apple-darwin" => "darwin-i386-cc", "i686-linux-android" => "android-x86", "i686-unknown-freebsd" => "BSD-x86-elf", @@ -415,14 +480,20 @@ impl Step for Openssl { "mips64el-unknown-linux-gnuabi64" => "linux64-mips64", "mipsel-unknown-linux-gnu" => "linux-mips32", "powerpc-unknown-linux-gnu" => "linux-ppc", + "powerpc-unknown-linux-gnuspe" => "linux-ppc", + "powerpc-unknown-netbsd" => "BSD-generic32", "powerpc64-unknown-linux-gnu" => "linux-ppc64", "powerpc64le-unknown-linux-gnu" => "linux-ppc64le", "s390x-unknown-linux-gnu" => "linux64-s390x", + "sparc-unknown-linux-gnu" => "linux-sparcv9", + "sparc64-unknown-linux-gnu" => "linux64-sparcv9", "sparc64-unknown-netbsd" => "BSD-sparc64", "x86_64-apple-darwin" => "darwin64-x86_64-cc", "x86_64-linux-android" => "linux-x86_64", "x86_64-unknown-freebsd" => "BSD-x86_64", + "x86_64-unknown-dragonfly" => "BSD-x86_64", "x86_64-unknown-linux-gnu" => "linux-x86_64", + "x86_64-unknown-linux-gnux32" => "linux-x32", "x86_64-unknown-linux-musl" => "linux-x86_64", "x86_64-unknown-netbsd" => "BSD-x86_64", _ => panic!("don't know how to configure OpenSSL for {}", target), diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 54208d8bb57a6..5184cca653c4b 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -21,9 +21,10 @@ use std::collections::HashMap; use std::env; use std::ffi::{OsString, OsStr}; -use std::fs; -use std::process::Command; +use std::fs::{self, File}; +use std::io::Read; use std::path::PathBuf; +use std::process::Command; use build_helper::output; @@ -78,7 +79,7 @@ pub fn check(build: &mut Build) { } let mut cmd_finder = Finder::new(); - // If we've got a git directory we're gona need git to update + // If we've got a git directory we're gonna need git to update // submodules and learn about various other aspects. if build.rust_info.is_git() { cmd_finder.must_have("git"); @@ -169,7 +170,7 @@ pub fn check(build: &mut Build) { } // Make sure musl-root is valid - if target.contains("musl") && !target.contains("mips") { + if target.contains("musl") { // If this is a native target (host is also musl) and no musl-root is given, // fall back to the system toolchain in /usr before giving up if build.musl_root(*target).is_none() && build.config.build == *target { @@ -221,8 +222,9 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake let run = |cmd: &mut Command| { cmd.output().map(|output| { String::from_utf8_lossy(&output.stdout) - .lines().next().unwrap() - .to_string() + .lines().next().unwrap_or_else(|| { + panic!("{:?} failed {:?}", cmd, output) + }).to_string() }) }; build.lldb_version = run(Command::new("lldb").arg("--version")).ok(); @@ -233,4 +235,14 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake if let Some(ref s) = build.config.ccache { cmd_finder.must_have(s); } + + if build.config.channel == "stable" { + let mut stage0 = String::new(); + t!(t!(File::open(build.src.join("src/stage0.txt"))) + .read_to_string(&mut stage0)); + if stage0.contains("\ndev:") { + panic!("bootstrapping from a dev compiler in a stable release, but \ + should only be bootstrapping from a released compiler!"); + } + } } diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs new file mode 100644 index 0000000000000..b27ddfdbc5e58 --- /dev/null +++ b/src/bootstrap/test.rs @@ -0,0 +1,1700 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Implementation of the test-related targets of the build system. +//! +//! This file implements the various regression test suites that we execute on +//! our CI. + +use std::env; +use std::ffi::OsString; +use std::iter; +use std::fmt; +use std::fs::{self, File}; +use std::path::{PathBuf, Path}; +use std::process::Command; +use std::io::Read; + +use build_helper::{self, output}; + +use builder::{Kind, RunConfig, ShouldRun, Builder, Compiler, Step}; +use Crate as CargoCrate; +use cache::{INTERNER, Interned}; +use compile; +use dist; +use native; +use tool::{self, Tool}; +use util::{self, dylib_path, dylib_path_var}; +use {Build, Mode}; +use toolstate::ToolState; + +const ADB_TEST_DIR: &str = "/data/tmp/work"; + +/// The two modes of the test runner; tests or benchmarks. +#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone)] +pub enum TestKind { + /// Run `cargo test` + Test, + /// Run `cargo bench` + Bench, +} + +impl TestKind { + // Return the cargo subcommand for this test kind + fn subcommand(self) -> &'static str { + match self { + TestKind::Test => "test", + TestKind::Bench => "bench", + } + } +} + +impl fmt::Display for TestKind { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(match *self { + TestKind::Test => "Testing", + TestKind::Bench => "Benchmarking", + }) + } +} + +fn try_run(build: &Build, cmd: &mut Command) -> bool { + if !build.fail_fast { + if !build.try_run(cmd) { + let mut failures = build.delayed_failures.borrow_mut(); + failures.push(format!("{:?}", cmd)); + return false; + } + } else { + build.run(cmd); + } + true +} + +fn try_run_quiet(build: &Build, cmd: &mut Command) -> bool { + if !build.fail_fast { + if !build.try_run_quiet(cmd) { + let mut failures = build.delayed_failures.borrow_mut(); + failures.push(format!("{:?}", cmd)); + return false; + } + } else { + build.run_quiet(cmd); + } + true +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Linkcheck { + host: Interned, +} + +impl Step for Linkcheck { + type Output = (); + const ONLY_HOSTS: bool = true; + const DEFAULT: bool = true; + + /// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler. + /// + /// This tool in `src/tools` will verify the validity of all our links in the + /// documentation to ensure we don't have a bunch of dead ones. + fn run(self, builder: &Builder) { + let build = builder.build; + let host = self.host; + + println!("Linkcheck ({})", host); + + builder.default_doc(None); + + let _time = util::timeit(); + try_run(build, builder.tool_cmd(Tool::Linkchecker) + .arg(build.out.join(host).join("doc"))); + } + + fn should_run(run: ShouldRun) -> ShouldRun { + let builder = run.builder; + run.path("src/tools/linkchecker").default_condition(builder.build.config.docs) + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Linkcheck { host: run.target }); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Cargotest { + stage: u32, + host: Interned, +} + +impl Step for Cargotest { + type Output = (); + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/cargotest") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Cargotest { + stage: run.builder.top_stage, + host: run.target, + }); + } + + /// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler. + /// + /// This tool in `src/tools` will check out a few Rust projects and run `cargo + /// test` to ensure that we don't regress the test suites there. + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = builder.compiler(self.stage, self.host); + builder.ensure(compile::Rustc { compiler, target: compiler.host }); + + // 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 + // quickly run into path name limit constraints. + let out_dir = build.out.join("ct"); + t!(fs::create_dir_all(&out_dir)); + + let _time = util::timeit(); + let mut cmd = builder.tool_cmd(Tool::CargoTest); + try_run(build, cmd.arg(&build.initial_cargo) + .arg(&out_dir) + .env("RUSTC", builder.rustc(compiler)) + .env("RUSTDOC", builder.rustdoc(compiler.host))); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Cargo { + stage: u32, + host: Interned, +} + +impl Step for Cargo { + type Output = (); + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/cargo") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Cargo { + stage: run.builder.top_stage, + host: run.target, + }); + } + + /// Runs `cargo test` for `cargo` packaged with Rust. + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = builder.compiler(self.stage, self.host); + + builder.ensure(tool::Cargo { compiler, target: self.host }); + let mut cargo = builder.cargo(compiler, Mode::Tool, self.host, "test"); + cargo.arg("--manifest-path").arg(build.src.join("src/tools/cargo/Cargo.toml")); + if !build.fail_fast { + cargo.arg("--no-fail-fast"); + } + + // 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"); + + try_run(build, cargo.env("PATH", &path_for_cargo(builder, compiler))); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Rls { + stage: u32, + host: Interned, +} + +impl Step for Rls { + type Output = (); + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/rls") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Rls { + stage: run.builder.top_stage, + host: run.target, + }); + } + + /// Runs `cargo test` for the rls. + fn run(self, builder: &Builder) { + let build = builder.build; + let stage = self.stage; + let host = self.host; + let compiler = builder.compiler(stage, host); + + builder.ensure(tool::Rls { compiler, target: self.host }); + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + host, + "test", + "src/tools/rls"); + + // Don't build tests dynamically, just a pain to work with + cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); + + builder.add_rustc_lib_path(compiler, &mut cargo); + + if try_run(build, &mut cargo) { + build.save_toolstate("rls", ToolState::TestPass); + } + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Rustfmt { + stage: u32, + host: Interned, +} + +impl Step for Rustfmt { + type Output = (); + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/rustfmt") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Rustfmt { + stage: run.builder.top_stage, + host: run.target, + }); + } + + /// Runs `cargo test` for rustfmt. + fn run(self, builder: &Builder) { + let build = builder.build; + let stage = self.stage; + let host = self.host; + let compiler = builder.compiler(stage, host); + + builder.ensure(tool::Rustfmt { compiler, target: self.host }); + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + host, + "test", + "src/tools/rustfmt"); + + // Don't build tests dynamically, just a pain to work with + cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); + + builder.add_rustc_lib_path(compiler, &mut cargo); + + if try_run(build, &mut cargo) { + build.save_toolstate("rustfmt", ToolState::TestPass); + } + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Miri { + stage: u32, + host: Interned, +} + +impl Step for Miri { + type Output = (); + const ONLY_HOSTS: bool = true; + const DEFAULT: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + let test_miri = run.builder.build.config.test_miri; + run.path("src/tools/miri").default_condition(test_miri) + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Miri { + stage: run.builder.top_stage, + host: run.target, + }); + } + + /// Runs `cargo test` for miri. + fn run(self, builder: &Builder) { + let build = builder.build; + let stage = self.stage; + let host = self.host; + let compiler = builder.compiler(stage, host); + + if let Some(miri) = builder.ensure(tool::Miri { compiler, target: self.host }) { + let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test"); + cargo.arg("--manifest-path").arg(build.src.join("src/tools/miri/Cargo.toml")); + + // Don't build tests dynamically, just a pain to work with + cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); + // miri tests need to know about the stage sysroot + cargo.env("MIRI_SYSROOT", builder.sysroot(compiler)); + cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); + cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler)); + cargo.env("MIRI_PATH", miri); + + builder.add_rustc_lib_path(compiler, &mut cargo); + + if try_run(build, &mut cargo) { + build.save_toolstate("miri", ToolState::TestPass); + } + } else { + eprintln!("failed to test miri: could not build"); + } + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Clippy { + stage: u32, + host: Interned, +} + +impl Step for Clippy { + type Output = (); + const ONLY_HOSTS: bool = true; + const DEFAULT: bool = false; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/clippy") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Clippy { + stage: run.builder.top_stage, + host: run.target, + }); + } + + /// Runs `cargo test` for clippy. + fn run(self, builder: &Builder) { + let build = builder.build; + let stage = self.stage; + let host = self.host; + let compiler = builder.compiler(stage, host); + + if let Some(clippy) = builder.ensure(tool::Clippy { compiler, target: self.host }) { + let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test"); + cargo.arg("--manifest-path").arg(build.src.join("src/tools/clippy/Cargo.toml")); + + // Don't build tests dynamically, just a pain to work with + cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); + // clippy tests need to know about the stage sysroot + cargo.env("SYSROOT", builder.sysroot(compiler)); + cargo.env("RUSTC_TEST_SUITE", builder.rustc(compiler)); + cargo.env("RUSTC_LIB_PATH", builder.rustc_libdir(compiler)); + let host_libs = builder.stage_out(compiler, Mode::Tool).join(builder.cargo_dir()); + cargo.env("HOST_LIBS", host_libs); + // clippy tests need to find the driver + cargo.env("CLIPPY_DRIVER_PATH", clippy); + + builder.add_rustc_lib_path(compiler, &mut cargo); + + if try_run(build, &mut cargo) { + build.save_toolstate("clippy-driver", ToolState::TestPass); + } + } else { + eprintln!("failed to test clippy: could not build"); + } + } +} + +fn path_for_cargo(builder: &Builder, compiler: Compiler) -> OsString { + // 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 = builder.sysroot(compiler).join("bin"); + let old_path = env::var_os("PATH").unwrap_or_default(); + env::join_paths(iter::once(path).chain(env::split_paths(&old_path))).expect("") +} + +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct RustdocTheme { + pub compiler: Compiler, +} + +impl Step for RustdocTheme { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/rustdoc-themes") + } + + fn make_run(run: RunConfig) { + let compiler = run.builder.compiler(run.builder.top_stage, run.host); + + run.builder.ensure(RustdocTheme { + compiler: compiler, + }); + } + + fn run(self, builder: &Builder) { + let rustdoc = builder.rustdoc(self.compiler.host); + let mut cmd = builder.tool_cmd(Tool::RustdocTheme); + cmd.arg(rustdoc.to_str().unwrap()) + .arg(builder.src.join("src/librustdoc/html/static/themes").to_str().unwrap()) + .env("RUSTC_STAGE", self.compiler.stage.to_string()) + .env("RUSTC_SYSROOT", builder.sysroot(self.compiler)) + .env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host)) + .env("CFG_RELEASE_CHANNEL", &builder.build.config.channel) + .env("RUSTDOC_REAL", builder.rustdoc(self.compiler.host)) + .env("RUSTDOC_CRATE_VERSION", builder.build.rust_version()) + .env("RUSTC_BOOTSTRAP", "1"); + if let Some(linker) = builder.build.linker(self.compiler.host) { + cmd.env("RUSTC_TARGET_LINKER", linker); + } + try_run(builder.build, &mut cmd); + } +} + +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct RustdocJS { + pub host: Interned, + pub target: Interned, +} + +impl Step for RustdocJS { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/test/rustdoc-js") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(RustdocJS { + host: run.host, + target: run.target, + }); + } + + fn run(self, builder: &Builder) { + if let Some(ref nodejs) = builder.config.nodejs { + let mut command = Command::new(nodejs); + command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]); + builder.ensure(::doc::Std { + target: self.target, + stage: builder.top_stage, + }); + builder.run(&mut command); + } else { + println!("No nodejs found, skipping \"src/test/rustdoc-js\" tests"); + } + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Tidy { + host: Interned, +} + +impl Step for Tidy { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + const ONLY_BUILD: bool = true; + + /// Runs the `tidy` tool as compiled in `stage` by the `host` compiler. + /// + /// This tool in `src/tools` checks up on various bits and pieces of style and + /// otherwise just implements a few lint-like checks that are specific to the + /// compiler itself. + fn run(self, builder: &Builder) { + let build = builder.build; + let host = self.host; + + let _folder = build.fold_output(|| "tidy"); + println!("tidy check ({})", host); + let mut cmd = builder.tool_cmd(Tool::Tidy); + cmd.arg(build.src.join("src")); + if !build.config.vendor { + cmd.arg("--no-vendor"); + } + if build.config.quiet_tests { + cmd.arg("--quiet"); + } + try_run(build, &mut cmd); + } + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/tidy") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Tidy { + host: run.builder.build.build, + }); + } +} + +fn testdir(build: &Build, host: Interned) -> PathBuf { + build.out.join(host).join("test") +} + +macro_rules! default_test { + ($name:ident { path: $path:expr, mode: $mode:expr, suite: $suite:expr }) => { + test!($name { path: $path, mode: $mode, suite: $suite, default: true, host: false }); + } +} + +macro_rules! host_test { + ($name:ident { path: $path:expr, mode: $mode:expr, suite: $suite:expr }) => { + test!($name { path: $path, mode: $mode, suite: $suite, default: true, host: true }); + } +} + +macro_rules! test { + ($name:ident { + path: $path:expr, + mode: $mode:expr, + suite: $suite:expr, + default: $default:expr, + host: $host:expr + }) => { + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub struct $name { + pub compiler: Compiler, + pub target: Interned, + } + + impl Step for $name { + type Output = (); + const DEFAULT: bool = $default; + const ONLY_HOSTS: bool = $host; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path($path) + } + + fn make_run(run: RunConfig) { + let compiler = run.builder.compiler(run.builder.top_stage, run.host); + + run.builder.ensure($name { + compiler, + target: run.target, + }); + } + + fn run(self, builder: &Builder) { + builder.ensure(Compiletest { + compiler: self.compiler, + target: self.target, + mode: $mode, + suite: $suite, + }) + } + } + } +} + +default_test!(Ui { + path: "src/test/ui", + mode: "ui", + suite: "ui" +}); + +default_test!(RunPass { + path: "src/test/run-pass", + mode: "run-pass", + suite: "run-pass" +}); + +default_test!(CompileFail { + path: "src/test/compile-fail", + mode: "compile-fail", + suite: "compile-fail" +}); + +default_test!(ParseFail { + path: "src/test/parse-fail", + mode: "parse-fail", + suite: "parse-fail" +}); + +default_test!(RunFail { + path: "src/test/run-fail", + mode: "run-fail", + suite: "run-fail" +}); + +default_test!(RunPassValgrind { + path: "src/test/run-pass-valgrind", + mode: "run-pass-valgrind", + suite: "run-pass-valgrind" +}); + +default_test!(MirOpt { + path: "src/test/mir-opt", + mode: "mir-opt", + suite: "mir-opt" +}); + +default_test!(Codegen { + path: "src/test/codegen", + mode: "codegen", + suite: "codegen" +}); + +default_test!(CodegenUnits { + path: "src/test/codegen-units", + mode: "codegen-units", + suite: "codegen-units" +}); + +default_test!(Incremental { + path: "src/test/incremental", + mode: "incremental", + suite: "incremental" +}); + +default_test!(Debuginfo { + path: "src/test/debuginfo", + // What this runs varies depending on the native platform being apple + mode: "debuginfo-XXX", + suite: "debuginfo" +}); + +host_test!(UiFullDeps { + path: "src/test/ui-fulldeps", + mode: "ui", + suite: "ui-fulldeps" +}); + +host_test!(RunPassFullDeps { + path: "src/test/run-pass-fulldeps", + mode: "run-pass", + suite: "run-pass-fulldeps" +}); + +host_test!(RunFailFullDeps { + path: "src/test/run-fail-fulldeps", + mode: "run-fail", + suite: "run-fail-fulldeps" +}); + +host_test!(CompileFailFullDeps { + path: "src/test/compile-fail-fulldeps", + mode: "compile-fail", + suite: "compile-fail-fulldeps" +}); + +host_test!(IncrementalFullDeps { + path: "src/test/incremental-fulldeps", + mode: "incremental", + suite: "incremental-fulldeps" +}); + +host_test!(Rustdoc { + path: "src/test/rustdoc", + mode: "rustdoc", + suite: "rustdoc" +}); + +test!(Pretty { + path: "src/test/pretty", + mode: "pretty", + suite: "pretty", + default: false, + host: true +}); +test!(RunPassPretty { + path: "src/test/run-pass/pretty", + mode: "pretty", + suite: "run-pass", + default: false, + host: true +}); +test!(RunFailPretty { + path: "src/test/run-fail/pretty", + mode: "pretty", + suite: "run-fail", + default: false, + host: true +}); +test!(RunPassValgrindPretty { + path: "src/test/run-pass-valgrind/pretty", + mode: "pretty", + suite: "run-pass-valgrind", + default: false, + host: true +}); +test!(RunPassFullDepsPretty { + path: "src/test/run-pass-fulldeps/pretty", + mode: "pretty", + suite: "run-pass-fulldeps", + default: false, + host: true +}); +test!(RunFailFullDepsPretty { + path: "src/test/run-fail-fulldeps/pretty", + mode: "pretty", + suite: "run-fail-fulldeps", + default: false, + host: true +}); + +host_test!(RunMake { + path: "src/test/run-make", + mode: "run-make", + suite: "run-make" +}); + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +struct Compiletest { + compiler: Compiler, + target: Interned, + mode: &'static str, + suite: &'static str, +} + +impl Step for Compiletest { + type Output = (); + + fn should_run(run: ShouldRun) -> ShouldRun { + run.never() + } + + /// Executes the `compiletest` tool to run a suite of tests. + /// + /// Compiles all tests with `compiler` for `target` with the specified + /// compiletest `mode` and `suite` arguments. For example `mode` can be + /// "run-pass" or `suite` can be something like `debuginfo`. + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = self.compiler; + let target = self.target; + let mode = self.mode; + let suite = self.suite; + + // Skip codegen tests if they aren't enabled in configuration. + if !build.config.codegen_tests && suite == "codegen" { + return; + } + + if suite == "debuginfo" { + // Skip debuginfo tests on MSVC + if build.build.contains("msvc") { + return; + } + + if mode == "debuginfo-XXX" { + return if build.build.contains("apple") { + builder.ensure(Compiletest { + mode: "debuginfo-lldb", + ..self + }); + } else { + builder.ensure(Compiletest { + mode: "debuginfo-gdb", + ..self + }); + }; + } + + builder.ensure(dist::DebuggerScripts { + sysroot: builder.sysroot(compiler), + host: target + }); + } + + if suite.ends_with("fulldeps") || + // FIXME: Does pretty need librustc compiled? Note that there are + // fulldeps test suites with mode = pretty as well. + mode == "pretty" || + mode == "rustdoc" || + mode == "run-make" { + builder.ensure(compile::Rustc { compiler, target }); + } + + builder.ensure(compile::Test { compiler, target }); + builder.ensure(native::TestHelpers { target }); + builder.ensure(RemoteCopyLibs { compiler, target }); + + let _folder = build.fold_output(|| format!("test_{}", suite)); + println!("Check compiletest suite={} mode={} ({} -> {})", + suite, mode, &compiler.host, target); + let mut cmd = builder.tool_cmd(Tool::Compiletest); + + // compiletest currently has... a lot of arguments, so let's just pass all + // of them! + + cmd.arg("--compile-lib-path").arg(builder.rustc_libdir(compiler)); + cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target)); + cmd.arg("--rustc-path").arg(builder.rustc(compiler)); + + // Avoid depending on rustdoc when we don't need it. + if mode == "rustdoc" || mode == "run-make" { + cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler.host)); + } + + cmd.arg("--src-base").arg(build.src.join("src/test").join(suite)); + cmd.arg("--build-base").arg(testdir(build, compiler.host).join(suite)); + cmd.arg("--stage-id").arg(format!("stage{}-{}", compiler.stage, target)); + cmd.arg("--mode").arg(mode); + cmd.arg("--target").arg(target); + cmd.arg("--host").arg(&*compiler.host); + cmd.arg("--llvm-filecheck").arg(build.llvm_filecheck(build.build)); + + if let Some(ref nodejs) = build.config.nodejs { + cmd.arg("--nodejs").arg(nodejs); + } + + let mut flags = vec!["-Crpath".to_string()]; + if build.config.rust_optimize_tests { + flags.push("-O".to_string()); + } + if build.config.rust_debuginfo_tests { + flags.push("-g".to_string()); + } + flags.push("-Zmiri -Zunstable-options".to_string()); + flags.push(build.config.cmd.rustc_args().join(" ")); + + if let Some(linker) = build.linker(target) { + cmd.arg("--linker").arg(linker); + } + + let hostflags = flags.clone(); + cmd.arg("--host-rustcflags").arg(hostflags.join(" ")); + + let mut targetflags = flags.clone(); + targetflags.push(format!("-Lnative={}", + build.test_helpers_out(target).display())); + cmd.arg("--target-rustcflags").arg(targetflags.join(" ")); + + cmd.arg("--docck-python").arg(build.python()); + + if build.build.ends_with("apple-darwin") { + // Force /usr/bin/python on macOS for LLDB tests because we're loading the + // LLDB plugin's compiled module which only works with the system python + // (namely not Homebrew-installed python) + cmd.arg("--lldb-python").arg("/usr/bin/python"); + } else { + cmd.arg("--lldb-python").arg(build.python()); + } + + if let Some(ref gdb) = build.config.gdb { + cmd.arg("--gdb").arg(gdb); + } + if let Some(ref vers) = build.lldb_version { + cmd.arg("--lldb-version").arg(vers); + } + if let Some(ref dir) = build.lldb_python_dir { + cmd.arg("--lldb-python-dir").arg(dir); + } + + cmd.args(&build.config.cmd.test_args()); + + if build.is_verbose() { + cmd.arg("--verbose"); + } + + if build.config.quiet_tests { + cmd.arg("--quiet"); + } + + if build.config.llvm_enabled { + let llvm_config = build.llvm_config(target); + let llvm_version = output(Command::new(&llvm_config).arg("--version")); + cmd.arg("--llvm-version").arg(llvm_version); + if !build.is_rust_llvm(target) { + cmd.arg("--system-llvm"); + } + + // Only pass correct values for these flags for the `run-make` suite as it + // requires that a C++ compiler was configured which isn't always the case. + if suite == "run-make" { + let llvm_components = output(Command::new(&llvm_config).arg("--components")); + let llvm_cxxflags = output(Command::new(&llvm_config).arg("--cxxflags")); + cmd.arg("--cc").arg(build.cc(target)) + .arg("--cxx").arg(build.cxx(target).unwrap()) + .arg("--cflags").arg(build.cflags(target).join(" ")) + .arg("--llvm-components").arg(llvm_components.trim()) + .arg("--llvm-cxxflags").arg(llvm_cxxflags.trim()); + if let Some(ar) = build.ar(target) { + cmd.arg("--ar").arg(ar); + } + } + } + if suite == "run-make" && !build.config.llvm_enabled { + println!("Ignoring run-make test suite as they generally don't work without LLVM"); + return; + } + + if suite != "run-make" { + cmd.arg("--cc").arg("") + .arg("--cxx").arg("") + .arg("--cflags").arg("") + .arg("--llvm-components").arg("") + .arg("--llvm-cxxflags").arg(""); + } + + if build.remote_tested(target) { + cmd.arg("--remote-test-client").arg(builder.tool_exe(Tool::RemoteTestClient)); + } + + // Running a C compiler on MSVC requires a few env vars to be set, to be + // sure to set them here. + // + // Note that if we encounter `PATH` we make sure to append to our own `PATH` + // rather than stomp over it. + if target.contains("msvc") { + for &(ref k, ref v) in build.cc[&target].env() { + if k != "PATH" { + cmd.env(k, v); + } + } + } + cmd.env("RUSTC_BOOTSTRAP", "1"); + build.add_rust_test_threads(&mut cmd); + + if build.config.sanitizers { + cmd.env("SANITIZER_SUPPORT", "1"); + } + + if build.config.profiler { + cmd.env("PROFILER_SUPPORT", "1"); + } + + cmd.env("RUST_TEST_TMPDIR", build.out.join("tmp")); + + cmd.arg("--adb-path").arg("adb"); + cmd.arg("--adb-test-dir").arg(ADB_TEST_DIR); + if target.contains("android") { + // Assume that cc for this target comes from the android sysroot + cmd.arg("--android-cross-path") + .arg(build.cc(target).parent().unwrap().parent().unwrap()); + } else { + cmd.arg("--android-cross-path").arg(""); + } + + build.ci_env.force_coloring_in_ci(&mut cmd); + + let _time = util::timeit(); + try_run(build, &mut cmd); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +struct DocTest { + compiler: Compiler, + path: &'static str, + name: &'static str, + is_ext_doc: bool, +} + +impl Step for DocTest { + type Output = (); + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.never() + } + + /// Run `rustdoc --test` for all documentation in `src/doc`. + /// + /// This will run all tests in our markdown documentation (e.g. the book) + /// located in `src/doc`. The `rustdoc` that's run is the one that sits next to + /// `compiler`. + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = self.compiler; + + builder.ensure(compile::Test { compiler, target: compiler.host }); + + // Do a breadth-first traversal of the `src/doc` directory and just run + // tests for all files that end in `*.md` + let mut stack = vec![build.src.join(self.path)]; + let _time = util::timeit(); + let _folder = build.fold_output(|| format!("test_{}", self.name)); + + while let Some(p) = stack.pop() { + if p.is_dir() { + stack.extend(t!(p.read_dir()).map(|p| t!(p).path())); + continue + } + + if p.extension().and_then(|s| s.to_str()) != Some("md") { + continue; + } + + // The nostarch directory in the book is for no starch, and so isn't + // guaranteed to build. We don't care if it doesn't build, so skip it. + if p.to_str().map_or(false, |p| p.contains("nostarch")) { + continue; + } + + let test_result = markdown_test(builder, compiler, &p); + if self.is_ext_doc { + let toolstate = if test_result { + ToolState::TestPass + } else { + ToolState::TestFail + }; + build.save_toolstate(self.name, toolstate); + } + } + } +} + +macro_rules! test_book { + ($($name:ident, $path:expr, $book_name:expr, default=$default:expr;)+) => { + $( + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] + pub struct $name { + compiler: Compiler, + } + + impl Step for $name { + type Output = (); + const DEFAULT: bool = $default; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path($path) + } + + fn make_run(run: RunConfig) { + run.builder.ensure($name { + compiler: run.builder.compiler(run.builder.top_stage, run.host), + }); + } + + fn run(self, builder: &Builder) { + builder.ensure(DocTest { + compiler: self.compiler, + path: $path, + name: $book_name, + is_ext_doc: !$default, + }); + } + } + )+ + } +} + +test_book!( + Nomicon, "src/doc/nomicon", "nomicon", default=false; + Reference, "src/doc/reference", "reference", default=false; + RustdocBook, "src/doc/rustdoc", "rustdoc", default=true; + RustByExample, "src/doc/rust-by-example", "rust-by-example", default=false; + TheBook, "src/doc/book", "book", default=false; + UnstableBook, "src/doc/unstable-book", "unstable-book", default=true; +); + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct ErrorIndex { + compiler: Compiler, +} + +impl Step for ErrorIndex { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/tools/error_index_generator") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(ErrorIndex { + compiler: run.builder.compiler(run.builder.top_stage, run.host), + }); + } + + /// Run the error index generator tool to execute the tests located in the error + /// index. + /// + /// The `error_index_generator` tool lives in `src/tools` and is used to + /// generate a markdown file from the error indexes of the code base which is + /// then passed to `rustdoc --test`. + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = self.compiler; + + builder.ensure(compile::Std { compiler, target: compiler.host }); + + let _folder = build.fold_output(|| "test_error_index"); + println!("Testing error-index stage{}", compiler.stage); + + let dir = testdir(build, compiler.host); + t!(fs::create_dir_all(&dir)); + let output = dir.join("error-index.md"); + + let _time = util::timeit(); + build.run(builder.tool_cmd(Tool::ErrorIndex) + .arg("markdown") + .arg(&output) + .env("CFG_BUILD", &build.build) + .env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir())); + + markdown_test(builder, compiler, &output); + } +} + +fn markdown_test(builder: &Builder, compiler: Compiler, markdown: &Path) -> bool { + let build = builder.build; + let mut file = t!(File::open(markdown)); + let mut contents = String::new(); + t!(file.read_to_string(&mut contents)); + if !contents.contains("```") { + return true; + } + + println!("doc tests for: {}", markdown.display()); + let mut cmd = builder.rustdoc_cmd(compiler.host); + build.add_rust_test_threads(&mut cmd); + cmd.arg("--test"); + cmd.arg(markdown); + cmd.env("RUSTC_BOOTSTRAP", "1"); + + let test_args = build.config.cmd.test_args().join(" "); + cmd.arg("--test-args").arg(test_args); + + if build.config.quiet_tests { + try_run_quiet(build, &mut cmd) + } else { + try_run(build, &mut cmd) + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct CrateLibrustc { + compiler: Compiler, + target: Interned, + test_kind: TestKind, + krate: Interned, +} + +impl Step for CrateLibrustc { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.krate("rustc-main") + } + + fn make_run(run: RunConfig) { + let builder = run.builder; + let compiler = builder.compiler(builder.top_stage, run.host); + + for krate in builder.in_tree_crates("rustc-main") { + if run.path.ends_with(&krate.path) { + let test_kind = if builder.kind == Kind::Test { + TestKind::Test + } else if builder.kind == Kind::Bench { + TestKind::Bench + } else { + panic!("unexpected builder.kind in crate: {:?}", builder.kind); + }; + + builder.ensure(CrateLibrustc { + compiler, + target: run.target, + test_kind, + krate: krate.name, + }); + } + } + } + + fn run(self, builder: &Builder) { + builder.ensure(Crate { + compiler: self.compiler, + target: self.target, + mode: Mode::Librustc, + test_kind: self.test_kind, + krate: self.krate, + }); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct CrateNotDefault { + compiler: Compiler, + target: Interned, + test_kind: TestKind, + krate: &'static str, +} + +impl Step for CrateNotDefault { + type Output = (); + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/liballoc_jemalloc") + .path("src/librustc_asan") + .path("src/librustc_lsan") + .path("src/librustc_msan") + .path("src/librustc_tsan") + } + + fn make_run(run: RunConfig) { + let builder = run.builder; + let compiler = builder.compiler(builder.top_stage, run.host); + + let test_kind = if builder.kind == Kind::Test { + TestKind::Test + } else if builder.kind == Kind::Bench { + TestKind::Bench + } else { + panic!("unexpected builder.kind in crate: {:?}", builder.kind); + }; + + builder.ensure(CrateNotDefault { + compiler, + target: run.target, + test_kind, + krate: match run.path { + _ if run.path.ends_with("src/liballoc_jemalloc") => "alloc_jemalloc", + _ if run.path.ends_with("src/librustc_asan") => "rustc_asan", + _ if run.path.ends_with("src/librustc_lsan") => "rustc_lsan", + _ if run.path.ends_with("src/librustc_msan") => "rustc_msan", + _ if run.path.ends_with("src/librustc_tsan") => "rustc_tsan", + _ => panic!("unexpected path {:?}", run.path), + }, + }); + } + + fn run(self, builder: &Builder) { + builder.ensure(Crate { + compiler: self.compiler, + target: self.target, + mode: Mode::Libstd, + test_kind: self.test_kind, + krate: INTERNER.intern_str(self.krate), + }); + } +} + + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Crate { + compiler: Compiler, + target: Interned, + mode: Mode, + test_kind: TestKind, + krate: Interned, +} + +impl Step for Crate { + type Output = (); + const DEFAULT: bool = true; + + fn should_run(mut run: ShouldRun) -> ShouldRun { + let builder = run.builder; + run = run.krate("test"); + for krate in run.builder.in_tree_crates("std") { + if krate.is_local(&run.builder) && + !krate.name.contains("jemalloc") && + !(krate.name.starts_with("rustc_") && krate.name.ends_with("san")) && + krate.name != "dlmalloc" { + run = run.path(krate.local_path(&builder).to_str().unwrap()); + } + } + run + } + + fn make_run(run: RunConfig) { + let builder = run.builder; + let compiler = builder.compiler(builder.top_stage, run.host); + + let make = |mode: Mode, krate: &CargoCrate| { + let test_kind = if builder.kind == Kind::Test { + TestKind::Test + } else if builder.kind == Kind::Bench { + TestKind::Bench + } else { + panic!("unexpected builder.kind in crate: {:?}", builder.kind); + }; + + builder.ensure(Crate { + compiler, + target: run.target, + mode, + test_kind, + krate: krate.name, + }); + }; + + for krate in builder.in_tree_crates("std") { + if run.path.ends_with(&krate.local_path(&builder)) { + make(Mode::Libstd, krate); + } + } + for krate in builder.in_tree_crates("test") { + if run.path.ends_with(&krate.local_path(&builder)) { + make(Mode::Libtest, krate); + } + } + } + + /// Run all unit tests plus documentation tests for a given crate defined + /// by a `Cargo.toml` (single manifest) + /// + /// This is what runs tests for crates like the standard library, compiler, etc. + /// It essentially is the driver for running `cargo test`. + /// + /// Currently this runs all tests for a DAG by passing a bunch of `-p foo` + /// arguments, and those arguments are discovered from `cargo metadata`. + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = self.compiler; + let target = self.target; + let mode = self.mode; + let test_kind = self.test_kind; + let krate = self.krate; + + builder.ensure(compile::Test { compiler, target }); + builder.ensure(RemoteCopyLibs { compiler, target }); + + // If we're not doing a full bootstrap but we're testing a stage2 version of + // libstd, then what we're actually testing is the libstd produced in + // stage1. Reflect that here by updating the compiler that we're working + // with automatically. + let compiler = if build.force_use_stage1(compiler, target) { + builder.compiler(1, compiler.host) + } else { + compiler.clone() + }; + + let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand()); + match mode { + Mode::Libstd => { + compile::std_cargo(build, &compiler, target, &mut cargo); + } + Mode::Libtest => { + compile::test_cargo(build, &compiler, target, &mut cargo); + } + Mode::Librustc => { + builder.ensure(compile::Rustc { compiler, target }); + compile::rustc_cargo(build, &mut cargo); + } + _ => panic!("can only test libraries"), + }; + let _folder = build.fold_output(|| { + format!("{}_stage{}-{}", test_kind.subcommand(), compiler.stage, krate) + }); + println!("{} {} stage{} ({} -> {})", test_kind, krate, compiler.stage, + &compiler.host, target); + + // Build up the base `cargo test` command. + // + // Pass in some standard flags then iterate over the graph we've discovered + // in `cargo metadata` with the maps above and figure out what `-p` + // arguments need to get passed. + if test_kind.subcommand() == "test" && !build.fail_fast { + cargo.arg("--no-fail-fast"); + } + if build.doc_tests { + cargo.arg("--doc"); + } + + cargo.arg("-p").arg(krate); + + // The tests are going to run with the *target* libraries, so we need to + // ensure that those libraries show up in the LD_LIBRARY_PATH equivalent. + // + // Note that to run the compiler we need to run with the *host* libraries, + // but our wrapper scripts arrange for that to be the case anyway. + let mut dylib_path = dylib_path(); + dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target))); + cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap()); + + cargo.arg("--"); + cargo.args(&build.config.cmd.test_args()); + + if build.config.quiet_tests { + cargo.arg("--quiet"); + } + + let _time = util::timeit(); + + if target.contains("emscripten") { + cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target)), + build.config.nodejs.as_ref().expect("nodejs not configured")); + } else if target.starts_with("wasm32") { + // Warn about running tests without the `wasm_syscall` feature enabled. + // The javascript shim implements the syscall interface so that test + // output can be correctly reported. + if !build.config.wasm_syscall { + println!("Libstd was built without `wasm_syscall` feature enabled: \ + test output may not be visible."); + } + + // On the wasm32-unknown-unknown target we're using LTO which is + // incompatible with `-C prefer-dynamic`, so disable that here + cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1"); + + let node = build.config.nodejs.as_ref() + .expect("nodejs not configured"); + let runner = format!("{} {}/src/etc/wasm32-shim.js", + node.display(), + build.src.display()); + cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target)), &runner); + } else if build.remote_tested(target) { + cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target)), + format!("{} run", + builder.tool_exe(Tool::RemoteTestClient).display())); + } + try_run(build, &mut cargo); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct CrateRustdoc { + host: Interned, + test_kind: TestKind, +} + +impl Step for CrateRustdoc { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.paths(&["src/librustdoc", "src/tools/rustdoc"]) + } + + fn make_run(run: RunConfig) { + let builder = run.builder; + + let test_kind = if builder.kind == Kind::Test { + TestKind::Test + } else if builder.kind == Kind::Bench { + TestKind::Bench + } else { + panic!("unexpected builder.kind in crate: {:?}", builder.kind); + }; + + builder.ensure(CrateRustdoc { + host: run.host, + test_kind, + }); + } + + fn run(self, builder: &Builder) { + let build = builder.build; + let test_kind = self.test_kind; + + let compiler = builder.compiler(builder.top_stage, self.host); + let target = compiler.host; + + let mut cargo = tool::prepare_tool_cargo(builder, + compiler, + target, + test_kind.subcommand(), + "src/tools/rustdoc"); + let _folder = build.fold_output(|| { + format!("{}_stage{}-rustdoc", test_kind.subcommand(), compiler.stage) + }); + println!("{} rustdoc stage{} ({} -> {})", test_kind, compiler.stage, + &compiler.host, target); + + if test_kind.subcommand() == "test" && !build.fail_fast { + cargo.arg("--no-fail-fast"); + } + + cargo.arg("-p").arg("rustdoc:0.0.0"); + + cargo.arg("--"); + cargo.args(&build.config.cmd.test_args()); + + if build.config.quiet_tests { + cargo.arg("--quiet"); + } + + let _time = util::timeit(); + + try_run(build, &mut cargo); + } +} + +fn envify(s: &str) -> String { + s.chars().map(|c| { + match c { + '-' => '_', + c => c, + } + }).flat_map(|c| c.to_uppercase()).collect() +} + +/// Some test suites are run inside emulators or on remote devices, and most +/// of our test binaries are linked dynamically which means we need to ship +/// the standard library and such to the emulator ahead of time. This step +/// represents this and is a dependency of all test suites. +/// +/// Most of the time this is a noop. For some steps such as shipping data to +/// QEMU we have to build our own tools so we've got conditional dependencies +/// on those programs as well. Note that the remote test client is built for +/// the build target (us) and the server is built for the target. +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct RemoteCopyLibs { + compiler: Compiler, + target: Interned, +} + +impl Step for RemoteCopyLibs { + type Output = (); + + fn should_run(run: ShouldRun) -> ShouldRun { + run.never() + } + + fn run(self, builder: &Builder) { + let build = builder.build; + let compiler = self.compiler; + let target = self.target; + if !build.remote_tested(target) { + return + } + + builder.ensure(compile::Test { compiler, target }); + + println!("REMOTE copy libs to emulator ({})", target); + t!(fs::create_dir_all(build.out.join("tmp"))); + + let server = builder.ensure(tool::RemoteTestServer { compiler, target }); + + // Spawn the emulator and wait for it to come online + let tool = builder.tool_exe(Tool::RemoteTestClient); + let mut cmd = Command::new(&tool); + cmd.arg("spawn-emulator") + .arg(target) + .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 + for f in t!(builder.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(&tool) + .arg("push") + .arg(f.path())); + } + } + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Distcheck; + +impl Step for Distcheck { + type Output = (); + const ONLY_BUILD: bool = true; + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("distcheck") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Distcheck); + } + + /// Run "distcheck", a 'make check' from a tarball + fn run(self, builder: &Builder) { + let build = builder.build; + + println!("Distcheck"); + let dir = build.out.join("tmp").join("distcheck"); + let _ = fs::remove_dir_all(&dir); + t!(fs::create_dir_all(&dir)); + + // Guarantee that these are built before we begin running. + builder.ensure(dist::PlainSourceTarball); + builder.ensure(dist::Src); + + let mut cmd = Command::new("tar"); + cmd.arg("-xzf") + .arg(builder.ensure(dist::PlainSourceTarball)) + .arg("--strip-components=1") + .current_dir(&dir); + build.run(&mut cmd); + build.run(Command::new("./configure") + .args(&build.config.configure_args) + .arg("--enable-vendor") + .current_dir(&dir)); + build.run(Command::new(build_helper::make(&build.build)) + .arg("check") + .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(builder.ensure(dist::Src)) + .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.initial_cargo) + .arg("generate-lockfile") + .arg("--manifest-path") + .arg(&toml) + .current_dir(&dir)); + } +} + +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub struct Bootstrap; + +impl Step for Bootstrap { + type Output = (); + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; + const ONLY_BUILD: bool = true; + + /// Test the build system itself + fn run(self, builder: &Builder) { + let build = builder.build; + let mut cmd = Command::new(&build.initial_cargo); + cmd.arg("test") + .current_dir(build.src.join("src/bootstrap")) + .env("CARGO_TARGET_DIR", build.out.join("bootstrap")) + .env("RUSTC_BOOTSTRAP", "1") + .env("RUSTC", &build.initial_rustc); + if !build.fail_fast { + cmd.arg("--no-fail-fast"); + } + cmd.arg("--").args(&build.config.cmd.test_args()); + try_run(build, &mut cmd); + } + + fn should_run(run: ShouldRun) -> ShouldRun { + run.path("src/bootstrap") + } + + fn make_run(run: RunConfig) { + run.builder.ensure(Bootstrap); + } +} diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 1617351af4cf1..9036eb044b5a5 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -11,7 +11,7 @@ use std::fs; use std::env; use std::path::PathBuf; -use std::process::Command; +use std::process::{Command, exit}; use Mode; use Compiler; @@ -22,7 +22,6 @@ use native; use channel::GitInfo; use cache::Interned; use toolstate::ToolState; -use build_helper::BuildExpectation; #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct CleanTools { @@ -38,24 +37,40 @@ impl Step for CleanTools { run.never() } - /// 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. fn run(self, builder: &Builder) { let build = builder.build; let compiler = self.compiler; let target = self.target; let mode = self.mode; - 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!(), + // This is for the original compiler, but if we're forced to use stage 1, then + // std/test/rustc stamps won't exist in stage 2, so we need to get those from stage 1, since + // we copy the libs forward. + let tools_dir = build.stage_out(compiler, Mode::Tool); + let compiler = if builder.force_use_stage1(compiler, target) { + builder.compiler(1, compiler.host) + } else { + compiler }; - let out_dir = build.cargo_out(compiler, Mode::Tool, target); - build.clear_if_dirty(&out_dir, &stamp); + + for &cur_mode in &[Mode::Libstd, Mode::Libtest, Mode::Librustc] { + let stamp = match cur_mode { + Mode::Libstd => libstd_stamp(build, compiler, target), + Mode::Libtest => libtest_stamp(build, compiler, target), + Mode::Librustc => librustc_stamp(build, compiler, target), + _ => panic!(), + }; + + if build.clear_if_dirty(&tools_dir, &stamp) { + break; + } + + // If we are a rustc tool, and std changed, we also need to clear ourselves out -- our + // dependencies depend on std. Therefore, we iterate up until our own mode. + if mode == cur_mode { + break; + } + } } } @@ -66,11 +81,11 @@ struct ToolBuild { tool: &'static str, path: &'static str, mode: Mode, - expectation: BuildExpectation, + is_ext_tool: bool, } impl Step for ToolBuild { - type Output = PathBuf; + type Output = Option; fn should_run(run: ShouldRun) -> ShouldRun { run.never() @@ -80,13 +95,13 @@ impl Step for ToolBuild { /// /// This will build the specified tool with the specified `host` compiler in /// `stage` into the normal cargo output directory. - fn run(self, builder: &Builder) -> PathBuf { + fn run(self, builder: &Builder) -> Option { let build = builder.build; let compiler = self.compiler; let target = self.target; let tool = self.tool; let path = self.path; - let expectation = self.expectation; + let is_ext_tool = self.is_ext_tool; match self.mode { Mode::Libstd => builder.ensure(compile::Std { compiler, target }), @@ -99,8 +114,26 @@ impl Step for ToolBuild { println!("Building stage{} tool {} ({})", compiler.stage, tool, target); let mut cargo = prepare_tool_cargo(builder, compiler, target, "build", path); - build.run_expecting(&mut cargo, expectation); - build.cargo_out(compiler, Mode::Tool, target).join(exe(tool, &compiler.host)) + let is_expected = build.try_run(&mut cargo); + build.save_toolstate(tool, if is_expected { + ToolState::TestFail + } else { + ToolState::BuildFail + }); + + if !is_expected { + if !is_ext_tool { + exit(1); + } else { + return None; + } + } else { + let cargo_out = build.cargo_out(compiler, Mode::Tool, target) + .join(exe(tool, &compiler.host)); + let bin = build.tools_dir(compiler).join(exe(tool, &compiler.host)); + copy(&cargo_out, &bin); + Some(bin) + } } } @@ -126,6 +159,10 @@ pub fn prepare_tool_cargo( cargo.env("LIBZ_SYS_STATIC", "1"); } + // if tools are using lzma we want to force the build script to build its + // own copy + cargo.env("LZMA_API_STATIC", "1"); + cargo.env("CFG_RELEASE_CHANNEL", &build.config.channel); cargo.env("CFG_VERSION", build.rust_version()); @@ -165,12 +202,12 @@ macro_rules! tool { } pub fn tool_default_stage(&self, tool: Tool) -> u32 { - // Compile the error-index in the top stage as it depends on - // rustdoc, so we want to avoid recompiling rustdoc twice if we - // can. Otherwise compile everything else in stage0 as there's - // no need to rebootstrap everything + // Compile the error-index in the same stage as rustdoc to avoid + // recompiling rustdoc twice if we can. Otherwise compile + // everything else in stage0 as there's no need to rebootstrap + // everything. match tool { - Tool::ErrorIndex => self.top_stage, + Tool::ErrorIndex if self.top_stage >= 2 => self.top_stage, _ => 0, } } @@ -204,8 +241,8 @@ macro_rules! tool { tool: $tool_name, mode: $mode, path: $path, - expectation: BuildExpectation::None, - }) + is_ext_tool: false, + }).expect("expected to build -- essential tool") } } )+ @@ -223,6 +260,7 @@ tool!( BuildManifest, "src/tools/build-manifest", "build-manifest", Mode::Libstd; RemoteTestClient, "src/tools/remote-test-client", "remote-test-client", Mode::Libstd; RustInstaller, "src/tools/rust-installer", "fabricate", Mode::Libstd; + RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes", Mode::Libstd; ); #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -252,8 +290,8 @@ impl Step for RemoteTestServer { tool: "remote-test-server", mode: Mode::Libstd, path: "src/tools/remote-test-server", - expectation: BuildExpectation::None, - }) + is_ext_tool: false, + }).expect("expected to build -- essential tool") } } @@ -304,6 +342,11 @@ impl Step for Rustdoc { target, "build", "src/tools/rustdoc"); + + // Most tools don't get debuginfo, but rustdoc should. + cargo.env("RUSTC_DEBUGINFO", builder.config.rust_debuginfo.to_string()) + .env("RUSTC_DEBUGINFO_LINES", builder.config.rust_debuginfo_lines.to_string()); + build.run(&mut cargo); // Cargo adds a number of paths to the dylib search path on windows, which results in // the wrong rustdoc being executed. To avoid the conflicting rustdocs, we name the "tool" @@ -365,75 +408,70 @@ impl Step for Cargo { tool: "cargo", mode: Mode::Librustc, path: "src/tools/cargo", - expectation: BuildExpectation::None, - }) + is_ext_tool: false, + }).expect("expected to build -- essential tool") } } -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct Clippy { - pub compiler: Compiler, - pub target: Interned, -} +macro_rules! tool_extended { + (($sel:ident, $builder:ident), + $($name:ident, + $toolstate:ident, + $path:expr, + $tool_name:expr, + $extra_deps:block;)+) => { + $( + #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] + pub struct $name { + pub compiler: Compiler, + pub target: Interned, + } -impl Step for Clippy { - type Output = PathBuf; - const DEFAULT: bool = false; - const ONLY_HOSTS: bool = true; + impl Step for $name { + type Output = Option; + const DEFAULT: bool = true; + const ONLY_HOSTS: bool = true; - fn should_run(run: ShouldRun) -> ShouldRun { - run.path("src/tools/clippy") - } + fn should_run(run: ShouldRun) -> ShouldRun { + let builder = run.builder; + run.path($path).default_condition(builder.build.config.extended) + } - fn make_run(run: RunConfig) { - run.builder.ensure(Clippy { - compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build), - target: run.target, - }); + fn make_run(run: RunConfig) { + run.builder.ensure($name { + compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build), + target: run.target, + }); + } + + fn run($sel, $builder: &Builder) -> Option { + $extra_deps + $builder.ensure(ToolBuild { + compiler: $sel.compiler, + target: $sel.target, + tool: $tool_name, + mode: Mode::Librustc, + path: $path, + is_ext_tool: true, + }) + } + } + )+ } +} - fn run(self, builder: &Builder) -> PathBuf { +tool_extended!((self, builder), + Cargofmt, rustfmt, "src/tools/rustfmt", "cargo-fmt", {}; + Clippy, clippy, "src/tools/clippy", "clippy-driver", { // Clippy depends on procedural macros (serde), which requires a full host // compiler to be available, so we need to depend on that. builder.ensure(compile::Rustc { compiler: self.compiler, target: builder.build.build, }); - builder.ensure(ToolBuild { - compiler: self.compiler, - target: self.target, - tool: "clippy", - mode: Mode::Librustc, - path: "src/tools/clippy", - expectation: BuildExpectation::None, - }) - } -} - -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct Rls { - pub compiler: Compiler, - pub target: Interned, -} - -impl Step for Rls { - type Output = PathBuf; - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - let builder = run.builder; - run.path("src/tools/rls").default_condition(builder.build.config.extended) - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Rls { - compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build), - target: run.target, - }); - } - - fn run(self, builder: &Builder) -> PathBuf { + }; + Miri, miri, "src/tools/miri", "miri", {}; + Rls, rls, "src/tools/rls", "rls", { builder.ensure(native::Openssl { target: self.target, }); @@ -443,87 +481,9 @@ impl Step for Rls { compiler: self.compiler, target: builder.build.build, }); - builder.ensure(ToolBuild { - compiler: self.compiler, - target: self.target, - tool: "rls", - mode: Mode::Librustc, - path: "src/tools/rls", - expectation: BuildExpectation::None, - }) - } -} - -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct Rustfmt { - pub compiler: Compiler, - pub target: Interned, -} - -impl Step for Rustfmt { - type Output = PathBuf; - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - let builder = run.builder; - run.path("src/tools/rustfmt").default_condition(builder.build.config.extended) - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Rustfmt { - compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build), - target: run.target, - }); - } - - fn run(self, builder: &Builder) -> PathBuf { - builder.ensure(ToolBuild { - compiler: self.compiler, - target: self.target, - tool: "rustfmt", - mode: Mode::Librustc, - path: "src/tools/rustfmt", - expectation: BuildExpectation::None, - }) - } -} - - -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct Miri { - pub compiler: Compiler, - pub target: Interned, -} - -impl Step for Miri { - type Output = PathBuf; - const DEFAULT: bool = true; - const ONLY_HOSTS: bool = true; - - fn should_run(run: ShouldRun) -> ShouldRun { - let build_miri = run.builder.build.config.test_miri; - run.path("src/tools/miri").default_condition(build_miri) - } - - fn make_run(run: RunConfig) { - run.builder.ensure(Miri { - compiler: run.builder.compiler(run.builder.top_stage, run.builder.build.build), - target: run.target, - }); - } - - fn run(self, builder: &Builder) -> PathBuf { - builder.ensure(ToolBuild { - compiler: self.compiler, - target: self.target, - tool: "miri", - mode: Mode::Librustc, - path: "src/tools/miri", - expectation: builder.build.config.toolstate.miri.passes(ToolState::Compiling), - }) - } -} + }; + Rustfmt, rustfmt, "src/tools/rustfmt", "rustfmt", {}; +); impl<'a> Builder<'a> { /// Get a `Command` which is ready to run `tool` in `stage` built for @@ -552,7 +512,7 @@ impl<'a> Builder<'a> { if compiler.host.contains("msvc") { let curpaths = env::var_os("PATH").unwrap_or_default(); let curpaths = env::split_paths(&curpaths).collect::>(); - for &(ref k, ref v) in self.cc[&compiler.host].0.env() { + for &(ref k, ref v) in self.cc[&compiler.host].env() { if k != "PATH" { continue } diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs index 9556a8b52df67..f63c1988906fb 100644 --- a/src/bootstrap/toolstate.rs +++ b/src/bootstrap/toolstate.rs @@ -8,41 +8,21 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use build_helper::BuildExpectation; - -#[derive(Copy, Clone, Debug, Deserialize, PartialEq, Eq)] +#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] +#[serde(rename_all = "kebab-case")] /// Whether a tool can be compiled, tested or neither pub enum ToolState { /// The tool compiles successfully, but the test suite fails - Compiling = 1, + TestFail = 1, /// The tool compiles successfully and its test suite passes - Testing = 2, + TestPass = 2, /// The tool can't even be compiled - Broken = 0, -} - -impl ToolState { - /// If a tool with the current toolstate should be working on - /// the given toolstate - pub fn passes(self, other: ToolState) -> BuildExpectation { - if self as usize >= other as usize { - BuildExpectation::Succeeding - } else { - BuildExpectation::Failing - } - } + BuildFail = 0, } impl Default for ToolState { fn default() -> Self { // err on the safe side - ToolState::Broken + ToolState::BuildFail } } - -#[derive(Copy, Clone, Debug, Deserialize, Default)] -/// Used to express which tools should (not) be compiled or tested. -/// This is created from `toolstate.toml`. -pub struct ToolStates { - pub miri: ToolState, -} diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index a521dd0945391..07941e588387c 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -14,8 +14,9 @@ //! not a lot of interesting happenings here unfortunately. use std::env; -use std::fs; -use std::io::{self, Write}; +use std::str; +use std::fs::{self, File, OpenOptions}; +use std::io::{self, Read, Write, Seek, SeekFrom}; use std::path::{Path, PathBuf}; use std::process::Command; use std::time::{SystemTime, Instant}; @@ -50,6 +51,36 @@ pub fn copy(src: &Path, dst: &Path) { t!(filetime::set_file_times(dst, atime, mtime)); } +/// Search-and-replaces within a file. (Not maximally efficiently: allocates a +/// new string for each replacement.) +pub fn replace_in_file(path: &Path, replacements: &[(&str, &str)]) { + let mut contents = String::new(); + let mut file = t!(OpenOptions::new().read(true).write(true).open(path)); + t!(file.read_to_string(&mut contents)); + for &(target, replacement) in replacements { + contents = contents.replace(target, replacement); + } + t!(file.seek(SeekFrom::Start(0))); + t!(file.set_len(0)); + t!(file.write_all(contents.as_bytes())); +} + +pub fn read_stamp_file(stamp: &Path) -> Vec { + let mut paths = Vec::new(); + let mut contents = Vec::new(); + t!(t!(File::open(stamp)).read_to_end(&mut contents)); + // This is the method we use for extracting paths from the stamp file passed to us. See + // run_cargo for more information (in compile.rs). + for part in contents.split(|b| *b == 0) { + if part.is_empty() { + continue + } + let path = PathBuf::from(t!(str::from_utf8(part))); + paths.push(path); + } + paths +} + /// Copies the `src` directory recursively to `dst`. Both are assumed to exist /// when this function is called. pub fn cp_r(src: &Path, dst: &Path) { @@ -284,7 +315,7 @@ pub fn symlink_dir(src: &Path, dest: &Path) -> io::Result<()> { let mut data = [0u8; MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; let db = data.as_mut_ptr() as *mut REPARSE_MOUNTPOINT_DATA_BUFFER; - let buf = &mut (*db).ReparseTarget as *mut _; + let buf = &mut (*db).ReparseTarget as *mut u16; let mut i = 0; // FIXME: this conversion is very hacky let v = br"\??\"; diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs index e81dab70b43e7..363bbd7954422 100644 --- a/src/build_helper/lib.rs +++ b/src/build_helper/lib.rs @@ -35,97 +35,55 @@ macro_rules! t { }) } -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum BuildExpectation { - Succeeding, - Failing, - None, -} - -pub fn run(cmd: &mut Command, expect: BuildExpectation) { +pub fn run(cmd: &mut Command) { println!("running: {:?}", cmd); - run_silent(cmd, expect); + run_silent(cmd); } -pub fn run_silent(cmd: &mut Command, expect: BuildExpectation) { - if !try_run_silent(cmd, expect) { +pub fn run_silent(cmd: &mut Command) { + if !try_run_silent(cmd) { std::process::exit(1); } } -pub fn try_run_silent(cmd: &mut Command, expect: BuildExpectation) -> bool { +pub fn try_run_silent(cmd: &mut Command) -> bool { let status = match cmd.status() { Ok(status) => status, Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}", cmd, e)), }; - process_status( - cmd, - status.success(), - expect, - || println!("\n\ncommand did not execute successfully: {:?}\n\ - expected success, got: {}\n\n", - cmd, - status)) -} - -fn process_status( - cmd: &Command, - success: bool, - expect: BuildExpectation, - f: F, -) -> bool { - use BuildExpectation::*; - match (expect, success) { - (None, false) => { f(); false }, - // Non-tool build succeeds, everything is good - (None, true) => true, - // Tool expected to work and is working - (Succeeding, true) => true, - // Tool expected to fail and is failing - (Failing, false) => { - println!("This failure is expected (see `src/tools/toolstate.toml`)"); - true - }, - // Tool expected to work, but is failing - (Succeeding, false) => { - f(); - println!("You can disable the tool in `src/tools/toolstate.toml`"); - false - }, - // Tool expected to fail, but is working - (Failing, true) => { - println!("Expected `{:?}` to fail, but it succeeded.\n\ - Please adjust `src/tools/toolstate.toml` accordingly", cmd); - false - } + if !status.success() { + println!("\n\ncommand did not execute successfully: {:?}\n\ + expected success, got: {}\n\n", + cmd, + status); } + status.success() } -pub fn run_suppressed(cmd: &mut Command, expect: BuildExpectation) { - if !try_run_suppressed(cmd, expect) { +pub fn run_suppressed(cmd: &mut Command) { + if !try_run_suppressed(cmd) { std::process::exit(1); } } -pub fn try_run_suppressed(cmd: &mut Command, expect: BuildExpectation) -> bool { +pub fn try_run_suppressed(cmd: &mut Command) -> bool { let output = match cmd.output() { Ok(status) => status, Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}", cmd, e)), }; - process_status( - cmd, - output.status.success(), - expect, - || println!("\n\ncommand did not execute successfully: {:?}\n\ + if !output.status.success() { + println!("\n\ncommand did not execute successfully: {:?}\n\ expected success, got: {}\n\n\ stdout ----\n{}\n\ stderr ----\n{}\n\n", cmd, output.status, String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr))) + String::from_utf8_lossy(&output.stderr)); + } + output.status.success() } pub fn gnu_target(target: &str) -> String { @@ -138,27 +96,6 @@ pub fn gnu_target(target: &str) -> String { } } -pub fn cc2ar(cc: &Path, target: &str) -> Option { - if target.contains("msvc") { - None - } else if target.contains("musl") { - Some(PathBuf::from("ar")) - } else if target.contains("openbsd") { - Some(PathBuf::from("ar")) - } else { - let parent = cc.parent().unwrap(); - let file = cc.file_name().unwrap().to_str().unwrap(); - for suffix in &["gcc", "cc", "clang"] { - if let Some(idx) = file.rfind(suffix) { - let mut file = file[..idx].to_owned(); - file.push_str("ar"); - return Some(parent.join(&file)); - } - } - Some(parent.join(file)) - } -} - pub fn make(host: &str) -> PathBuf { if host.contains("bitrig") || host.contains("dragonfly") || host.contains("freebsd") || host.contains("netbsd") || @@ -211,6 +148,9 @@ pub fn mtime(path: &Path) -> FileTime { /// /// Uses last-modified time checks to verify this. pub fn up_to_date(src: &Path, dst: &Path) -> bool { + if !dst.exists() { + return false; + } let threshold = mtime(dst); let meta = match fs::metadata(src) { Ok(meta) => meta, diff --git a/src/ci/docker/README.md b/src/ci/docker/README.md index adce6a00d4623..8d4dbc399986f 100644 --- a/src/ci/docker/README.md +++ b/src/ci/docker/README.md @@ -22,6 +22,48 @@ Images will output artifacts in an `obj` dir at the root of a repository. - `scripts` contains files shared by docker images - `disabled` contains images that are not built on travis +## Docker Toolbox on Windows + +For Windows before Windows 10, the docker images can be run on Windows via +[Docker Toolbox]. There are several preparation needs to be made before running +a Docker image. + +1. Stop the virtual machine from the terminal with `docker-machine stop` + +2. If your Rust source is placed outside of `C:\Users\**`, e.g. if you place the + repository in the `E:\rust` folder, please add a shared folder from + VirtualBox by: + + 1. Select the "default" virtual machine inside VirtualBox, then click + "Settings" + 2. Go to "Shared Folders", click "Add shared folder" (the folder icon with + a plus sign), fill in the following information, then click "OK": + + * Folder path: `E:\rust` + * Folder name: `e/rust` + * Read-only: ☐ *unchecked* + * Auto-mount: ☑ *checked* + * Make Permanent: ☑ *checked* + +3. VirtualBox might not support creating symbolic links inside a shared folder + by default. You can enable it manually by running these from `cmd.exe`: + + ```bat + cd "C:\Program Files\Oracle\VirtualBox" + VBoxManage setextradata default VBoxInternal2/SharedFoldersEnableSymlinksCreate/e/rust 1 + :: ^~~~~~ + :: folder name + ``` + +4. Restart the virtual machine from terminal with `docker-machine start`. + +To run the image, + +1. Launch the "Docker Quickstart Terminal". +2. Execute `./src/ci/docker/run.sh $image_name` as explained at the beginning. + +[Docker Toolbox]: https://www.docker.com/products/docker-toolbox + ## Cross toolchains A number of these images take quite a long time to compile as they're building @@ -137,7 +179,7 @@ For targets: `armv7-unknown-linux-gnueabihf` libraries like jemalloc. See the mk/cfg/arm(v7)-uknown-linux-gnueabi{,hf}.mk file in Rust's source code. -## `aarch64-linux-gnu.config` +### `aarch64-linux-gnu.config` For targets: `aarch64-unknown-linux-gnu` @@ -150,7 +192,7 @@ For targets: `aarch64-unknown-linux-gnu` - C compiler > gcc version = 5.2.0 - C compiler > C++ = ENABLE -- to cross compile LLVM -## `powerpc-linux-gnu.config` +### `powerpc-linux-gnu.config` For targets: `powerpc-unknown-linux-gnu` @@ -165,7 +207,7 @@ For targets: `powerpc-unknown-linux-gnu` - C compiler > gcc version = 4.9.3 - C compiler > C++ = ENABLE -- to cross compile LLVM -## `powerpc64-linux-gnu.config` +### `powerpc64-linux-gnu.config` For targets: `powerpc64-unknown-linux-gnu` @@ -184,7 +226,7 @@ For targets: `powerpc64-unknown-linux-gnu` (+) These CPU options match the configuration of the toolchains in RHEL6. -## `s390x-linux-gnu.config` +### `s390x-linux-gnu.config` For targets: `s390x-unknown-linux-gnu` diff --git a/src/ci/docker/arm-android/Dockerfile b/src/ci/docker/arm-android/Dockerfile index 49d07d28d3c8e..f2773a720cfbc 100644 --- a/src/ci/docker/arm-android/Dockerfile +++ b/src/ci/docker/arm-android/Dockerfile @@ -5,21 +5,27 @@ RUN sh /scripts/android-base-apt-get.sh COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ - download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip arm 9 + download_and_make_toolchain android-ndk-r15c-linux-x86_64.zip arm 14 +# Note: +# Do not upgrade to `openjdk-9-jre-headless`, as it will cause certificate error +# when installing the Android SDK (see PR #45193). This is unfortunate, but +# every search result suggested either disabling HTTPS or replacing JDK 9 by +# JDK 8 as the solution (e.g. https://stackoverflow.com/q/41421340). :| RUN dpkg --add-architecture i386 && \ apt-get update && \ apt-get install -y --no-install-recommends \ libgl1-mesa-glx \ libpulse0 \ libstdc++6:i386 \ - openjdk-9-jre-headless \ + openjdk-8-jre-headless \ tzdata COPY scripts/android-sdk.sh /scripts/ RUN . /scripts/android-sdk.sh && \ - download_and_create_avd tools_r25.2.5-linux.zip armeabi-v7a 18 + download_and_create_avd 4333796 armeabi-v7a 18 +ENV PATH=$PATH:/android/sdk/emulator ENV PATH=$PATH:/android/sdk/tools ENV PATH=$PATH:/android/sdk/platform-tools @@ -27,7 +33,7 @@ ENV TARGETS=arm-linux-androideabi ENV RUST_CONFIGURE_ARGS \ --target=$TARGETS \ - --arm-linux-androideabi-ndk=/android/ndk/arm-9 + --arm-linux-androideabi-ndk=/android/ndk/arm-14 ENV SCRIPT python2.7 ../x.py test --target $TARGETS diff --git a/src/ci/docker/asmjs/Dockerfile b/src/ci/docker/asmjs/Dockerfile index 28caf1fb57a48..ff0708459bc89 100644 --- a/src/ci/docker/asmjs/Dockerfile +++ b/src/ci/docker/asmjs/Dockerfile @@ -16,6 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/emscripten.sh /scripts/ RUN bash /scripts/emscripten.sh +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + ENV PATH=$PATH:/emsdk-portable ENV PATH=$PATH:/emsdk-portable/clang/e1.37.13_64bit/ ENV PATH=$PATH:/emsdk-portable/emscripten/1.37.13/ @@ -26,9 +29,6 @@ ENV EM_CONFIG=/emsdk-portable/.emscripten ENV TARGETS=asmjs-unknown-emscripten -ENV RUST_CONFIGURE_ARGS --target=$TARGETS +ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-emscripten ENV SCRIPT python2.7 ../x.py test --target $TARGETS - -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh diff --git a/src/ci/docker/cross/Dockerfile b/src/ci/docker/cross/Dockerfile deleted file mode 100644 index a83bbe9c60e8d..0000000000000 --- a/src/ci/docker/cross/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -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 \ - xz-utils \ - zlib1g-dev \ - g++-arm-linux-gnueabi \ - g++-arm-linux-gnueabihf \ - gcc-sparc64-linux-gnu \ - libc6-dev-sparc64-cross \ - bzip2 \ - patch \ - libssl-dev \ - pkg-config - -WORKDIR /tmp - -COPY cross/build-rumprun.sh /tmp/ -RUN ./build-rumprun.sh - -COPY cross/build-arm-musl.sh /tmp/ -RUN ./build-arm-musl.sh - -COPY cross/install-mips-musl.sh /tmp/ -RUN ./install-mips-musl.sh - -COPY cross/install-mipsel-musl.sh /tmp/ -RUN ./install-mipsel-musl.sh - -COPY cross/install-x86_64-redox.sh /tmp/ -RUN ./install-x86_64-redox.sh - -ENV TARGETS=asmjs-unknown-emscripten -ENV TARGETS=$TARGETS,wasm32-unknown-emscripten -ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd -ENV TARGETS=$TARGETS,mips-unknown-linux-musl -ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl -ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi -ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf -ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf -ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu -ENV TARGETS=$TARGETS,x86_64-unknown-redox - -ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ - CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \ - CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \ - CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc - -# Suppress some warnings in the openwrt toolchains we downloaded -ENV STAGING_DIR=/tmp - -ENV RUST_CONFIGURE_ARGS \ - --enable-extended \ - --target=$TARGETS \ - --musl-root-arm=/usr/local/arm-linux-musleabi \ - --musl-root-armhf=/usr/local/arm-linux-musleabihf \ - --musl-root-armv7=/usr/local/armv7-linux-musleabihf -ENV SCRIPT python2.7 ../x.py dist --target $TARGETS - -# sccache -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh diff --git a/src/ci/docker/cross/build-arm-musl.sh b/src/ci/docker/cross/build-arm-musl.sh deleted file mode 100755 index 938e69834e434..0000000000000 --- a/src/ci/docker/cross/build-arm-musl.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/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 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex - -MUSL=1.1.16 - -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 - rm /tmp/build.log - set -x -} - -curl -O https://www.musl-libc.org/releases/musl-$MUSL.tar.gz -tar xf musl-$MUSL.tar.gz -cd musl-$MUSL -CC=arm-linux-gnueabi-gcc \ -CFLAGS="-march=armv6 -marm" \ - hide_output ./configure \ - --prefix=/usr/local/arm-linux-musleabi \ - --enable-wrapper=gcc -hide_output make -j$(nproc) -hide_output make install -cd .. -rm -rf musl-$MUSL - -tar xf musl-$MUSL.tar.gz -cd musl-$MUSL -CC=arm-linux-gnueabihf-gcc \ -CFLAGS="-march=armv6 -marm" \ - hide_output ./configure \ - --prefix=/usr/local/arm-linux-musleabihf \ - --enable-wrapper=gcc -hide_output make -j$(nproc) -hide_output make install -cd .. -rm -rf musl-$MUSL - -tar xf musl-$MUSL.tar.gz -cd musl-$MUSL -CC=arm-linux-gnueabihf-gcc \ -CFLAGS="-march=armv7-a" \ - hide_output ./configure \ - --prefix=/usr/local/armv7-linux-musleabihf \ - --enable-wrapper=gcc -hide_output make -j$(nproc) -hide_output make install -cd .. -rm -rf musl-$MUSL* - -ln -nsf ../arm-linux-musleabi/bin/musl-gcc /usr/local/bin/arm-linux-musleabi-gcc -ln -nsf ../arm-linux-musleabihf/bin/musl-gcc /usr/local/bin/arm-linux-musleabihf-gcc -ln -nsf ../armv7-linux-musleabihf/bin/musl-gcc /usr/local/bin/armv7-linux-musleabihf-gcc - -curl -L https://github.com/llvm-mirror/llvm/archive/release_39.tar.gz | tar xzf - -curl -L https://github.com/llvm-mirror/libunwind/archive/release_39.tar.gz | tar xzf - - -mkdir libunwind-build -cd libunwind-build -cmake ../libunwind-release_39 \ - -DLLVM_PATH=/tmp/llvm-release_39 \ - -DLIBUNWIND_ENABLE_SHARED=0 \ - -DCMAKE_C_COMPILER=arm-linux-gnueabi-gcc \ - -DCMAKE_CXX_COMPILER=arm-linux-gnueabi-g++ \ - -DCMAKE_C_FLAGS="-march=armv6 -marm" \ - -DCMAKE_CXX_FLAGS="-march=armv6 -marm" -make -j$(nproc) -cp lib/libunwind.a /usr/local/arm-linux-musleabi/lib -cd .. -rm -rf libunwind-build - -mkdir libunwind-build -cd libunwind-build -cmake ../libunwind-release_39 \ - -DLLVM_PATH=/tmp/llvm-release_39 \ - -DLIBUNWIND_ENABLE_SHARED=0 \ - -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ - -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ - -DCMAKE_C_FLAGS="-march=armv6 -marm" \ - -DCMAKE_CXX_FLAGS="-march=armv6 -marm" -make -j$(nproc) -cp lib/libunwind.a /usr/local/arm-linux-musleabihf/lib -cd .. -rm -rf libunwind-build - -mkdir libunwind-build -cd libunwind-build -cmake ../libunwind-release_39 \ - -DLLVM_PATH=/tmp/llvm-release_39 \ - -DLIBUNWIND_ENABLE_SHARED=0 \ - -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc \ - -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ \ - -DCMAKE_C_FLAGS="-march=armv7-a" \ - -DCMAKE_CXX_FLAGS="-march=armv7-a" -make -j$(nproc) -cp lib/libunwind.a /usr/local/armv7-linux-musleabihf/lib -cd .. -rm -rf libunwind-build - -rm -rf libunwind-release_39 -rm -rf llvm-release_39 diff --git a/src/ci/docker/disabled/aarch64-gnu/Dockerfile b/src/ci/docker/disabled/aarch64-gnu/Dockerfile index 9a0e45312235e..fedb4094c8aaa 100644 --- a/src/ci/docker/disabled/aarch64-gnu/Dockerfile +++ b/src/ci/docker/disabled/aarch64-gnu/Dockerfile @@ -31,7 +31,7 @@ WORKDIR /build # The `config` config file was a previously generated config file for # the kernel. This file was generated by running `make defconfig` # followed by `make menuconfig` and then enabling the IPv6 protocol page. -COPY disabled/aarch64-gnu/config /build/.config +COPY aarch64-gnu/config /build/.config RUN curl https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.42.tar.xz | \ tar xJf - && \ cd /build/linux-4.4.42 && \ diff --git a/src/ci/docker/disabled/dist-aarch64-android/Dockerfile b/src/ci/docker/disabled/dist-aarch64-android/Dockerfile index 20d823a3d7338..ce5e8cfaf0958 100644 --- a/src/ci/docker/disabled/dist-aarch64-android/Dockerfile +++ b/src/ci/docker/disabled/dist-aarch64-android/Dockerfile @@ -5,7 +5,7 @@ RUN sh /scripts/android-base-apt-get.sh COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ - download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip arm64 21 + download_and_make_toolchain android-ndk-r15c-linux-x86_64.zip arm64 21 ENV PATH=$PATH:/android/ndk/arm64-21/bin diff --git a/src/ci/docker/disabled/dist-armv7-android/Dockerfile b/src/ci/docker/disabled/dist-armv7-android/Dockerfile index 3435d641a13c5..3177fa2147fa1 100644 --- a/src/ci/docker/disabled/dist-armv7-android/Dockerfile +++ b/src/ci/docker/disabled/dist-armv7-android/Dockerfile @@ -5,17 +5,17 @@ RUN sh /scripts/android-base-apt-get.sh COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ - download_ndk android-ndk-r13b-linux-x86_64.zip && \ - make_standalone_toolchain arm 9 && \ + download_ndk android-ndk-r15c-linux-x86_64.zip && \ + make_standalone_toolchain arm 14 && \ make_standalone_toolchain arm 21 && \ remove_ndk RUN chmod 777 /android/ndk && \ ln -s /android/ndk/arm-21 /android/ndk/arm -ENV PATH=$PATH:/android/ndk/arm-9/bin +ENV PATH=$PATH:/android/ndk/arm-14/bin -ENV DEP_Z_ROOT=/android/ndk/arm-9/sysroot/usr/ +ENV DEP_Z_ROOT=/android/ndk/arm-14/sysroot/usr/ ENV HOSTS=armv7-linux-androideabi @@ -27,18 +27,18 @@ ENV RUST_CONFIGURE_ARGS \ --enable-extended \ --enable-cargo-openssl-static -# We support api level 9, but api level 21 is required to build llvm. To +# We support api level 14, but api level 21 is required to build llvm. To # overcome this problem we use a ndk with api level 21 to build llvm and then -# switch to a ndk with api level 9 to complete the build. When the linker is +# switch to a ndk with api level 14 to complete the build. When the linker is # invoked there are missing symbols (like sigsetempty, not available with api -# level 9), the default linker behavior is to generate an error, to allow the +# level 14), the default linker behavior is to generate an error, to allow the # build to finish we use --warn-unresolved-symbols. Note that the missing # symbols does not affect std, only the compiler (llvm) and cargo (openssl). ENV SCRIPT \ python2.7 ../x.py build src/llvm --host $HOSTS --target $HOSTS && \ (export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \ rm /android/ndk/arm && \ - ln -s /android/ndk/arm-9 /android/ndk/arm && \ + ln -s /android/ndk/arm-14 /android/ndk/arm && \ python2.7 ../x.py dist --host $HOSTS --target $HOSTS) COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/disabled/dist-i686-android/Dockerfile b/src/ci/docker/disabled/dist-i686-android/Dockerfile index 4bb7053760f9c..ace9c4feb4f3b 100644 --- a/src/ci/docker/disabled/dist-i686-android/Dockerfile +++ b/src/ci/docker/disabled/dist-i686-android/Dockerfile @@ -5,17 +5,17 @@ RUN sh /scripts/android-base-apt-get.sh COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ - download_ndk android-ndk-r13b-linux-x86_64.zip && \ - make_standalone_toolchain x86 9 && \ + download_ndk android-ndk-r15c-linux-x86_64.zip && \ + make_standalone_toolchain x86 14 && \ make_standalone_toolchain x86 21 && \ remove_ndk RUN chmod 777 /android/ndk && \ ln -s /android/ndk/x86-21 /android/ndk/x86 -ENV PATH=$PATH:/android/ndk/x86-9/bin +ENV PATH=$PATH:/android/ndk/x86-14/bin -ENV DEP_Z_ROOT=/android/ndk/x86-9/sysroot/usr/ +ENV DEP_Z_ROOT=/android/ndk/x86-14/sysroot/usr/ ENV HOSTS=i686-linux-android @@ -27,18 +27,18 @@ ENV RUST_CONFIGURE_ARGS \ --enable-extended \ --enable-cargo-openssl-static -# We support api level 9, but api level 21 is required to build llvm. To +# We support api level 14, but api level 21 is required to build llvm. To # overcome this problem we use a ndk with api level 21 to build llvm and then -# switch to a ndk with api level 9 to complete the build. When the linker is +# switch to a ndk with api level 14 to complete the build. When the linker is # invoked there are missing symbols (like sigsetempty, not available with api -# level 9), the default linker behavior is to generate an error, to allow the +# level 14), the default linker behavior is to generate an error, to allow the # build to finish we use --warn-unresolved-symbols. Note that the missing # symbols does not affect std, only the compiler (llvm) and cargo (openssl). ENV SCRIPT \ python2.7 ../x.py build src/llvm --host $HOSTS --target $HOSTS && \ (export RUSTFLAGS="\"-C link-arg=-Wl,--warn-unresolved-symbols\""; \ rm /android/ndk/x86 && \ - ln -s /android/ndk/x86-9 /android/ndk/x86 && \ + ln -s /android/ndk/x86-14 /android/ndk/x86 && \ python2.7 ../x.py dist --host $HOSTS --target $HOSTS) COPY scripts/sccache.sh /scripts/ diff --git a/src/ci/docker/disabled/dist-x86_64-android/Dockerfile b/src/ci/docker/disabled/dist-x86_64-android/Dockerfile index 525b218417b67..322d26f0adc4c 100644 --- a/src/ci/docker/disabled/dist-x86_64-android/Dockerfile +++ b/src/ci/docker/disabled/dist-x86_64-android/Dockerfile @@ -5,7 +5,7 @@ RUN sh /scripts/android-base-apt-get.sh COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ - download_and_make_toolchain android-ndk-r13b-linux-x86_64.zip x86_64 21 + download_and_make_toolchain android-ndk-r15c-linux-x86_64.zip x86_64 21 ENV PATH=$PATH:/android/ndk/x86_64-21/bin diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/Dockerfile b/src/ci/docker/disabled/dist-x86_64-dragonfly/Dockerfile new file mode 100644 index 0000000000000..f3509efdb988b --- /dev/null +++ b/src/ci/docker/disabled/dist-x86_64-dragonfly/Dockerfile @@ -0,0 +1,36 @@ +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 \ + bsdtar \ + pkg-config + + +COPY dist-x86_64-dragonfly/build-toolchain.sh /tmp/ +COPY dist-x86_64-dragonfly/patch-toolchain /tmp/ +RUN /tmp/build-toolchain.sh /tmp/patch-toolchain + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV \ + AR_x86_64_unknown_dragonfly=x86_64-unknown-dragonfly-ar \ + CC_x86_64_unknown_dragonfly=x86_64-unknown-dragonfly-gcc \ + CXX_x86_64_unknown_dragonfly=x86_64-unknown-dragonfly-g++ + +ENV HOSTS=x86_64-unknown-dragonfly + +ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended +ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh b/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh new file mode 100755 index 0000000000000..2ebbe0cdee9b8 --- /dev/null +++ b/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh @@ -0,0 +1,120 @@ +#!/usr/bin/env 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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -ex + +ARCH=x86_64 +PATCH_TOOLCHAIN=$1 +BINUTILS=2.25.1 +GCC=6.4.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-dragonfly +hide_output make -j10 +hide_output make install +cd ../.. +rm -rf binutils + +# Next, download the DragonFly libc and relevant header files + +URL=http://mirror-master.dragonflybsd.org/iso-images/dfly-x86_64-5.0.0_REL.iso.bz2 +mkdir dragonfly +curl $URL | bzcat | bsdtar xf - -C dragonfly ./usr/include ./usr/lib ./lib + +dst=/usr/local/$ARCH-unknown-dragonfly + +mkdir -p $dst/lib +cp -r dragonfly/usr/include $dst/ +cp dragonfly/usr/lib/crt1.o $dst/lib +cp dragonfly/usr/lib/Scrt1.o $dst/lib +cp dragonfly/usr/lib/crti.o $dst/lib +cp dragonfly/usr/lib/crtn.o $dst/lib +cp dragonfly/usr/lib/libc.a $dst/lib +cp dragonfly/usr/lib/libutil.a $dst/lib +cp dragonfly/usr/lib/libm.a $dst/lib +cp dragonfly/usr/lib/librt.so.0 $dst/lib +cp dragonfly/usr/lib/libexecinfo.so.1 $dst/lib +cp dragonfly/lib/libc.so.8 $dst/lib +cp dragonfly/lib/libm.so.4 $dst/lib +cp dragonfly/lib/libutil.so.4 $dst/lib +cp dragonfly/usr/lib/libpthread.so $dst/lib/libpthread.so +cp dragonfly/usr/lib/thread/libthread_xu.so.2 $dst/lib/libpthread.so.0 + +ln -s libc.so.8 $dst/lib/libc.so +ln -s libm.so.4 $dst/lib/libm.so +ln -s librt.so.0 $dst/lib/librt.so +ln -s libutil.so.4 $dst/lib/libutil.so +ln -s libexecinfo.so.1 $dst/lib/libexecinfo.so +rm -rf dragonfly + +# Finally, download and build gcc to target DragonFly +mkdir gcc +cd gcc +curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.gz | tar xzf - +cd gcc-$GCC + +# The following three patches are taken from DragonFly's dports collection: +# https://github.com/DragonFlyBSD/DPorts/tree/master/lang/gcc5 +# The dports specification for gcc5 contains a few more patches, but they are +# not relevant in this situation, as they are for a language we don't need +# (e.g. java), or a platform which is not supported by DragonFly (e.g. i386, +# powerpc64, ia64, arm). +# +# These patches probably only need to be updated in case the gcc version is +# updated. + +patch -p0 < $PATCH_TOOLCHAIN + +./contrib/download_prerequisites + +mkdir ../gcc-build +cd ../gcc-build +hide_output ../gcc-$GCC/configure \ + --enable-languages=c,c++ \ + --target=$ARCH-unknown-dragonfly \ + --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 diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/patch-toolchain b/src/ci/docker/disabled/dist-x86_64-dragonfly/patch-toolchain new file mode 100644 index 0000000000000..98424309ee23d --- /dev/null +++ b/src/ci/docker/disabled/dist-x86_64-dragonfly/patch-toolchain @@ -0,0 +1,23 @@ +--- libstdc++-v3/config/os/bsd/dragonfly/os_defines.h.orig 2015-07-09 16:08:54 UTC ++++ libstdc++-v3/config/os/bsd/dragonfly/os_defines.h +@@ -29,4 +29,9 @@ + // System-specific #define, typedefs, corrections, etc, go here. This + // file will come before all others. + ++#define _GLIBCXX_USE_C99_CHECK 1 ++#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999)) ++#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1 ++#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED) ++ + #endif +--- libstdc++-v3/configure.orig 2016-05-26 18:34:47.163132921 +0200 ++++ libstdc++-v3/configure 2016-05-26 18:35:29.594590648 +0200 +@@ -52013,7 +52013,7 @@ + + ;; + +- *-freebsd*) ++ *-freebsd* | *-dragonfly*) + SECTION_FLAGS='-ffunction-sections -fdata-sections' + + diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh b/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh index 0776d448984ee..a1115e254b5b2 100755 --- a/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh +++ b/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh b/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh index 0f6034cdb8620..a37532e203aa4 100755 --- a/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh +++ b/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/disabled/wasm32-exp/Dockerfile b/src/ci/docker/disabled/wasm32-exp/Dockerfile index 6323369421bb4..8653b0e8b465e 100644 --- a/src/ci/docker/disabled/wasm32-exp/Dockerfile +++ b/src/ci/docker/disabled/wasm32-exp/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # emscripten COPY scripts/emscripten-wasm.sh /scripts/ -COPY disabled/wasm32-exp/node.sh /usr/local/bin/node +COPY wasm32-exp/node.sh /usr/local/bin/node RUN bash /scripts/emscripten-wasm.sh # cache diff --git a/src/ci/docker/disabled/wasm32-exp/node.sh b/src/ci/docker/disabled/wasm32-exp/node.sh index dfa7f221ffa20..2bfddb0de99b0 100755 --- a/src/ci/docker/disabled/wasm32-exp/node.sh +++ b/src/ci/docker/disabled/wasm32-exp/node.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-aarch64-linux/build-toolchains.sh b/src/ci/docker/dist-aarch64-linux/build-toolchains.sh index 94f785c96f815..22b719bb30755 100755 --- a/src/ci/docker/dist-aarch64-linux/build-toolchains.sh +++ b/src/ci/docker/dist-aarch64-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-android/Dockerfile b/src/ci/docker/dist-android/Dockerfile index a36f7fc1ac528..5d7545a3c2a95 100644 --- a/src/ci/docker/dist-android/Dockerfile +++ b/src/ci/docker/dist-android/Dockerfile @@ -6,9 +6,9 @@ RUN sh /scripts/android-base-apt-get.sh # ndk COPY scripts/android-ndk.sh /scripts/ RUN . /scripts/android-ndk.sh && \ - download_ndk android-ndk-r13b-linux-x86_64.zip && \ - make_standalone_toolchain arm 9 && \ - make_standalone_toolchain x86 9 && \ + download_ndk android-ndk-r15c-linux-x86_64.zip && \ + make_standalone_toolchain arm 14 && \ + make_standalone_toolchain x86 14 && \ make_standalone_toolchain arm64 21 && \ make_standalone_toolchain x86_64 21 && \ remove_ndk @@ -23,9 +23,9 @@ ENV TARGETS=$TARGETS,x86_64-linux-android ENV RUST_CONFIGURE_ARGS \ --target=$TARGETS \ --enable-extended \ - --arm-linux-androideabi-ndk=/android/ndk/arm-9 \ - --armv7-linux-androideabi-ndk=/android/ndk/arm-9 \ - --i686-linux-android-ndk=/android/ndk/x86-9 \ + --arm-linux-androideabi-ndk=/android/ndk/arm-14 \ + --armv7-linux-androideabi-ndk=/android/ndk/arm-14 \ + --i686-linux-android-ndk=/android/ndk/x86-14 \ --aarch64-linux-android-ndk=/android/ndk/arm64-21 \ --x86_64-linux-android-ndk=/android/ndk/x86_64-21 diff --git a/src/ci/docker/dist-arm-linux/build-toolchains.sh b/src/ci/docker/dist-arm-linux/build-toolchains.sh index f78ecf9381a1f..c53cca0bb982c 100755 --- a/src/ci/docker/dist-arm-linux/build-toolchains.sh +++ b/src/ci/docker/dist-arm-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-armhf-linux/build-toolchains.sh b/src/ci/docker/dist-armhf-linux/build-toolchains.sh index df1134d5483c2..964182a5ad544 100755 --- a/src/ci/docker/dist-armhf-linux/build-toolchains.sh +++ b/src/ci/docker/dist-armhf-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-armv7-linux/build-toolchains.sh b/src/ci/docker/dist-armv7-linux/build-toolchains.sh index 2d395fee792ec..40adfe5d53e0b 100755 --- a/src/ci/docker/dist-armv7-linux/build-toolchains.sh +++ b/src/ci/docker/dist-armv7-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-fuchsia/Dockerfile b/src/ci/docker/dist-fuchsia/Dockerfile deleted file mode 100644 index e18cb453baf6f..0000000000000 --- a/src/ci/docker/dist-fuchsia/Dockerfile +++ /dev/null @@ -1,42 +0,0 @@ -FROM ubuntu:16.04 - -RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ - make \ - ninja-build \ - file \ - curl \ - ca-certificates \ - python2.7-dev \ - git \ - sudo \ - bzip2 \ - xz-utils \ - swig \ - libedit-dev \ - libncurses5-dev \ - patch - -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 - -WORKDIR /tmp -COPY dist-fuchsia/shared.sh dist-fuchsia/build-toolchain.sh dist-fuchsia/compiler-rt-dso-handle.patch /tmp/ -RUN /tmp/build-toolchain.sh - -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh - -ENV \ - AR_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-ar \ - CC_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang \ - CXX_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang++ \ - AR_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-ar \ - CC_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang \ - CXX_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang++ - -ENV TARGETS=x86_64-unknown-fuchsia -ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia - -ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended -ENV SCRIPT python2.7 ../x.py dist --target $TARGETS diff --git a/src/ci/docker/dist-fuchsia/build-toolchain.sh b/src/ci/docker/dist-fuchsia/build-toolchain.sh deleted file mode 100755 index 10b285a546655..0000000000000 --- a/src/ci/docker/dist-fuchsia/build-toolchain.sh +++ /dev/null @@ -1,126 +0,0 @@ -#!/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 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -# ignore-tidy-linelength - -set -ex -source shared.sh - -# Download sources -SRCS=( - "https://fuchsia.googlesource.com/magenta magenta d17073dc8de344ead3b65e8cc6a12280dec38c84" - "https://llvm.googlesource.com/llvm llvm 3f58a16d8eec385e2b3ebdfbb84ff9d3bf27e025" - "https://llvm.googlesource.com/clang llvm/tools/clang 727ea63e6e82677f6e10e05e08bc7d6bdbae3111" - "https://llvm.googlesource.com/lld llvm/tools/lld a31286c1366e5e89b8872803fded13805a1a084b" - "https://llvm.googlesource.com/lldb llvm/tools/lldb 0b2384abec4cb99ad66687712e07dee4dd9d187e" - "https://llvm.googlesource.com/compiler-rt llvm/runtimes/compiler-rt 9093a35c599fe41278606a20b51095ea8bd5a081" - "https://llvm.googlesource.com/libcxx llvm/runtimes/libcxx 607e0c71ec4f7fd377ad3f6c47b08dbe89f66eaa" - "https://llvm.googlesource.com/libcxxabi llvm/runtimes/libcxxabi 0a3a1a8a5ca5ef69e0f6b7d5b9d13e63e6fd2c19" - "https://llvm.googlesource.com/libunwind llvm/runtimes/libunwind e128003563d99d9ee62247c4cee40f07d21c03e3" -) - -fetch() { - mkdir -p $2 - pushd $2 > /dev/null - git init - git remote add origin $1 - git fetch --depth=1 origin $3 - git reset --hard FETCH_HEAD - popd > /dev/null -} - -for i in "${SRCS[@]}"; do - fetch $i -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 -cd llvm -mkdir build -cd build -hide_output cmake -GNinja \ - -DFUCHSIA_SYSROOT=${PWD}/../../magenta/third_party/ulib/musl \ - -DLLVM_ENABLE_LTO=OFF \ - -DCLANG_BOOTSTRAP_PASSTHROUGH=LLVM_ENABLE_LTO \ - -C ../tools/clang/cmake/caches/Fuchsia.cmake \ - .. -hide_output ninja stage2-distribution -hide_output ninja stage2-install-distribution -cd ../.. - -# Build sysroot -rm -rf llvm/runtimes/compiler-rt -./magenta/scripts/download-toolchain - -build_sysroot() { - local arch="$1" - - case "${arch}" in - x86_64) tgt="magenta-pc-x86-64" ;; - aarch64) tgt="magenta-qemu-arm64" ;; - esac - - hide_output make -C magenta -j$(getconf _NPROCESSORS_ONLN) $tgt - dst=/usr/local/${arch}-unknown-fuchsia - mkdir -p $dst - cp -r magenta/build-${tgt}/sysroot/include $dst/ - cp -r magenta/build-${tgt}/sysroot/lib $dst/ - - cd llvm - mkdir build-runtimes-${arch} - cd build-runtimes-${arch} - hide_output cmake -GNinja \ - -DCMAKE_C_COMPILER=clang \ - -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_AR=/usr/local/bin/llvm-ar \ - -DCMAKE_RANLIB=/usr/local/bin/llvm-ranlib \ - -DCMAKE_INSTALL_PREFIX= \ - -DLLVM_MAIN_SRC_DIR=${PWD}/.. \ - -DLLVM_BINARY_DIR=${PWD}/../build \ - -DLLVM_ENABLE_WERROR=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - -DLLVM_INCLUDE_TESTS=ON \ - -DCMAKE_SYSTEM_NAME=Fuchsia \ - -DCMAKE_C_COMPILER_TARGET=${arch}-fuchsia \ - -DCMAKE_CXX_COMPILER_TARGET=${arch}-fuchsia \ - -DUNIX=1 \ - -DLIBCXX_HAS_MUSL_LIBC=ON \ - -DLIBCXXABI_USE_LLVM_UNWINDER=ON \ - -DCMAKE_SYSROOT=${dst} \ - -DCMAKE_C_COMPILER_FORCED=TRUE \ - -DCMAKE_CXX_COMPILER_FORCED=TRUE \ - -DLLVM_ENABLE_LIBCXX=ON \ - -DCMAKE_EXE_LINKER_FLAGS="-nodefaultlibs -lc" \ - -DCMAKE_SHARED_LINKER_FLAGS="$(clang --target=${arch}-fuchsia -print-libgcc-file-name)" \ - ../runtimes - hide_output env DESTDIR="${dst}" ninja install - cd ../.. -} - -build_sysroot "x86_64" -build_sysroot "aarch64" - -rm -rf magenta llvm - -for arch in x86_64 aarch64; do - for tool in clang clang++; do - cat >/usr/local/bin/${arch}-unknown-fuchsia-${tool} < or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex - -# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well -export CFLAGS="-fPIC -Wa,-mrelax-relocations=no" -export CXXFLAGS="-Wa,-mrelax-relocations=no" - -MUSL=musl-1.1.16 -curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - -cd $MUSL -CC=gcc \ - CFLAGS="$CFLAGS -m32" \ - ./configure --prefix=/musl-i686 --disable-shared \ - --target=i686 -make AR=ar RANLIB=ranlib -j10 -make install -cd .. - -# To build MUSL we're going to need a libunwind lying around, so acquire that -# here and build it. -curl -L https://github.com/llvm-mirror/llvm/archive/release_37.tar.gz | tar xzf - -curl -L https://github.com/llvm-mirror/libunwind/archive/release_37.tar.gz | tar xzf - - -# Whoa what's this mysterious patch we're applying to libunwind! Why are we -# swapping the values of ESP/EBP in libunwind?! -# -# Discovered in #35599 it turns out that the vanilla build of libunwind is not -# suitable for unwinding 32-bit musl. After some investigation it ended up -# looking like the register values for ESP/EBP were indeed incorrect (swapped) -# in the source. Similar commits in libunwind (r280099 and r282589) have noticed -# this for other platforms, and we just need to realize it for musl linux as -# well. -# -# More technical info can be found at #35599 -cd libunwind-release_37 -patch -Np1 < /build/musl-libunwind-patch.patch -cd .. - -mkdir libunwind-build -cd libunwind-build -CFLAGS="$CFLAGS -m32" CXXFLAGS="$CXXFLAGS -m32" cmake ../libunwind-release_37 \ - -DLLVM_PATH=/build/llvm-release_37 \ - -DLIBUNWIND_ENABLE_SHARED=0 -make -j10 -cp lib/libunwind.a /musl-i686/lib diff --git a/src/ci/docker/dist-i586-gnu-i686-musl/musl-libunwind-patch.patch b/src/ci/docker/dist-i586-gnu-i686-musl/musl-libunwind-patch.patch deleted file mode 100644 index 99cd685b72d17..0000000000000 --- a/src/ci/docker/dist-i586-gnu-i686-musl/musl-libunwind-patch.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/include/libunwind.h b/include/libunwind.h -index c5b9633..1360eb2 100644 ---- a/include/libunwind.h -+++ b/include/libunwind.h -@@ -151,8 +151,8 @@ enum { - UNW_X86_ECX = 1, - UNW_X86_EDX = 2, - UNW_X86_EBX = 3, -- UNW_X86_EBP = 4, -- UNW_X86_ESP = 5, -+ UNW_X86_ESP = 4, -+ UNW_X86_EBP = 5, - UNW_X86_ESI = 6, - UNW_X86_EDI = 7 - }; diff --git a/src/ci/docker/dist-i686-freebsd/Dockerfile b/src/ci/docker/dist-i686-freebsd/Dockerfile index b82d227b3ef2e..673fa4c0c4bc0 100644 --- a/src/ci/docker/dist-i686-freebsd/Dockerfile +++ b/src/ci/docker/dist-i686-freebsd/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ + clang \ make \ file \ curl \ @@ -16,16 +16,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libssl-dev \ pkg-config -COPY dist-i686-freebsd/build-toolchain.sh /tmp/ -RUN /tmp/build-toolchain.sh i686 +COPY scripts/freebsd-toolchain.sh /tmp/ +RUN /tmp/freebsd-toolchain.sh i686 COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh ENV \ AR_i686_unknown_freebsd=i686-unknown-freebsd10-ar \ - CC_i686_unknown_freebsd=i686-unknown-freebsd10-gcc \ - CXX_i686_unknown_freebsd=i686-unknown-freebsd10-g++ + CC_i686_unknown_freebsd=i686-unknown-freebsd10-clang \ + CXX_i686_unknown_freebsd=i686-unknown-freebsd10-clang++ ENV HOSTS=i686-unknown-freebsd diff --git a/src/ci/docker/dist-i686-freebsd/build-toolchain.sh b/src/ci/docker/dist-i686-freebsd/build-toolchain.sh deleted file mode 100755 index 8343327c33bf2..0000000000000 --- a/src/ci/docker/dist-i686-freebsd/build-toolchain.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/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 or the MIT license -# , 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=6.4.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.gz | tar xzf - -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 diff --git a/src/ci/docker/dist-i686-linux/Dockerfile b/src/ci/docker/dist-i686-linux/Dockerfile index a5d776af19daf..5e405aa72e83d 100644 --- a/src/ci/docker/dist-i686-linux/Dockerfile +++ b/src/ci/docker/dist-i686-linux/Dockerfile @@ -85,7 +85,9 @@ ENV RUST_CONFIGURE_ARGS \ --host=$HOSTS \ --enable-extended \ --enable-sanitizers \ - --enable-profiler + --enable-profiler \ + --enable-emscripten \ + --build=i686-unknown-linux-gnu ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS # This is the only builder which will create source tarballs diff --git a/src/ci/docker/dist-i686-linux/build-binutils.sh b/src/ci/docker/dist-i686-linux/build-binutils.sh index 80aa1f2a01613..f4bdbd80d0edb 100755 --- a/src/ci/docker/dist-i686-linux/build-binutils.sh +++ b/src/ci/docker/dist-i686-linux/build-binutils.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-cmake.sh b/src/ci/docker/dist-i686-linux/build-cmake.sh index 82e46455cb0f0..9a3763d421ad2 100755 --- a/src/ci/docker/dist-i686-linux/build-cmake.sh +++ b/src/ci/docker/dist-i686-linux/build-cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-curl.sh b/src/ci/docker/dist-i686-linux/build-curl.sh index b7d22755a571b..edf3175b81c43 100755 --- a/src/ci/docker/dist-i686-linux/build-curl.sh +++ b/src/ci/docker/dist-i686-linux/build-curl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-gcc.sh b/src/ci/docker/dist-i686-linux/build-gcc.sh index ab2562538d6d7..6b991bb59e4b0 100755 --- a/src/ci/docker/dist-i686-linux/build-gcc.sh +++ b/src/ci/docker/dist-i686-linux/build-gcc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-git.sh b/src/ci/docker/dist-i686-linux/build-git.sh index 92fa66b496d93..ff62a68629a8b 100755 --- a/src/ci/docker/dist-i686-linux/build-git.sh +++ b/src/ci/docker/dist-i686-linux/build-git.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-headers.sh b/src/ci/docker/dist-i686-linux/build-headers.sh index 4ce38fd9205e2..2f15114d6f980 100755 --- a/src/ci/docker/dist-i686-linux/build-headers.sh +++ b/src/ci/docker/dist-i686-linux/build-headers.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-openssl.sh b/src/ci/docker/dist-i686-linux/build-openssl.sh index 34da0ed631093..e7226ace020bd 100755 --- a/src/ci/docker/dist-i686-linux/build-openssl.sh +++ b/src/ci/docker/dist-i686-linux/build-openssl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-i686-linux/build-python.sh b/src/ci/docker/dist-i686-linux/build-python.sh index a7a450f3c8de7..c6b8cdde4b9af 100755 --- a/src/ci/docker/dist-i686-linux/build-python.sh +++ b/src/ci/docker/dist-i686-linux/build-python.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh b/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh index 90a4df0c19583..15211acb4459b 100755 --- a/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh +++ b/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh index c477cd61f98de..ac6460a472993 100755 --- a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh +++ b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh b/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh index 4d3e638916dbf..2f6937afff032 100755 --- a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh +++ b/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. @@ -23,7 +23,7 @@ SYSROOT=/usr/local/$TARGET/sysroot mkdir -p $SYSROOT pushd $SYSROOT -centos_base=http://mirror.centos.org/altarch/7.3.1611/os/ppc64le/Packages +centos_base=http://vault.centos.org/altarch/7.3.1611/os/ppc64le/Packages/ glibc_v=2.17-157.el7 kernel_v=3.10.0-514.el7 for package in glibc{,-devel,-headers}-$glibc_v kernel-headers-$kernel_v; do diff --git a/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh b/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh index b4995e20dc69b..306204dd0e1f6 100755 --- a/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh +++ b/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile new file mode 100644 index 0000000000000..c83f101d0ac41 --- /dev/null +++ b/src/ci/docker/dist-various-1/Dockerfile @@ -0,0 +1,105 @@ +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 \ + xz-utils \ + zlib1g-dev \ + g++-arm-linux-gnueabi \ + g++-arm-linux-gnueabihf \ + g++-aarch64-linux-gnu \ + gcc-sparc64-linux-gnu \ + libc6-dev-sparc64-cross \ + bzip2 \ + patch \ + libssl-dev \ + pkg-config + +WORKDIR /build + +COPY dist-various-1/build-rumprun.sh /build +RUN ./build-rumprun.sh + +COPY dist-various-1/install-x86_64-redox.sh /build +RUN ./install-x86_64-redox.sh + +COPY dist-various-1/install-mips-musl.sh /build +RUN ./install-mips-musl.sh + +COPY dist-various-1/install-mipsel-musl.sh /build +RUN ./install-mipsel-musl.sh + +# Suppress some warnings in the openwrt toolchains we downloaded +ENV STAGING_DIR=/tmp + +COPY scripts/musl.sh /build +RUN env \ + CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv6 -marm" \ + CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv6 -marm" \ + bash musl.sh arm && \ + env \ + CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv6 -marm" \ + CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv6 -marm" \ + bash musl.sh armhf && \ + env \ + CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a" \ + CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a" \ + bash musl.sh armv7 && \ + env \ + CC=aarch64-linux-gnu-gcc \ + CXX=aarch64-linux-gnu-g++ \ + bash musl.sh aarch64 && \ + env \ + CC=mips-openwrt-linux-gcc \ + CXX=mips-openwrt-linux-g++ \ + bash musl.sh mips && \ + env \ + CC=mipsel-openwrt-linux-gcc \ + CXX=mipsel-openwrt-linux-g++ \ + bash musl.sh mipsel && \ + rm -rf /build/* + +ENV TARGETS=asmjs-unknown-emscripten +ENV TARGETS=$TARGETS,wasm32-unknown-emscripten +ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd +ENV TARGETS=$TARGETS,mips-unknown-linux-musl +ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl +ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi +ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf +ENV TARGETS=$TARGETS,armv5te-unknown-linux-gnueabi +ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf +ENV TARGETS=$TARGETS,aarch64-unknown-linux-musl +ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu +ENV TARGETS=$TARGETS,x86_64-unknown-redox + +# FIXME: remove armv5te vars after https://github.com/alexcrichton/cc-rs/issues/271 +# get fixed and cc update +ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ + CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \ + CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \ + CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \ + CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \ + CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft" + +ENV RUST_CONFIGURE_ARGS \ + --target=$TARGETS \ + --musl-root-arm=/musl-arm \ + --musl-root-armhf=/musl-armhf \ + --musl-root-armv7=/musl-armv7 \ + --musl-root-aarch64=/musl-aarch64 \ + --musl-root-mips=/musl-mips \ + --musl-root-mipsel=/musl-mipsel \ + --enable-emscripten + +ENV SCRIPT python2.7 ../x.py dist --target $TARGETS + +# sccache +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh diff --git a/src/ci/docker/cross/build-rumprun.sh b/src/ci/docker/dist-various-1/build-rumprun.sh similarity index 98% rename from src/ci/docker/cross/build-rumprun.sh rename to src/ci/docker/dist-various-1/build-rumprun.sh index 59b1c9b641535..ad38cf872ad07 100755 --- a/src/ci/docker/cross/build-rumprun.sh +++ b/src/ci/docker/dist-various-1/build-rumprun.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/cross/install-mips-musl.sh b/src/ci/docker/dist-various-1/install-mips-musl.sh similarity index 100% rename from src/ci/docker/cross/install-mips-musl.sh rename to src/ci/docker/dist-various-1/install-mips-musl.sh diff --git a/src/ci/docker/cross/install-mipsel-musl.sh b/src/ci/docker/dist-various-1/install-mipsel-musl.sh similarity index 100% rename from src/ci/docker/cross/install-mipsel-musl.sh rename to src/ci/docker/dist-various-1/install-mipsel-musl.sh diff --git a/src/ci/docker/cross/install-x86_64-redox.sh b/src/ci/docker/dist-various-1/install-x86_64-redox.sh similarity index 97% rename from src/ci/docker/cross/install-x86_64-redox.sh rename to src/ci/docker/dist-various-1/install-x86_64-redox.sh index 8e052c4acd28a..9bfb57f5741c5 100755 --- a/src/ci/docker/cross/install-x86_64-redox.sh +++ b/src/ci/docker/dist-various-1/install-x86_64-redox.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-various-2/Dockerfile b/src/ci/docker/dist-various-2/Dockerfile new file mode 100644 index 0000000000000..5f342eb570502 --- /dev/null +++ b/src/ci/docker/dist-various-2/Dockerfile @@ -0,0 +1,59 @@ +FROM ubuntu:17.10 + +COPY scripts/cross-apt-packages.sh /scripts/ +RUN sh /scripts/cross-apt-packages.sh + +RUN apt-get build-dep -y clang llvm && apt-get install -y --no-install-recommends \ + build-essential \ + gcc-multilib \ + libedit-dev \ + libgmp-dev \ + libisl-dev \ + libmpc-dev \ + libmpfr-dev \ + ninja-build \ + nodejs \ + python2.7-dev \ + software-properties-common \ + unzip + +RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7924C5513486 +RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main' + +WORKDIR /tmp +COPY dist-various-2/shared.sh /tmp/ +COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/ +RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi +COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/ +RUN /tmp/build-fuchsia-toolchain.sh +COPY dist-various-2/build-solaris-toolchain.sh /tmp/ +RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386 +RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV \ + AR_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-ar \ + CC_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang \ + CXX_x86_64_unknown_fuchsia=x86_64-unknown-fuchsia-clang++ \ + AR_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-ar \ + CC_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang \ + CXX_aarch64_unknown_fuchsia=aarch64-unknown-fuchsia-clang++ \ + AR_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-ar \ + CC_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-gcc \ + CXX_sparcv9_sun_solaris=sparcv9-sun-solaris2.10-g++ \ + AR_x86_64_sun_solaris=x86_64-sun-solaris2.10-ar \ + CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \ + CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++ + +ENV TARGETS=x86_64-unknown-fuchsia +ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia +ENV TARGETS=$TARGETS,sparcv9-sun-solaris +ENV TARGETS=$TARGETS,wasm32-unknown-unknown +ENV TARGETS=$TARGETS,x86_64-sun-solaris +ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32 +ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi + +ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended +ENV SCRIPT python2.7 ../x.py dist --target $TARGETS diff --git a/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh b/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh new file mode 100755 index 0000000000000..8c04d849e8d0a --- /dev/null +++ b/src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Copyright 2018 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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -eux + +# Install prerequisites. +apt-get update +apt-get install -y --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + clang-5.0 \ + cmake \ + curl \ + file \ + g++ \ + gdb \ + git \ + lld-5.0 \ + make \ + python \ + sudo \ + xz-utils + +# Set up a Clang-based cross compiler toolchain. +# Based on the steps described at https://nuxi.nl/cloudabi/debian/ +target=$1 +for tool in ar nm objdump ranlib size; do + ln -s ../lib/llvm-5.0/bin/llvm-${tool} /usr/bin/${target}-${tool} +done +ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-cc +ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-c++ +ln -s ../lib/llvm-5.0/bin/lld /usr/bin/${target}-ld +ln -s ../../${target} /usr/lib/llvm-5.0/${target} + +# Install the C++ runtime libraries from CloudABI Ports. +echo deb https://nuxi.nl/distfiles/cloudabi-ports/debian/ cloudabi cloudabi > \ + /etc/apt/sources.list.d/cloudabi.list +curl 'https://pgp.mit.edu/pks/lookup?op=get&search=0x0DA51B8531344B15' | \ + apt-key add - +apt-get update +apt-get install -y $(echo ${target} | sed -e s/_/-/g)-cxx-runtime diff --git a/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh b/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh new file mode 100755 index 0000000000000..ef8f0c37f8c37 --- /dev/null +++ b/src/ci/docker/dist-various-2/build-fuchsia-toolchain.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env 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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +# ignore-tidy-linelength + +set -ex +source shared.sh + +ZIRCON=e9a26dbc70d631029f8ee9763103910b7e3a2fe1 + +mkdir -p zircon +pushd zircon > /dev/null + +# Download sources +git init +git remote add origin https://fuchsia.googlesource.com/zircon +git fetch --depth=1 origin $ZIRCON +git reset --hard FETCH_HEAD + +# Download toolchain +./scripts/download-toolchain +chmod -R a+rx prebuilt/downloads/clang+llvm-x86_64-linux +cp -a prebuilt/downloads/clang+llvm-x86_64-linux/. /usr/local + +build() { + local arch="$1" + + case "${arch}" in + x86_64) tgt="zircon-pc-x86-64" ;; + aarch64) tgt="zircon-qemu-arm64" ;; + esac + + hide_output make -j$(getconf _NPROCESSORS_ONLN) $tgt + dst=/usr/local/${arch}-unknown-fuchsia + mkdir -p $dst + cp -a build-${tgt}/sysroot/include $dst/ + cp -a build-${tgt}/sysroot/lib $dst/ +} + +# Build sysroot +for arch in x86_64 aarch64; do + build ${arch} +done + +popd > /dev/null +rm -rf zircon + +for arch in x86_64 aarch64; do + for tool in clang clang++; do + cat >/usr/local/bin/${arch}-unknown-fuchsia-${tool} < or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -ex +source shared.sh + +ARCH=$1 +LIB_ARCH=$2 +APT_ARCH=$3 +BINUTILS=2.28.1 +GCC=6.4.0 + +# First up, build binutils +mkdir binutils +cd binutils + +curl https://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.xz | tar xJf - +mkdir binutils-build +cd binutils-build +hide_output ../binutils-$BINUTILS/configure --target=$ARCH-sun-solaris2.10 +hide_output make -j10 +hide_output make install + +cd ../.. +rm -rf binutils + +# Next, download and install the relevant solaris packages +mkdir solaris +cd solaris + +dpkg --add-architecture $APT_ARCH +apt-get update +apt-get download $(apt-cache depends --recurse --no-replaces \ + libc-dev:$APT_ARCH \ + libm-dev:$APT_ARCH \ + libpthread-dev:$APT_ARCH \ + libresolv-dev:$APT_ARCH \ + librt-dev:$APT_ARCH \ + libsocket-dev:$APT_ARCH \ + system-crt:$APT_ARCH \ + system-header:$APT_ARCH \ + | grep "^\w") + +for deb in *$APT_ARCH.deb; do + dpkg -x $deb . +done + +# Remove Solaris 11 functions that are optionally used by libbacktrace. +# This is for Solaris 10 compatibility. +rm usr/include/link.h +patch -p0 << 'EOF' +--- usr/include/string.h ++++ usr/include/string10.h +@@ -93 +92,0 @@ +-extern size_t strnlen(const char *, size_t); +EOF + +mkdir /usr/local/$ARCH-sun-solaris2.10/usr +mv usr/include /usr/local/$ARCH-sun-solaris2.10/usr/include +mv usr/lib/$LIB_ARCH/* /usr/local/$ARCH-sun-solaris2.10/lib +mv lib/$LIB_ARCH/* /usr/local/$ARCH-sun-solaris2.10/lib + +ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/sys-include +ln -s usr/include /usr/local/$ARCH-sun-solaris2.10/include + +cd .. +rm -rf solaris + +# Finally, download and build gcc to target solaris +mkdir gcc +cd gcc + +curl https://ftp.gnu.org/gnu/gcc/gcc-$GCC/gcc-$GCC.tar.xz | tar xJf - +cd gcc-$GCC + +mkdir ../gcc-build +cd ../gcc-build +hide_output ../gcc-$GCC/configure \ + --enable-languages=c,c++ \ + --target=$ARCH-sun-solaris2.10 \ + --with-gnu-as \ + --with-gnu-ld \ + --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 diff --git a/src/ci/docker/dist-fuchsia/shared.sh b/src/ci/docker/dist-various-2/shared.sh similarity index 100% rename from src/ci/docker/dist-fuchsia/shared.sh rename to src/ci/docker/dist-various-2/shared.sh diff --git a/src/ci/docker/dist-x86_64-freebsd/Dockerfile b/src/ci/docker/dist-x86_64-freebsd/Dockerfile index b7c00df4db242..f9f5b7062f8a4 100644 --- a/src/ci/docker/dist-x86_64-freebsd/Dockerfile +++ b/src/ci/docker/dist-x86_64-freebsd/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 RUN apt-get update && apt-get install -y --no-install-recommends \ - g++ \ + clang \ make \ file \ curl \ @@ -16,16 +16,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libssl-dev \ pkg-config -COPY dist-x86_64-freebsd/build-toolchain.sh /tmp/ -RUN /tmp/build-toolchain.sh x86_64 +COPY scripts/freebsd-toolchain.sh /tmp/ +RUN /tmp/freebsd-toolchain.sh x86_64 COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh 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++ + CC_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-clang \ + CXX_x86_64_unknown_freebsd=x86_64-unknown-freebsd10-clang++ ENV HOSTS=x86_64-unknown-freebsd diff --git a/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh b/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh deleted file mode 100755 index 8343327c33bf2..0000000000000 --- a/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/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 or the MIT license -# , 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=6.4.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.gz | tar xzf - -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 diff --git a/src/ci/docker/dist-x86_64-linux/Dockerfile b/src/ci/docker/dist-x86_64-linux/Dockerfile index a954fd86a2440..d368a00b55bd5 100644 --- a/src/ci/docker/dist-x86_64-linux/Dockerfile +++ b/src/ci/docker/dist-x86_64-linux/Dockerfile @@ -85,7 +85,8 @@ ENV RUST_CONFIGURE_ARGS \ --host=$HOSTS \ --enable-extended \ --enable-sanitizers \ - --enable-profiler + --enable-profiler \ + --enable-emscripten ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS # This is the only builder which will create source tarballs diff --git a/src/ci/docker/dist-x86_64-linux/build-binutils.sh b/src/ci/docker/dist-x86_64-linux/build-binutils.sh index 80aa1f2a01613..f4bdbd80d0edb 100755 --- a/src/ci/docker/dist-x86_64-linux/build-binutils.sh +++ b/src/ci/docker/dist-x86_64-linux/build-binutils.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-cmake.sh b/src/ci/docker/dist-x86_64-linux/build-cmake.sh index 82e46455cb0f0..9a3763d421ad2 100755 --- a/src/ci/docker/dist-x86_64-linux/build-cmake.sh +++ b/src/ci/docker/dist-x86_64-linux/build-cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-curl.sh b/src/ci/docker/dist-x86_64-linux/build-curl.sh index b7d22755a571b..edf3175b81c43 100755 --- a/src/ci/docker/dist-x86_64-linux/build-curl.sh +++ b/src/ci/docker/dist-x86_64-linux/build-curl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/dist-x86_64-linux/build-gcc.sh index ab2562538d6d7..6b991bb59e4b0 100755 --- a/src/ci/docker/dist-x86_64-linux/build-gcc.sh +++ b/src/ci/docker/dist-x86_64-linux/build-gcc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-git.sh b/src/ci/docker/dist-x86_64-linux/build-git.sh index 92fa66b496d93..ff62a68629a8b 100755 --- a/src/ci/docker/dist-x86_64-linux/build-git.sh +++ b/src/ci/docker/dist-x86_64-linux/build-git.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-headers.sh b/src/ci/docker/dist-x86_64-linux/build-headers.sh index 4ce38fd9205e2..2f15114d6f980 100755 --- a/src/ci/docker/dist-x86_64-linux/build-headers.sh +++ b/src/ci/docker/dist-x86_64-linux/build-headers.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-openssl.sh b/src/ci/docker/dist-x86_64-linux/build-openssl.sh index 34da0ed631093..e7226ace020bd 100755 --- a/src/ci/docker/dist-x86_64-linux/build-openssl.sh +++ b/src/ci/docker/dist-x86_64-linux/build-openssl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-linux/build-python.sh b/src/ci/docker/dist-x86_64-linux/build-python.sh index a7a450f3c8de7..c6b8cdde4b9af 100755 --- a/src/ci/docker/dist-x86_64-linux/build-python.sh +++ b/src/ci/docker/dist-x86_64-linux/build-python.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. diff --git a/src/ci/docker/dist-x86_64-musl/Dockerfile b/src/ci/docker/dist-x86_64-musl/Dockerfile index 91ed6bfe1f63d..c1061309c30f8 100644 --- a/src/ci/docker/dist-x86_64-musl/Dockerfile +++ b/src/ci/docker/dist-x86_64-musl/Dockerfile @@ -17,8 +17,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ pkg-config WORKDIR /build/ -COPY dist-x86_64-musl/build-musl.sh /build/ -RUN sh /build/build-musl.sh && rm -rf /build + +COPY scripts/musl.sh /build/ +# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well +RUN CC=gcc \ + CFLAGS="-Wa,-mrelax-relocations=no" \ + CXX=g++ \ + CXXFLAGS="-Wa,-mrelax-relocations=no" \ + bash musl.sh x86_64 && rm -rf /build COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh diff --git a/src/ci/docker/dist-x86_64-musl/build-musl.sh b/src/ci/docker/dist-x86_64-musl/build-musl.sh deleted file mode 100644 index 776da0093974c..0000000000000 --- a/src/ci/docker/dist-x86_64-musl/build-musl.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# 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 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - -set -ex - -# We need to mitigate rust-lang/rust#34978 when compiling musl itself as well -export CFLAGS="-fPIC -Wa,-mrelax-relocations=no" -export CXXFLAGS="-Wa,-mrelax-relocations=no" - -MUSL=musl-1.1.16 -curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - -cd $MUSL -./configure --prefix=/musl-x86_64 --disable-shared -make -j10 -make install - -cd .. -rm -rf $MUSL - -# To build MUSL we're going to need a libunwind lying around, so acquire that -# here and build it. -curl -L https://github.com/llvm-mirror/llvm/archive/release_37.tar.gz | tar xzf - -curl -L https://github.com/llvm-mirror/libunwind/archive/release_37.tar.gz | tar xzf - - -mkdir libunwind-build -cd libunwind-build -cmake ../libunwind-release_37 -DLLVM_PATH=/build/llvm-release_37 \ - -DLIBUNWIND_ENABLE_SHARED=0 -make -j10 -cp lib/libunwind.a /musl-x86_64/lib diff --git a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh b/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh index 54100b49cb9f5..e730dd86087fb 100755 --- a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh +++ b/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. @@ -52,9 +52,9 @@ curl $URL/2017-03-17-netbsd-comp.tgz | \ cd usr/src # The options, in order, do the following -# * this is an unpriviledged build +# * this is an unprivileged build # * output to a predictable location -# * disable various uneeded stuff +# * disable various unneeded stuff MKUNPRIVED=yes TOOLDIR=/x-tools/x86_64-unknown-netbsd \ MKSHARE=no MKDOC=no MKHTML=no MKINFO=no MKKMOD=no MKLINT=no MKMAN=no MKNLS=no MKPROFILE=no \ hide_output ./build.sh -j10 -m amd64 tools @@ -64,12 +64,12 @@ cd ../.. rm -rf usr cat > /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-gcc-sysroot <<'EOF' -#!/bin/bash +#!/usr/bin/env bash exec /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-gcc --sysroot=/x-tools/x86_64-unknown-netbsd/sysroot "$@" EOF cat > /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-g++-sysroot <<'EOF' -#!/bin/bash +#!/usr/bin/env bash exec /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-g++ --sysroot=/x-tools/x86_64-unknown-netbsd/sysroot "$@" EOF diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index 7087033e117a2..f743c976f91a2 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. @@ -11,6 +11,8 @@ set -e +export MSYS_NO_PATHCONV=1 + script=`cd $(dirname $0) && pwd`/`basename $0` image=$1 @@ -25,23 +27,32 @@ travis_fold start build_docker travis_time_start if [ -f "$docker_dir/$image/Dockerfile" ]; then + dockerfile="$docker_dir/$image/Dockerfile" + if [ -x /usr/bin/cygpath ]; then + context="`cygpath -w $docker_dir`" + dockerfile="`cygpath -w $dockerfile`" + else + context="$docker_dir" + fi retry docker \ build \ --rm \ -t rust-ci \ - -f "$docker_dir/$image/Dockerfile" \ - "$docker_dir" + -f "$dockerfile" \ + "$context" elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then if [ -n "$TRAVIS_OS_NAME" ]; then echo Cannot run disabled images on travis! exit 1 fi - retry docker \ + # retry messes with the pipe from tar to docker. Not needed on non-travis + # Transform changes the context of disabled Dockerfiles to match the enabled ones + tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \ build \ --rm \ -t rust-ci \ - -f "$docker_dir/disabled/$image/Dockerfile" \ - "$docker_dir" + -f "$image/Dockerfile" \ + - else echo Invalid image: $image exit 1 @@ -88,6 +99,7 @@ exec docker \ --env LOCAL_USER_ID=`id -u` \ --env TRAVIS \ --env TRAVIS_BRANCH \ + --env TOOLSTATE_REPO_ACCESS_TOKEN \ --volume "$HOME/.cargo:/cargo" \ --volume "$HOME/rustsrc:$HOME/rustsrc" \ --init \ diff --git a/src/ci/docker/scripts/android-sdk.sh b/src/ci/docker/scripts/android-sdk.sh index d343aae9dfb68..99c5776c2e849 100644 --- a/src/ci/docker/scripts/android-sdk.sh +++ b/src/ci/docker/scripts/android-sdk.sh @@ -10,40 +10,40 @@ set -ex -URL=https://dl.google.com/android/repository +export ANDROID_HOME=/android/sdk +PATH=$PATH:"${ANDROID_HOME}/tools/bin" download_sdk() { - mkdir -p /android/sdk - cd /android/sdk - curl -fO $URL/$1 - unzip -q $1 - rm -rf $1 + mkdir -p /android + curl -fo sdk.zip "https://dl.google.com/android/repository/sdk-tools-linux-$1.zip" + unzip -q sdk.zip -d "$ANDROID_HOME" + rm -f sdk.zip } download_sysimage() { - # See https://developer.android.com/studio/tools/help/android.html abi=$1 api=$2 - filter="platform-tools,android-$api" - filter="$filter,sys-img-$abi-android-$api" - - # Keep printing yes to accept the licenses - while true; do echo yes; sleep 10; done | \ - /android/sdk/tools/android update sdk -a --no-ui \ - --filter "$filter" + # See https://developer.android.com/studio/command-line/sdkmanager.html for + # usage of `sdkmanager`. + # + # The output from sdkmanager is so noisy that it will occupy all of the 4 MB + # log extremely quickly. Thus we must silence all output. + yes | sdkmanager --licenses > /dev/null + sdkmanager platform-tools emulator \ + "platforms;android-$api" \ + "system-images;android-$api;default;$abi" > /dev/null } create_avd() { - # See https://developer.android.com/studio/tools/help/android.html abi=$1 api=$2 - echo no | \ - /android/sdk/tools/android create avd \ - --name $abi-$api \ - --target android-$api \ - --abi $abi + # See https://developer.android.com/studio/command-line/avdmanager.html for + # usage of `avdmanager`. + echo no | avdmanager create avd \ + -n "$abi-$api" \ + -k "system-images;android-$api;default;$abi" } download_and_create_avd() { @@ -51,3 +51,15 @@ download_and_create_avd() { download_sysimage $2 $3 create_avd $2 $3 } + +# Usage: +# +# setup_android_sdk 4333796 armeabi-v7a 18 +# +# 4333796 => +# SDK tool version. +# Copy from https://developer.android.com/studio/index.html#command-tools +# armeabi-v7a => +# System image ABI +# 18 => +# Android API Level (18 = Android 4.3 = Jelly Bean MR2) diff --git a/src/ci/docker/scripts/crosstool-ng.sh b/src/ci/docker/scripts/crosstool-ng.sh index 79a5bc3bb4ac6..4cd25ffa277a4 100644 --- a/src/ci/docker/scripts/crosstool-ng.sh +++ b/src/ci/docker/scripts/crosstool-ng.sh @@ -10,11 +10,12 @@ set -ex -url="http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2" -curl -f $url | tar xjf - -cd crosstool-ng +url="https://github.com/crosstool-ng/crosstool-ng/archive/crosstool-ng-1.22.0.tar.gz" +curl -Lf $url | tar xzf - +cd crosstool-ng-crosstool-ng-1.22.0 +./bootstrap ./configure --prefix=/usr/local make -j$(nproc) make install cd .. -rm -rf crosstool-ng +rm -rf crosstool-ng-crosstool-ng-1.22.0 diff --git a/src/ci/docker/scripts/freebsd-toolchain.sh b/src/ci/docker/scripts/freebsd-toolchain.sh new file mode 100755 index 0000000000000..15ed318f8ce85 --- /dev/null +++ b/src/ci/docker/scripts/freebsd-toolchain.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# Copyright 2016-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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -eux + +arch=$1 +binutils_version=2.25.1 +freebsd_version=10.3 +triple=$arch-unknown-freebsd10 +sysroot=/usr/local/$triple + +hide_output() { + set +x + local 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" & + local ping_loop_pid=$! + $@ &> /tmp/build.log + trap - ERR + kill $ping_loop_pid + set -x +} + +# First up, build binutils +mkdir binutils +cd binutils +curl https://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.tar.bz2 | tar xjf - +mkdir binutils-build +cd binutils-build +hide_output ../binutils-${binutils_version}/configure \ + --target="$triple" --with-sysroot="$sysroot" +hide_output make -j"$(getconf _NPROCESSORS_ONLN)" +hide_output make install +cd ../.. +rm -rf binutils + +# Next, download the FreeBSD libraries and header files +mkdir -p "$sysroot" +case $arch in + (x86_64) freebsd_arch=amd64 ;; + (i686) freebsd_arch=i386 ;; +esac + +files_to_extract=( +"./usr/include" +"./usr/lib/*crt*.o" +) +# Try to unpack only the libraries the build needs, to save space. +for lib in c cxxrt gcc_s m thr util; do + files_to_extract=("${files_to_extract[@]}" "./lib/lib${lib}.*" "./usr/lib/lib${lib}.*") +done +for lib in c++ c_nonshared compiler_rt execinfo gcc pthread rt ssp_nonshared; do + files_to_extract=("${files_to_extract[@]}" "./usr/lib/lib${lib}.*") +done + +URL=https://download.freebsd.org/ftp/releases/${freebsd_arch}/${freebsd_version}-RELEASE/base.txz +curl "$URL" | tar xJf - -C "$sysroot" --wildcards "${files_to_extract[@]}" + +# Fix up absolute symlinks from the system image. This can be removed +# for FreeBSD 11. (If there's an easy way to make them relative +# symlinks instead, feel free to change this.) +set +x +find "$sysroot" -type l | while read symlink_path; do + symlink_target=$(readlink "$symlink_path") + case $symlink_target in + (/*) + echo "Fixing symlink ${symlink_path} -> ${sysroot}${symlink_target}" >&2 + ln -nfs "${sysroot}${symlink_target}" "${symlink_path}" ;; + esac +done +set -x + +# Clang can do cross-builds out of the box, if we give it the right +# flags. (The local binutils seem to work, but they set the ELF +# header "OS/ABI" (EI_OSABI) field to SysV rather than FreeBSD, so +# there might be other problems.) +# +# The --target option is last because the cross-build of LLVM uses +# --target without an OS version ("-freebsd" vs. "-freebsd10"). This +# makes Clang default to libstdc++ (which no longer exists), and also +# controls other features, like GNU-style symbol table hashing and +# anything predicated on the version number in the __FreeBSD__ +# preprocessor macro. +for tool in clang clang++; do + tool_path=/usr/local/bin/${triple}-${tool} + cat > "$tool_path" < or the MIT license +# , 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 + trap - ERR + kill $PING_LOOP_PID + rm /tmp/build.log + set -x +} + +TAG=$1 +shift + +export CFLAGS="-fPIC $CFLAGS" + +MUSL=musl-1.1.18 + +# may have been downloaded in a previous run +if [ ! -d $MUSL ]; then + curl https://www.musl-libc.org/releases/$MUSL.tar.gz | tar xzf - +fi + +cd $MUSL +./configure --disable-shared --prefix=/musl-$TAG $@ +if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then + hide_output make -j$(nproc) AR=ar RANLIB=ranlib +else + hide_output make -j$(nproc) +fi +hide_output make install +hide_output make clean + +cd .. + +LLVM=60 + +# may have been downloaded in a previous run +if [ ! -d libunwind-release_$LLVM ]; then + curl -L https://github.com/llvm-mirror/llvm/archive/release_$LLVM.tar.gz | tar xzf - + curl -L https://github.com/llvm-mirror/libunwind/archive/release_$LLVM.tar.gz | tar xzf - +fi + +mkdir libunwind-build +cd libunwind-build +cmake ../libunwind-release_$LLVM \ + -DLLVM_PATH=/build/llvm-release_$LLVM \ + -DLIBUNWIND_ENABLE_SHARED=0 \ + -DCMAKE_C_COMPILER=$CC \ + -DCMAKE_CXX_COMPILER=$CXX \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" + +hide_output make -j$(nproc) +cp lib/libunwind.a /musl-$TAG/lib +cd ../ && rm -rf libunwind-build diff --git a/src/ci/docker/wasm32-unknown/Dockerfile b/src/ci/docker/wasm32-unknown/Dockerfile new file mode 100644 index 0000000000000..dc1727b7014c3 --- /dev/null +++ b/src/ci/docker/wasm32-unknown/Dockerfile @@ -0,0 +1,36 @@ +FROM ubuntu:16.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ + g++ \ + make \ + file \ + curl \ + ca-certificates \ + python \ + git \ + cmake \ + sudo \ + gdb \ + xz-utils + +RUN curl -sL https://nodejs.org/dist/v9.2.0/node-v9.2.0-linux-x64.tar.xz | \ + tar -xJ + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +ENV TARGETS=wasm32-unknown-unknown + +ENV RUST_CONFIGURE_ARGS \ + --target=$TARGETS \ + --set build.nodejs=/node-v9.2.0-linux-x64/bin/node + +ENV SCRIPT python2.7 /checkout/x.py test --target $TARGETS \ + src/test/ui \ + src/test/run-pass \ + src/test/compile-fail \ + src/test/parse-fail \ + src/test/mir-opt \ + src/test/codegen-units \ + src/libcore \ + src/libstd_unicode/ \ diff --git a/src/ci/docker/x86_64-gnu-aux/Dockerfile b/src/ci/docker/x86_64-gnu-aux/Dockerfile index a453c62cc9e83..44bee199911b8 100644 --- a/src/ci/docker/x86_64-gnu-aux/Dockerfile +++ b/src/ci/docker/x86_64-gnu-aux/Dockerfile @@ -12,10 +12,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libssl-dev \ sudo \ xz-utils \ - pkg-config + pkg-config \ + libgl1-mesa-dev \ + llvm-dev \ + libfreetype6-dev \ + libexpat1-dev COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --enable-test-miri +ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu ENV RUST_CHECK_TARGET check-aux diff --git a/src/ci/docker/x86_64-gnu-incremental/Dockerfile b/src/ci/docker/x86_64-gnu-incremental/Dockerfile index d323677698cce..7304ed6015cc9 100644 --- a/src/ci/docker/x86_64-gnu-incremental/Dockerfile +++ b/src/ci/docker/x86_64-gnu-incremental/Dockerfile @@ -19,3 +19,4 @@ RUN sh /scripts/sccache.sh ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu ENV RUSTFLAGS -Zincremental=/tmp/rust-incr-cache ENV RUST_CHECK_TARGET check +ENV CARGO_INCREMENTAL 0 diff --git a/src/ci/docker/x86_64-gnu-llvm-3.7/Dockerfile b/src/ci/docker/x86_64-gnu-llvm-3.7/Dockerfile deleted file mode 100644 index e832a2445ba14..0000000000000 --- a/src/ci/docker/x86_64-gnu-llvm-3.7/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -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 \ - llvm-3.7-tools \ - libedit-dev \ - zlib1g-dev \ - xz-utils - -COPY scripts/sccache.sh /scripts/ -RUN sh /scripts/sccache.sh - -ENV RUST_CONFIGURE_ARGS \ - --build=x86_64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-3.7 -ENV RUST_CHECK_TARGET check diff --git a/src/ci/docker/x86_64-gnu-llvm-3.9/Dockerfile b/src/ci/docker/x86_64-gnu-llvm-3.9/Dockerfile new file mode 100644 index 0000000000000..6b8186048988d --- /dev/null +++ b/src/ci/docker/x86_64-gnu-llvm-3.9/Dockerfile @@ -0,0 +1,27 @@ +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 \ + llvm-3.9-tools \ + libedit-dev \ + zlib1g-dev \ + xz-utils + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +# using llvm-link-shared due to libffi issues -- see #34486 +ENV RUST_CONFIGURE_ARGS \ + --build=x86_64-unknown-linux-gnu \ + --llvm-root=/usr/lib/llvm-3.9 \ + --enable-llvm-link-shared +ENV RUST_CHECK_TARGET check diff --git a/src/ci/docker/x86_64-gnu-tools/Dockerfile b/src/ci/docker/x86_64-gnu-tools/Dockerfile new file mode 100644 index 0000000000000..bab9145cbcb9c --- /dev/null +++ b/src/ci/docker/x86_64-gnu-tools/Dockerfile @@ -0,0 +1,28 @@ +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 \ + libssl-dev \ + sudo \ + xz-utils \ + pkg-config + +COPY scripts/sccache.sh /scripts/ +RUN sh /scripts/sccache.sh + +COPY x86_64-gnu-tools/checkregression.py /tmp/ +COPY x86_64-gnu-tools/checktools.sh /tmp/ +COPY x86_64-gnu-tools/repo.sh /tmp/ + +ENV RUST_CONFIGURE_ARGS \ + --build=x86_64-unknown-linux-gnu \ + --enable-test-miri \ + --save-toolstates=/tmp/toolstates.json +ENV SCRIPT /tmp/checktools.sh ../x.py /tmp/toolstates.json linux diff --git a/src/ci/docker/x86_64-gnu-tools/checkregression.py b/src/ci/docker/x86_64-gnu-tools/checkregression.py new file mode 100755 index 0000000000000..df791d12645fd --- /dev/null +++ b/src/ci/docker/x86_64-gnu-tools/checkregression.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright 2018 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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +import sys +import json + +if __name__ == '__main__': + os_name = sys.argv[1] + toolstate_file = sys.argv[2] + current_state = sys.argv[3] + + with open(toolstate_file, 'r') as f: + toolstate = json.load(f) + with open(current_state, 'r') as f: + current = json.load(f) + + regressed = False + for cur in current: + tool = cur['tool'] + state = cur[os_name] + new_state = toolstate.get(tool, '') + if new_state < state: + print( + 'Error: The state of "{}" has regressed from "{}" to "{}"' + .format(tool, state, new_state) + ) + regressed = True + + if regressed: + sys.exit(1) diff --git a/src/ci/docker/x86_64-gnu-tools/checktools.sh b/src/ci/docker/x86_64-gnu-tools/checktools.sh new file mode 100755 index 0000000000000..da89aa9423b2d --- /dev/null +++ b/src/ci/docker/x86_64-gnu-tools/checktools.sh @@ -0,0 +1,91 @@ +#!/bin/sh + +# 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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -eu + +X_PY="$1" +TOOLSTATE_FILE="$(realpath $2)" +OS="$3" +COMMIT="$(git rev-parse HEAD)" +CHANGED_FILES="$(git diff --name-status HEAD HEAD^)" +SIX_WEEK_CYCLE="$(( ($(date +%s) / 604800 - 3) % 6 ))" +# ^ 1970 Jan 1st is a Thursday, and our release dates are also on Thursdays, +# thus we could divide by 604800 (7 days in seconds) directly. + +touch "$TOOLSTATE_FILE" + +set +e +python2.7 "$X_PY" test --no-fail-fast \ + src/doc/book \ + src/doc/nomicon \ + src/doc/reference \ + src/doc/rust-by-example \ + src/tools/rls \ + src/tools/rustfmt \ + src/tools/miri \ + src/tools/clippy +set -e + +cat "$TOOLSTATE_FILE" +echo + +verify_status() { + echo "Verifying status of $1..." + if echo "$CHANGED_FILES" | grep -q "^M[[:blank:]]$2$"; then + echo "This PR updated '$2', verifying if status is 'test-pass'..." + if grep -vq '"'"$1"'":"test-pass"' "$TOOLSTATE_FILE"; then + echo + echo "⚠️ We detected that this PR updated '$1', but its tests failed." + echo + echo "If you do intend to update '$1', please check the error messages above and" + echo "commit another update." + echo + echo "If you do NOT intend to update '$1', please ensure you did not accidentally" + echo "change the submodule at '$2'. You may ask your reviewer for the" + echo "proper steps." + exit 3 + fi + fi +} + +# If this PR is intended to update one of these tools, do not let the build pass +# when they do not test-pass. + +verify_status book src/doc/book +verify_status nomicon src/doc/nomicon +verify_status reference src/doc/reference +verify_status rust-by-example src/doc/rust-by-example +verify_status rls src/tool/rls +verify_status rustfmt src/tool/rustfmt +verify_status clippy-driver src/tool/clippy +#verify_status miri src/tool/miri + +if [ "$RUST_RELEASE_CHANNEL" = nightly -a -n "${TOOLSTATE_REPO_ACCESS_TOKEN+is_set}" ]; then + . "$(dirname $0)/repo.sh" + MESSAGE_FILE=$(mktemp -t msg.XXXXXX) + echo "($OS CI update)" > "$MESSAGE_FILE" + commit_toolstate_change "$MESSAGE_FILE" \ + sed -i "1 a\\ +$COMMIT\t$(cat "$TOOLSTATE_FILE") +" "history/$OS.tsv" + # if we are at the last week in the 6-week release cycle, reject any kind of regression. + if [ $SIX_WEEK_CYCLE -eq 5 ]; then + python2.7 "$(dirname $0)/checkregression.py" \ + "$OS" "$TOOLSTATE_FILE" "rust-toolstate/_data/latest.json" + fi + rm -f "$MESSAGE_FILE" + exit 0 +fi + +if grep -q fail "$TOOLSTATE_FILE"; then + exit 4 +fi diff --git a/src/ci/docker/x86_64-gnu-tools/repo.sh b/src/ci/docker/x86_64-gnu-tools/repo.sh new file mode 100644 index 0000000000000..c10afef753e81 --- /dev/null +++ b/src/ci/docker/x86_64-gnu-tools/repo.sh @@ -0,0 +1,90 @@ +#!/bin/sh + +# 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 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +# This file provides the function `commit_toolstate_change` for pushing a change +# to the `rust-toolstate` repository. +# +# The function relies on a GitHub bot user, which should have a Personal access +# token defined in the environment variable $TOOLSTATE_REPO_ACCESS_TOKEN. If for +# some reason you need to change the token, please update `.travis.yml` and +# `appveyor.yml`: +# +# 1. Generate a new Personal access token: +# +# * Login to the bot account, and go to Settings -> Developer settings -> +# Personal access tokens +# * Click "Generate new token" +# * Enable the "public_repo" permission, then click "Generate token" +# * Copy the generated token (should be a 40-digit hexadecimal number). +# Save it somewhere secure, as the token would be gone once you leave +# the page. +# +# 2. Encrypt the token for Travis CI +# +# * Install the `travis` tool locally (`gem install travis`). +# * Encrypt the token: +# ``` +# travis -r rust-lang/rust encrypt \ +# TOOLSTATE_REPO_ACCESS_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +# ``` +# * Copy output to replace the existing one in `.travis.yml`. +# * Details of this step can be found in +# +# +# 3. Encrypt the token for AppVeyor +# +# * Login to AppVeyor using your main account, and login as the rust-lang +# organization. +# * Open the ["Encrypt data" tool](https://ci.appveyor.com/tools/encrypt) +# * Paste the 40-digit token into the "Value to encrypt" box, then click +# "Encrypt" +# * Copy the output to replace the existing one in `appveyor.yml`. +# * Details of this step can be found in +# +# +# 4. Replace the email address below if the bot account identity is changed +# +# * See +# if a private email by GitHub is wanted. + +commit_toolstate_change() { + OLDFLAGS="$-" + set -eu + + git config --global user.email '34210020+rust-toolstate-update@users.noreply.github.com' + git config --global user.name 'Rust Toolstate Update' + git config --global credential.helper store + printf 'https://%s:x-oauth-basic@github.com\n' "$TOOLSTATE_REPO_ACCESS_TOKEN" \ + > "$HOME/.git-credentials" + git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git + + cd rust-toolstate + FAILURE=1 + MESSAGE_FILE="$1" + shift + for RETRY_COUNT in 1 2 3 4 5; do + "$@" + # `git commit` failing means nothing to commit. + FAILURE=0 + git commit -a -F "$MESSAGE_FILE" || break + # On failure randomly sleep for 0 to 3 seconds as a crude way to introduce jittering. + git push origin master && break || sleep $(LC_ALL=C tr -cd 0-3 < /dev/urandom | head -c 1) + FAILURE=1 + git fetch origin master + git reset --hard origin/master + done + cd .. + + set +eu + set "-$OLDFLAGS" + return $FAILURE +} diff --git a/src/ci/docker/x86_64-gnu/Dockerfile b/src/ci/docker/x86_64-gnu/Dockerfile index 7570bca5906d1..444a8fe5da87a 100644 --- a/src/ci/docker/x86_64-gnu/Dockerfile +++ b/src/ci/docker/x86_64-gnu/Dockerfile @@ -16,5 +16,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ COPY scripts/sccache.sh /scripts/ RUN sh /scripts/sccache.sh -ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --enable-sanitizers --enable-profiler +ENV RUST_CONFIGURE_ARGS \ + --build=x86_64-unknown-linux-gnu \ + --enable-sanitizers \ + --enable-profiler \ + --enable-compiler-docs ENV SCRIPT python2.7 ../x.py test diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 7ffe00a807b34..8ab4276fa3b05 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. @@ -36,13 +36,24 @@ fi rm -rf "$CACHE_DIR" mkdir "$CACHE_DIR" +# On the beta channel we'll be automatically calculating the prerelease version +# via the git history, so unshallow our shallow clone from CI. +if grep -q RUST_RELEASE_CHANNEL=beta src/ci/run.sh; then + git fetch origin --unshallow beta master +fi + travis_fold start update_cache travis_time_start # Update the cache (a pristine copy of the rust source master) retry sh -c "rm -rf $cache_src_dir && mkdir -p $cache_src_dir && \ git clone --depth 1 https://github.com/rust-lang/rust.git $cache_src_dir" -(cd $cache_src_dir && git rm src/llvm) +if [ -d $cache_src_dir/src/llvm ]; then + (cd $cache_src_dir && git rm src/llvm) +fi +if [ -d $cache_src_dir/src/llvm-emscripten ]; then + (cd $cache_src_dir && git rm src/llvm-emscripten) +fi retry sh -c "cd $cache_src_dir && \ git submodule deinit -f . && git submodule sync && git submodule update --init" @@ -58,14 +69,14 @@ travis_time_start # http://stackoverflow.com/questions/12641469/list-submodules-in-a-git-repository modules="$(git config --file .gitmodules --get-regexp '\.path$' | cut -d' ' -f2)" for module in $modules; do - if [ "$module" = src/llvm ]; then - commit="$(git ls-tree HEAD src/llvm | awk '{print $3}')" - git rm src/llvm + if [ "$module" = src/llvm ] || [ "$module" = src/llvm-emscripten ]; then + commit="$(git ls-tree HEAD $module | awk '{print $3}')" + git rm $module retry sh -c "rm -f $commit.tar.gz && \ curl -sSL -O https://github.com/rust-lang/llvm/archive/$commit.tar.gz" tar -C src/ -xf "$commit.tar.gz" rm "$commit.tar.gz" - mv "src/llvm-$commit" src/llvm + mv "src/llvm-$commit" $module continue fi if [ ! -e "$cache_src_dir/$module/.git" ]; then diff --git a/src/ci/run.sh b/src/ci/run.sh index b4fa033c4a668..02480c6937de1 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env 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. @@ -37,19 +37,21 @@ if [ "$DIST_SRC" = "" ]; then fi # If we're deploying artifacts then we set the release channel, otherwise if -# we're not deploying then we want to be sure to enable all assertions becauase +# we're not deploying then we want to be sure to enable all assertions because # we'll be running tests # # FIXME: need a scheme for changing this `nightly` value to `beta` and `stable` # either automatically or manually. +export RUST_RELEASE_CHANNEL=nightly if [ "$DEPLOY$DEPLOY_ALT" != "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=nightly" + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --release-channel=$RUST_RELEASE_CHANNEL" RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-static-stdcpp" + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-thinlto" if [ "$NO_LLVM_ASSERTIONS" = "1" ]; then RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions" elif [ "$DEPLOY_ALT" != "" ]; then - RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions" + RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions" fi else # We almost always want debug assertions enabled, but sometimes this takes too diff --git a/src/dlmalloc b/src/dlmalloc new file mode 160000 index 0000000000000..9b2dcac06c3e2 --- /dev/null +++ b/src/dlmalloc @@ -0,0 +1 @@ +Subproject commit 9b2dcac06c3e23235f8997b3c5f2325a6d3382df diff --git a/src/doc/README.md b/src/doc/README.md index e1d95732b467c..5f25894afd76d 100644 --- a/src/doc/README.md +++ b/src/doc/README.md @@ -29,4 +29,4 @@ rustdoc reference.md An overview of how to use the `rustdoc` command is available [in the docs][1]. Further details are available from the command line by with `rustdoc --help`. -[1]: https://github.com/rust-lang/rust/blob/master/src/doc/book/documentation.md +[1]: https://github.com/rust-lang/rust/blob/master/src/doc/rustdoc/src/what-is-rustdoc.md diff --git a/src/doc/book b/src/doc/book index d09c9e8144ed3..98921e9de849a 160000 --- a/src/doc/book +++ b/src/doc/book @@ -1 +1 @@ -Subproject commit d09c9e8144ed32170b7596abb145ade8b097acaf +Subproject commit 98921e9de849acdaeaed08cfad6758bb89769b7d diff --git a/src/doc/index.md b/src/doc/index.md index bfd09145baafa..3add2774105e0 100644 --- a/src/doc/index.md +++ b/src/doc/index.md @@ -28,6 +28,8 @@ Rust provides a number of book-length sets of documentation, collectively nicknamed 'The Rust Bookshelf.' * [The Rust Programming Language][book] teaches you how to program in Rust. +* [Rust By Example][rbe] teaches you how to program in Rust using editable examples. +* [The Cargo Book][cargo-book] is a guide to Cargo, Rust's build tool and dependency manager. * [The Unstable Book][unstable-book] has documentation for unstable features. * [The Rustonomicon][nomicon] is your guidebook to the dark arts of unsafe Rust. * [The Reference][ref] is not a formal spec, but is more detailed and comprehensive than the book. @@ -50,7 +52,9 @@ before this policy was put into place. That work is being tracked [refchecklist]: https://github.com/rust-lang-nursery/reference/issues/9 [err]: error-index.html [book]: book/index.html +[rbe]: rust-by-example/index.html [nomicon]: nomicon/index.html [unstable-book]: unstable-book/index.html [rustdoc-book]: rustdoc/index.html +[cargo-book]: cargo/index.html diff --git a/src/doc/man/rustc.1 b/src/doc/man/rustc.1 index 6c80f11fa7205..39d1053995945 100644 --- a/src/doc/man/rustc.1 +++ b/src/doc/man/rustc.1 @@ -1,4 +1,4 @@ -.TH RUSTC "1" "September 2016" "rustc 1.13.0" "User Commands" +.TH RUSTC "1" "" "rustc " "User Commands" .SH NAME rustc \- The Rust compiler .SH SYNOPSIS @@ -125,6 +125,16 @@ Print version info and exit. \fB\-v\fR, \fB\-\-verbose\fR Use verbose output. .TP +\fB\-\-remap\-path\-prefix\fR \fIfrom\fR=\fIto\fR +Remap source path prefixes in all output, including compiler diagnostics, debug information, +macro expansions, etc. The \fIfrom\fR=\fIto\fR parameter is scanned from right to left, so \fIfrom\fR +may contain '=', but \fIto\fR may not. + +This is useful for normalizing build products, for example by removing the current directory out of +pathnames emitted into the object files. The replacement is purely textual, with no consideration of +the current system's pathname syntax. For example \fI\-\-remap\-path\-prefix foo=bar\fR will +match \fBfoo/lib.rs\fR but not \fB./foo/lib.rs\fR. +.TP \fB\-\-extern\fR \fINAME\fR=\fIPATH\fR Specify where an external rust library is located. These should match \fIextern\fR declarations in the crate's source code. @@ -152,9 +162,6 @@ never colorize output. .SH CODEGEN OPTIONS -.TP -\fBar\fR=\fI/path/to/ar\fR -Path to the archive utility to use when assembling archives. .TP \fBlinker\fR=\fI/path/to/cc\fR Path to the linker utility to use when linking libraries, executables, and diff --git a/src/doc/man/rustdoc.1 b/src/doc/man/rustdoc.1 index d34ab6135499d..a878380f556b3 100644 --- a/src/doc/man/rustdoc.1 +++ b/src/doc/man/rustdoc.1 @@ -1,4 +1,4 @@ -.TH RUSTDOC "1" "May 2017" "rustdoc 1.19.0" "User Commands" +.TH RUSTDOC "1" "" "rustdoc " "User Commands" .SH NAME rustdoc \- generate documentation from Rust source code .SH SYNOPSIS diff --git a/src/doc/nomicon b/src/doc/nomicon index a4322ccb289a4..ad5ddd62c098d 160000 --- a/src/doc/nomicon +++ b/src/doc/nomicon @@ -1 +1 @@ -Subproject commit a4322ccb289a43cc238d4536982f184a3eec9ba7 +Subproject commit ad5ddd62c098d5b424151beda574ae7df2154df1 diff --git a/src/doc/not_found.md b/src/doc/not_found.md index 5d632ebc68f7a..f404aa046c1ae 100644 --- a/src/doc/not_found.md +++ b/src/doc/not_found.md @@ -13,20 +13,20 @@ Some things that might be helpful to you though: # Search -*
+ - -
-* Rust doc search: + + +Rust doc search: # Reference -* [The Rust official site](https://www.rust-lang.org) -* [The Rust reference](https://doc.rust-lang.org/reference.html) + * [The Rust official site](https://www.rust-lang.org) + * [The Rust reference](https://doc.rust-lang.org/reference/index.html) # Docs -* [The standard library](https://doc.rust-lang.org/std/) +[The standard library](https://doc.rust-lang.org/std/) {css_extension} {favicon} @@ -65,10 +71,18 @@ r##" {before_content} +
+ +
+
+