summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2016-07-03Auto merge of #34614 - cynicaldevil:build-time, r=alexcrichtonbors-0/+12
Build: Shows total time taken to build the compiler Fixes #34600 Prints the total time taken to build rustc by executing `src/bootstrap/bootstrap.py`; also includes time taken to download `stage0` compiler and deps. r? @alexcrichton
2016-07-02Auto merge of #34597 - CensoredUsername:bootstrap-fix, r=alexcrichtonbors-1/+1
Support more python 2.7 versions in bootstrap.py It seems python broke compatability between 2.7.9 and 2.7.12 as on the former a WindowsError was raised while on the latter a subprocess.CalledProcessError was raised while testing for the existence of uname. As a WindowsError being thrown obviously indicates we're running on windows, this should probably be accepted too.
2016-07-02Build: Shows total time taken to build the compilerNikhil Shagrithaya-0/+12
2016-07-02Rollup merge of #34567 - alexcrichton:rustbuild-android, r=brsonManish Goregaokar-52/+227
rustbuild: Implement testing for Android This commit enhances the rustbuild support for testing Android to the same level of parity as the makefiles. This involved: * A new step to copy the standard library and other shared objects to the emulator. This is injected as a dependency of all test suites for Android. * Appropriate arguments are now passed through to compiletest to ensure that it can run tests. * When testing the standard library the test executables are probed for and shipped to the emulator to run for each test. * Fixing compilation of compiler-rt a bit All support added here is modeled after what's found in the makefiles, just translating one strategy to another. As an added bonus this commit adds support for the "check" step to automatically run tests for all targets, and the "check-target" step now runs all tests for a particular target, automatically filtering the tests if the target is detected as a cross-compile. Note that we don't (and probably won't) have a bot which is actually going to exercise any of this just yet, but all tests have passed locally for me at least.
2016-07-02Rollup merge of #34545 - sanxiyn:rustbuild, r=alexcrichtonManish Goregaokar-0/+5
Add rustc-stageN targets to rustbuild
2016-07-01Older versions of python 2.7 can raise a WindowsError instead of a ↵CensoredUsername-1/+1
subprocess.CalledProcessError when `uname` does not exist
2016-06-30Auto merge of #34563 - alexcrichton:robust-mk, r=brsonbors-4/+6
mk: Don't consider LLVM done until it's done Currently if an LLVM build is interrupted *after* it creates the llvm-config binary but before it's done it puts us in an inconsistent state where we think LLVM is compiled but it's not actually. This tweaks our logic to only consider LLVM done building once it's actually done building. This should hopefully alleviate problems on the bots where if we interrupt at the wrong time it doesn't corrupt the build directory.
2016-06-30rustbuild: Clean out tmp directory on `make clean`Alex Crichton-0/+3
Right now we generate error index information into this directory, but it's never cleaned out. This means that if a build *bounces* because of something in this directory it'll continue to cause all future builds to fail because the relevant files are never removed.
2016-06-30mk: Don't consider LLVM done until it's doneAlex Crichton-4/+6
Currently if an LLVM build is interrupted *after* it creates the llvm-config binary but before it's done it puts us in an inconsistent state where we think LLVM is compiled but it's not actually. This tweaks our logic to only consider LLVM done building once it's actually done building. This should hopefully alleviate problems on the bots where if we interrupt at the wrong time it doesn't corrupt the build directory.
2016-06-29rustbuild: Implement testing for AndroidAlex Crichton-52/+227
This commit enhances the rustbuild support for testing Android to the same level of parity as the makefiles. This involved: * A new step to copy the standard library and other shared objects to the emulator. This is injected as a dependency of all test suites for Android. * Appropriate arguments are now passed through to compiletest to ensure that it can run tests. * When testing the standard library the test executables are probed for and shipped to the emulator to run for each test. * Fixing compilation of compiler-rt a bit All support added here is modeled after what's found in the makefiles, just translating one strategy to another. As an added bonus this commit adds support for the "check" step to automatically run tests for all targets, and the "check-target" step now runs all tests for a particular target, automatically filtering the tests if the target is detected as a cross-compile. Note that we don't (and probably won't) have a bot which is actually going to exercise any of this just yet, but all tests have passed locally for me at least.
2016-06-29Add rustc-stageN targets to rustbuildSeo Sanghyeon-0/+5
2016-06-27rustbuild: Update how compiler-rt is calledAlex Crichton-23/+46
Looks like compiler-rt has been tweaked slightly during the last update, propagate these changes to rustbuild as well.
2016-06-22Fix typo in bootstrap READMEFabian Vogt-1/+1
"boostrap" instead of "bootstrap"
2016-06-16Fix issue where rustbuild expected msvc to have arPeter Atashian-6/+10
Signed-off-by: Peter Atashian <retep998@gmail.com>
2016-06-04Auto merge of #33991 - alexcrichton:rustbuild-more-clean, r=aturonbors-3/+8
rustbuild: Clean more on `make clean` Be sure to not use the old build cache for the bootstrap build system nor the old caches of the compiler/cargo extractions (in case something went wrong). Closes #33986
2016-06-01build: avoid repeated string concatenation in pythonSteven Allen-9/+9
2016-05-31Auto merge of #33141 - tshepang:python-love, r=brsonbors-11/+11
some Python nits and fixes
2016-05-31rustbuild: Clean more on `make clean`Alex Crichton-3/+8
Be sure to not use the old build cache for the bootstrap build system nor the old caches of the compiler/cargo extractions (in case something went wrong). Closes #33986
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-26some Python nits and fixesTshepang Lekhonkhobe-11/+11
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.