about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2016-05-23rustbuild: Add support for --enable-local-rustAlex Crichton-4/+8
This commit adds support for the `--enable-local-rust` `./configure` switch which uses the locally installed `rustc` to bootstrap the compiler.
2016-05-23bootstrap: rename Config.rebuild to .local_rebuildJosh Stone-4/+4
2016-05-22bootstrap: mirror mk's local-rebuild changesJosh Stone-2/+12
The rustc for a local-rebuild is assumed to use the current bootstrap key and already match the current stage1 features.
2016-05-18rustbuild: Pass -O to tests based on configurationAlex Crichton-2/+25
Currently rustbuild isn't detecting the `-O` flag for tests via the `--disable-optimize-tests` or not command line flag to `./configure`, and this commit patches up the support to pass `-O` by default.
2016-05-18rustbuild: Add missing test suitesAlex Crichton-15/+57
After a comparison with the current set of tests run it was discovered that rustbuild accidentally wasn't running a few test suites. This commit adds back a few more test suites: * rfail-full * pretty-rpass * pretty-rpass-full * pretty-rpass-valgrind * pretty-rfail * pretty-rfail-full * librustc_bitflags unit tests
2016-05-13check check-ui and check-incremental in checkNiko Matsakis-0/+2
2016-05-13modify rust-build to support incremental, ui testsNiko Matsakis-0/+12
2016-05-12rustbuild: Add support for crate tests + doctestsAlex Crichton-8/+122
This commit adds support to rustbuild to run crate unit tests (those defined by `#[test]`) as well as documentation tests. All tests are powered by `cargo test` under the hood. Each step requires the `libtest` library is built for that corresponding stage. Ideally the `test` crate would be a dev-dependency, but for now it's just easier to ensure that we sequence everything in the right order. Currently no filtering is implemented, so there's not actually a method of testing *only* libstd or *only* libcore, but rather entire swaths of crates are tested all at once. A few points of note here are: * The `coretest` and `collectionstest` crates are just listed as `[[test]]` entires for `cargo test` to naturally pick up. This mean that `cargo test -p core` actually runs all the tests for libcore. * Libraries that aren't tested all mention `test = false` in their `Cargo.toml` * Crates aren't currently allowed to have dev-dependencies due to rust-lang/cargo#860, but we can likely alleviate this restriction once workspaces are implemented. cc #31590
2016-05-09rustc: Implement custom panic runtimesAlex Crichton-1/+18
This commit is an implementation of [RFC 1513] which allows applications to alter the behavior of panics at compile time. A new compiler flag, `-C panic`, is added and accepts the values `unwind` or `panic`, with the default being `unwind`. This model affects how code is generated for the local crate, skipping generation of landing pads with `-C panic=abort`. [RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md Panic implementations are then provided by crates tagged with `#![panic_runtime]` and lazily required by crates with `#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic runtime must match the final product, and if the panic strategy is not `abort` then the entire DAG must have the same panic strategy. With the `-C panic=abort` strategy, users can expect a stable method to disable generation of landing pads, improving optimization in niche scenarios, decreasing compile time, and decreasing output binary size. With the `-C panic=unwind` strategy users can expect the existing ability to isolate failure in Rust code from the outside world. Organizationally, this commit dismantles the `sys_common::unwind` module in favor of some bits moving part of it to `libpanic_unwind` and the rest into the `panicking` module in libstd. The custom panic runtime support is pretty similar to the custom allocator support with the only major difference being how the panic runtime is injected (takes the `-C panic` flag into account).
2016-05-08Auto merge of #33360 - alexcrichton:rustbuild-dox, r=brsonbors-47/+726
rustbuild: Document many more parts of the build This commit expands the bootstrap build system's `README.md` as well as ensuring that all API documentation is present and up-to-date. Additionally a new `config.toml.example` file is checked in with commented out versions of all possible configuration values.
2016-05-08Auto merge of #33288 - cyplo:32834_retry_download, r=alexcrichtonbors-11/+38
Get a file during bootstrap to a temp location first. When downloading a file in the bootstrap phase - get it to a temp location first. Verify it there and only if downloaded properly move it to the `cache` directory. This should prevent `make` being stuck if the download was interrupted or otherwise corrupted, as per discussion in #32834 The temporary files are deleted in case of an exception. I was looking for some unit/integration tests around this and couldn't find any - presumably because this is being tested by just Travis launching it ? Let me know if it would be good to try to write tests around this. Thanks !
2016-05-08Auto merge of #33414 - Nercury:master, r=alexcrichtonbors-0/+6
Add armv7-linux-androideabi target This PR adds `armv7-linux-androideabi` target that matches `armeabi-v7a` Android ABI, ~~downscales `arm-linux-androideabi` target to match `armeabi` Android ABI~~ (TBD later if needed). This should allow us to get the best performance from every [Android ABI level](http://developer.android.com/ndk/guides/abis.html). Currently existing target `arm-linux-androideabi` started gaining features out of the supported range of [android `armeabi`](http://developer.android.com/ndk/guides/abis.html). While android compiler does not use a different target for later supported `armv7` architecture, it has distinct ABI name `armeabi-v7a`. We decided to add rust target `armv7-linux-androideabi` to match it. Note that `NEON`, `VFPv3-D32`, and `ThumbEE` instruction sets are not added, because not all android devices are guaranteed to support all or some of these, and [their availability should be checked at runtime](http://developer.android.com/ndk/guides/abis.html#v7a). ~~This reduces performance of existing `arm-linux-androideabi` and may make it _much_ slower (we are talking more than order of magnitude in some random ad-hoc fp benchmark that I did).~~ Part of #33278.
2016-05-08Remove sha256 file only if present.Cyryl Płotnicki-Chudyk-5/+8
2016-05-08Better error handling for bootstrap file downloads.Cyryl Płotnicki-Chudyk-14/+20
Remove the temp files if something goes wrong.
2016-05-07Rollup merge of #33438 - birkenfeld:dup-words, r=steveklabnikSteve Klabnik-1/+1
Fix some some duplicate words.
2016-05-07Add armv7-linux-androideabi target.Nerijus Arlauskas-0/+6
2016-05-06remove unused aux-base argumentNiko Matsakis-1/+0
2016-05-06Distribute both rust-lldb and rust-gdb everywhere except win-msvcBrian Anderson-9/+9
Both debuggers are viable in some capacity on all tier-1 platforms, and people often ask for rust-lldb on Linux or rust-gdb on OS X.
2016-05-05Fix some some duplicate words.Georg Brandl-1/+1
2016-05-03rustbuild: Document many more parts of the buildAlex Crichton-47/+726
This commit expands the bootstrap build system's `README.md` as well as ensuring that all API documentation is present and up-to-date. Additionally a new `config.toml.example` file is checked in with commented out versions of all possible configuration values.
2016-04-30Code cleanup in download() in bootstrap.pyCyryl Płotnicki-Chudyk-12/+12
Make download() receive less parameters and use it explicitly 2 times in get().
2016-04-30Get a file during bootstrap to a temp location.Cyryl Płotnicki-Chudyk-5/+23
When downloading a file in the bootstrap phase - get it to a temp location first. Verify it there and only if downloaded properly move it to the `cache` directory. This should prevent `make` being stuck if the download was interrupted or otherwise corrupted. The temporary files are deleted in case of an exception.
2016-04-28test: Move run-make tests into compiletestAlex Crichton-1/+37
Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-04-23Auto merge of #33092 - alexcrichton:rustbuild-docs, r=brsonbors-1/+58
rustbuild: Run all markdown documentation tests This commit adds support to rustbuild to run all documentation tests, basically running `rustdoc --test` over all our documentation.
2016-04-23Auto merge of #33084 - alexcrichton:osx-python-sanity, r=michaelwoeristerbors-1/+12
Sanity check Python on OSX for LLDB tests Two primary changes: * Don't get past the configure stage if `python` isn't coming from `/usr/bin` * Call `debugger.Terminate()` to prevent segfaults on newer versions of LLDB. Closes #32994
2016-04-20Auto merge of #33011 - alexcrichton:pkg-everything, r=brsonbors-1/+8
rustbuild: Package librustc & co for cross-hosts Currently the `rust-std` package produced by rustbuild only contains the standard library plus libtest, but the makefiles actually produce a `rust-std` package with all known target libraries (including libsyntax, librustc, etc). Tweak the behavior so the dependencies of the `dist-docs` step in rustbuild depend on the compiler libraries as well (so that they're all packaged). Closes #32984
2016-04-20Auto merge of #32942 - alexcrichton:bootstrap-from-previous, r=brsonbors-68/+105
mk: Bootstrap from stable instead of snapshots This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
2016-04-19Auto merge of #32903 - alexcrichton:fix-rpath, r=brsonbors-18/+55
rustbuild: Fix --enable-rpath usage This commit fixes the `--enable-rpath` configure flag in rustbuild to work despite the compile-time directories being different than the runtime directories. This unfortunately means that we can't use `-C rpath` out of the box but hopefully the portability story here isn't too bad as `src/librustc_back/rpath.rs` isn't *too* complicated. Closes #32886
2016-04-19mk: Bootstrap from stable instead of snapshotsAlex Crichton-68/+105
This commit removes all infrastructure from the repository for our so-called snapshots to instead bootstrap the compiler from stable releases. Bootstrapping from a previously stable release is a long-desired feature of distros because they're not fans of downloading binary stage0 blobs from us. Additionally, this makes our own CI easier as we can decommission all of the snapshot builders and start having a regular cadence to when we update the stage0 compiler. A new `src/etc/get-stage0.py` script was added which shares some code with `src/bootstrap/bootstrap.py` to read a new file, `src/stage0.txt`, which lists the current stage0 compiler as well as cargo that we bootstrap from. This script will download the relevant `rustc` package an unpack it into `$target/stage0` as we do today. One problem of bootstrapping from stable releases is that we're not able to compile unstable code (e.g. all the `#![feature]` directives in libcore/libstd). To overcome this we employ two strategies: * The bootstrap key of the previous compiler is hardcoded into `src/stage0.txt` (enabled as a result of #32731) and exported by the build system. This enables nightly features in the compiler we download. * The standard library and compiler are pinned to a specific stage0, which doesn't change, so we're guaranteed that we'll continue compiling as we start from a known fixed source. The process for making a release will also need to be tweaked now to continue to cadence of bootstrapping from the previous release. This process looks like: 1. Merge `beta` to `stable` 2. Produce a new stable compiler. 3. Change `master` to bootstrap from this new stable compiler. 4. Merge `master` to `beta` 5. Produce a new beta compiler 6. Change `master` to bootstrap from this new beta compiler. Step 3 above should involve very few changes as `master` was previously bootstrapping from `beta` which is the same as `stable` at that point in time. Step 6, however, is where we benefit from removing lots of `#[cfg(stage0)]` and get to use new features. This also shouldn't slow the release too much as steps 1-5 requires little work other than waiting and step 6 just needs to happen at some point during a release cycle, it's not time sensitive. Closes #29555 Closes #29557
2016-04-19mk: Force system python for LLDB tests on OSXAlex Crichton-1/+12
Force usage of /usr/bin/python whenever we run LLDB tests on OSX because it looks like no other Python will work.
2016-04-19rustbuild: Run all markdown documentation testsAlex Crichton-1/+58
This commit adds support to rustbuild to run all documentation tests, basically running `rustdoc --test` over all our documentation. This also includes support for running the error index tests.
2016-04-18rustbuild: Add support for compiletest test suitesAlex Crichton-46/+309
This commit adds support in rustbuild for running all of the compiletest test suites as part of `make check`. The `compiletest` program was moved to `src/tools` (like `rustbook` and others) and is now just compiled like any other old tool. Each test suite has a pretty standard set of dependencies and just tweaks various parameters to the final compiletest executable. Note that full support is lacking in terms of: * Once a test suite has passed, that's not remembered. When a test suite is requested to be run, it's always run. * The arguments to compiletest probably don't work for every possible combination of platforms and testing environments just yet. There will likely need to be future updates to tweak various pieces here and there. * Cross compiled test suites probably don't work just yet, support for that will come in a follow-up patch.
2016-04-16rustbuild: Clean more as part of `make clean`Alex Crichton-0/+3
Clean out old documentation as well as the new test/tools directories. Should prevent a problem that happened this morning where a PR bounced and then it left docs with "broken links" so all future PRs bounced.
2016-04-15rustbuild: Package librustc & co for cross-hostsAlex Crichton-1/+8
Currently the `rust-std` package produced by rustbuild only contains the standard library plus libtest, but the makefiles actually produce a `rust-std` package with all known target libraries (including libsyntax, librustc, etc). Tweak the behavior so the dependencies of the `dist-docs` step in rustbuild depend on the compiler libraries as well (so that they're all packaged). Closes #32984
2016-04-16Rollup merge of #32926 - caipre:rustbuild-verify-download, r=alexcrichtonManish Goregaokar-13/+40
rustbuild: Verify sha256 of downloaded tarballs Here's a quick first pass at this. I don't use Python often enough to claim that this is totally Pythonic. I've left off some (almost certainly unnecessary) error handling regarding opening and processing files. The whole tarball is read into memory to calculate the hash, but the file isn't *so* large so that should be fine. I don't care for the output from `raise RuntimeError`, but that's how `run()` does it so I'm following precedent. Tested by manually changing the value of `expected`, and by modifying the tarball then forcing `rustc_out_of_date()`. Both cases tripped the error. Closes https://github.com/rust-lang/rust/issues/32902
2016-04-15Auto merge of #32972 - alexcrichton:cargotest, r=brsonbors-4/+14
cargotest: Put output in build directory Right now cargotest uses `TempDir` to place output into the system temp directory, but unfortunately this means that if the process is interrupted then it'll leak the directory and that'll never get cleaned up. One of our bots filled up its disk space and there were 20 cargotest directories lying around so seems prudent to clean them up! By putting the output in the build directory it should ensure that we don't leak too many extra builds.
2016-04-15cargotest: Put output in build directoryAlex Crichton-4/+14
Right now cargotest uses `TempDir` to place output into the system temp directory, but unfortunately this means that if the process is interrupted then it'll leak the directory and that'll never get cleaned up. One of our bots filled up its disk space and there were 20 cargotest directories lying around so seems prudent to clean them up! By putting the output in the build directory it should ensure that we don't leak too many extra builds.
2016-04-15Auto merge of #32895 - alexcrichton:rustbuild-beta, r=brsonbors-5/+14
rustbuild: Fix handling of the bootstrap key Bring the calculation logic in line with the makefiles and also set the RUSTC_BOOTSTRAP_KEY environment variable to enable the bootstrap on the stable compiler.
2016-04-14Rollup merge of #32865 - caipre:llvm-ninja, r=alexcrichtonSteve Klabnik-4/+12
Add rustbuild option to use Ninja for LLVM build This change adds support for a `ninja` option in the `[llvm]` section of rustbuild's `config.toml`. When `true`, the option enables use of the Ninja build tool. Note that this change does not add support for Ninja to the old makefile based build system. Closes https://github.com/rust-lang/rust/issues/32809 r? @alexcrichton
2016-04-14Auto merge of #32718 - timonvo:bootstrap-skip-docs, r=alexcrichtonbors-2/+6
rustbuild: Skip generating docs if the config disables them. r? @alexcrichton
2016-04-13rustbuild: Verify sha256 of downloaded tarballsNick Platt-7/+24
2016-04-13rustbuild: Improve error messaging in bootstrap.pyNick Platt-6/+16
For normal invocations, print a short error message and exit. When the verbose option is enabled, also print the backtrace.
2016-04-13rustbuild: Skip generating docs if the config disables them.Timon Van Overveldt-2/+6
It looks like before these config variables weren't actually taken into account. This patch should make the build system skip over the documentation steps correctly.
2016-04-12tidy: Add a check to ensure Cargo.toml is in syncAlex Crichton-2/+1
This verifies that the crates listed in the `[dependencies]` section of `Cargo.toml` are a subset of the crates listed in `lib.rs` for our in-tree crates. This should help ensure that when we refactor crates over time we keep these dependency lists in sync.
2016-04-12rustbuild: Migrate tidy checks to RustAlex Crichton-1/+23
This commit rewrites all of the tidy checks we have, namely: * featureck * errorck * tidy * binaries into Rust under a new `tidy` tool inside of the `src/tools` directory. This at the same time deletes all the corresponding Python tidy checks so we can be sure to only have one source of truth for all the tidy checks. cc #31590
2016-04-11rustbuild: Fix --enable-rpath usageAlex Crichton-18/+55
This commit fixes the `--enable-rpath` configure flag in rustbuild to work despite the compile-time directories being different than the runtime directories. This unfortunately means that we can't use `-C rpath` out of the box but hopefully the portability story here isn't too bad as `src/librustc_back/rpath.rs` isn't *too* complicated. Closes #32886
2016-04-11rustbuild: Fix handling of the bootstrap keyAlex Crichton-5/+14
Bring the calculation logic in line with the makefiles and also set the RUSTC_BOOTSTRAP_KEY environment variable to enable the bootstrap on the stable compiler.
2016-04-10Remove redundant assignmentNick Platt-1/+0
2016-04-10Add rustbuild option to use Ninja for LLVM buildNick Platt-3/+12
2016-04-09Auto merge of #32786 - brson:cargotest, r=alexcrichtonbors-3/+12
Fix cargotest Tested in dev.