about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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.
2016-04-07Fix cargotestBrian Anderson-3/+12
2016-04-06rustbuild: Update bootstrap dependenciesAlex Crichton-17/+17
Not much new, just bringing everything along.
2016-04-06rustbuild: Support cross rust-docs packagesAlex Crichton-35/+46
Right now if you configure multiple hosts rustbuild will only build documentation for the build triple, but we've got all the support necessary to build documentation for different architectures as well. This commit reinterprets the `target` field of doc `Step` instances to be the target of the documentation rather than the target of the rustdoc/tool being run. This should enable `make dist` to start producing a bunch of `rust-docs` packages for all the cross architectures that rustbuild is producing now.
2016-04-06rustbuild: Verify flags are configuredAlex Crichton-0/+12
Building with `--target foo` should fail because that target wasn't actually validated.
2016-04-06rustbuild: Add helper to abstract hard_link/copyAlex Crichton-16/+25
Also helps provide context if it fails.
2016-04-02Auto merge of #32598 - alexcrichton:rustbuild-osx, r=aturonbors-6/+24
rustbuild: Fix compile on OSX for 10.7 This commit should help configure our OSX rustbuild builder for targeting 10.7. A key part of this is using `libc++` instead of `libstdc++` as apparently it's more filled out and otherwise LLVM's cmake configuration would fail.
2016-04-01rustbuild: Fix dist for non-host targetsAlex Crichton-14/+97
The `rust-std` package that we produce is expected to have not only the standard library but also libtest for compiling unit tests. Unfortunately this does not currently happen due to the way rustbuild is structured. There are currently two main stages of compilation in rustbuild, one for the standard library and one for the compiler. This is primarily done to allow us to fill in the sysroot right after the standard library has finished compiling to continue compiling the rest of the crates. Consequently the entire compiler does not have to explicitly depend on the standard library, and this also should allow us to pull in crates.io dependencies into the build in the future because they'll just naturally build against the std we just produced. These phases, however, do not represent a cross-compiled build. Target-only builds also require libtest, and libtest is currently part of the all-encompassing "compiler build". There's unfortunately no way to learn about just libtest and its dependencies (in a great and robust fashion) so to ensure that we can copy the right artifacts over this commit introduces a new build step, libtest. The new libtest build step has documentation, dist, and link steps as std/rustc already do. The compiler now depends on libtest instead of libstd, and all compiler crates can now assume that test and its dependencies are implicitly part of the sysroot (hence explicit dependencies being removed). This makes the build a tad less parallel as in theory many rustc crates can be compiled in parallel with libtest, but this likely isn't where we really need parallelism either (all the time is still spent in the compiler). All in all this allows the `dist-std` step to depend on both libstd and libtest, so `rust-std` packages produced by rustbuild should start having both the standard library and libtest. Closes #32523
2016-03-29rustbuild: Fix compile on OSX for 10.7Alex Crichton-6/+24
This commit should help configure our OSX rustbuild builder for targeting 10.7. A key part of this is using `libc++` instead of `libstdc++` as apparently it's more filled out and otherwise LLVM's cmake configuration would fail.
2016-03-26Auto merge of #32503 - dotdash:llvm_attrs, r=eddybbors-6/+1
Fix building on ARM
2016-03-26Revert "disable llvm assertions on ARM compilers"Björn Steinbrink-6/+1
This reverts commit afbbb74fecb3945336520d1930bd52bed9ed0819.
2016-03-25Fix the name of the 'check-cargotest' stepBrian Anderson-2/+2
2016-03-22Introduce 'cargotest' and the check-cargotest buildstepBrian Anderson-0/+24
This is a new suite of tests that verifies that the compiler builds specific revisions of select crates from crates.io. It does not run by default. It is intended that buildbot runs these tests against all PRs, and gate on them.
2016-03-19disable llvm assertions on ARM compilersJorge Aparicio-1/+6
workaround for #32360
2016-03-17rustbuild: Fix cross to netbsd from LinuxAlex Crichton-1/+2
Apparently the NetBSD compiler-rt builds into the linux directory as well. I'm... detecting a trend!
2016-03-16rustbuild: Implement `make dist`Alex Crichton-1/+344
This commit implements the `make dist` command in the new rustbuild build system, porting over `dist.mk` and `prepare.mk` into Rust. There's a huge amount of complexity between those two files, not all of which is likely justified, so the Rust implementation is *much* smaller. Currently the implementation still shells out to rust-installer as well as some python scripts, but ideally we'd rewrite it all in the future to not shell out and be in Rust proper.
2016-03-15Auto merge of #32239 - alexcrichton:fix-cross-to-freebsd, r=brsonbors-1/+2
rustbuild: Fix cross compiling to FreeBSD This commit fixes our support for cross compiling a compiler to run on FreeBSD. Over the weekend I managed to get a cross compiler from Linux to FreeBSD [1] which I hope to soon use to start producing FreeBSD nightly compilers. With the `make dist` support added in #32237 we should be able to produce standard rustc/rust-std packages for FreeBSD through a new slave with this cross compiler. Currently, however, we don't "Just Work" when cross compiling FreeBSD and a number of changes were required (part of this PR). They include: * A few build fixes were needed in LLVM. Our own branch has been rebased on the actual 3.8 release and I applied one extra commit [2] which contains two fixes: 1. The LLVM CMake build system passes the `-Wl,-z,defs` flag on many platforms, but *not* when `CMAKE_SYSTEM_NAME` is "FreeBSD". Unfortunately this doesn't take into account when we're cross compiling, and as predicted the build will fail if `-Wl,-z,defs` is passed (see [3] for more info). To fix this we test `TARGET_TRIPLE` instead of the `CMAKE_SYSTEM_NAME` which is what we're compiling for which fixes the problem. 2. The `PATH_MAX` constant is apparently defined in a different location than many other Unix systems, so a file which required this just needed some help to keep compiling. * Support for compiling compiler-rt with CMake has been added to rustbuild. It looks like it just emulates Linux in what it compiles as it didn't seem to naturally produce anything else... At least the architecture is right, so seems good for now at least! [1]: https://github.com/alexcrichton/port-of-rust/blob/master/prebuilt/freebsd/Dockerfile [2]: https://github.com/rust-lang/llvm/commit/be89e4b5 [3]: https://bugs.webkit.org/show_bug.cgi?id=138420
2016-03-14rustbuild: Fix cross compiling to FreeBSDAlex Crichton-1/+2
This commit fixes our support for cross compiling a compiler to run on FreeBSD. Over the weekend I managed to get a cross compiler from Linux to FreeBSD [1] which I hope to soon use to start producing FreeBSD nightly compilers. With the `make dist` support added in #32237 we should be able to produce standard rustc/rust-std packages for FreeBSD through a new slave with this cross compiler. Currently, however, we don't "Just Work" when cross compiling FreeBSD and a number of changes were required (part of this PR). They include: * A few build fixes were needed in LLVM. Our own branch has been rebased on the actual 3.8 release and I applied one extra commit [2] which contains two fixes: 1. The LLVM CMake build system passes the `-Wl,-z,defs` flag on many platforms, but *not* when `CMAKE_SYSTEM_NAME` is "FreeBSD". Unfortunately this doesn't take into account when we're cross compiling, and as predicted the build will fail if `-Wl,-z,defs` is passed (see [3] for more info). To fix this we test `TARGET_TRIPLE` instead of the `CMAKE_SYSTEM_NAME` which is what we're compiling for which fixes the problem. 2. The `PATH_MAX` constant is apparently defined in a different location than many other Unix systems, so a file which required this just needed some help to keep compiling. * Support for compiling compiler-rt with CMake has been added to rustbuild. It looks like it just emulates Linux in what it compiles as it didn't seem to naturally produce anything else... At least the architecture is right, so seems good for now at least! [1]: https://github.com/alexcrichton/port-of-rust/blob/master/prebuilt/freebsd/Dockerfile [2]: https://github.com/rust-lang/llvm/commit/be89e4b5 [3]: https://bugs.webkit.org/show_bug.cgi?id=138420
2016-03-14rustbuild: Refactor stage arguments awayAlex Crichton-134/+109
The facet of a stage is rarely relevant when running a tool or building something, it's all a question of what stage the *compiler* is built in. We've already got a nice handy `Compiler` structure to carry this information, so let's use it! This refactors the signature of the `Build::cargo` function two ways: 1. The `stage` argument is removed, this was just duplicated with the `compiler` argument's stage field. 2. The `target` argument is now required. This was a bug where if the `--target` flag isn't passed then the snapshot stage0 compiler is always used, so we won't pick up any changes. Much of the other changes in this commit are just propagating these decisions outwards. For example many of the `Step` variants no longer have a stage argument as they're baked into the compiler.
2016-03-14rustbuild: Use tool_cmd() instead of tool()Alex Crichton-6/+3
This sets up the dynamic loader path for dylibs required, so should fix the MSVC build right now.
2016-03-08rustbuild: Add the error-index-generatorAlex Crichton-1/+28
This adds a step and a rule for building the error index as part of rustbuild.
2016-03-08rustbuild: Fix stage1 rustdocAlex Crichton-11/+3
Just always build stage1 rustdoc, it's really not that much more to build as it's essentially just one library.
2016-03-08rustbuild: Add a link checker for documentationAlex Crichton-2/+44
Add a script to get run which verifies that `href` links in documents are correct. We're always getting a steady stream of "fix a broken link" PRs and issue reports, and we should probably just nip them all in the bud.
2016-03-08rustbuild: Fixup calling rustdoc in various stagesAlex Crichton-11/+76
The stage0 rustdoc comes from the snapshot, and we need a shim like with `rustc` to pass `--cfg` for now.
2016-03-08rustbuild: Use an enum to indicate destinationAlex Crichton-43/+61
Instead of using a `is_std: bool`, instead use a more well-typed and self-documenting enum to indicate the mode in which Cargo is being invoked.
2016-03-08rustbuild: Move rustbook to a `src/tools` directoryAlex Crichton-13/+41
We've actually got quite a few tools that are compiled as part of our build, let's start housing them all in a `tools` directory.
2016-03-08rustbuild: Refactor adding steps manuallyAlex Crichton-20/+27
Use a macro so it automatically picks up new steps.
2016-03-08rustbuild: Add crate documentation generationAlex Crichton-4/+59
Run `cargo doc` to generate all documentation for the standard library, and also add a target which generates documentation for the compiler as well (but don't enable it by default).
2016-03-07rustbuild: Add `make check` and a check targetAlex Crichton-0/+14
We'll tack on more steps here later
2016-03-06rustbuild: fix cross compilation of libstd to i686-unknown-linux-muslJorge Aparicio-1/+14
- make sure we copy the third party objects (crt*.o) to the target stage directory. - apply the x86_64-musl logic also to the i686-musl target.
2016-03-03[rustbuild] fix cross compilation of std for mips(el)-linux-muslJorge Aparicio-1/+1
These targets don't link statically to libunwind or libc
2016-03-01Auto merge of #31713 - alexcrichton:rustbuild-docs, r=brsonbors-0/+154
This commit implements documentation generation of the nomicon, the book, the style guide, and the standalone docs. New steps were added for each one as well as appropriate makefile targets for each one as well.
2016-02-28rustbuild: Update dependenciesAlex Crichton-35/+18
* Fixes a warning with libc * Brings in some new flag updates for various platforms through gcc-rs * Otherwise routine updates here/there
2016-02-28rustbuild: Update nightly dateAlex Crichton-7/+11
Also fix a bug where we didn't clean out previous nightlies
2016-02-28rustbuild: Relax assertions about stage0Alex Crichton-3/+1
This allows bootstrapping new platforms immediately in stage0
2016-02-28rustbuild: Remove extra rustc flagsAlex Crichton-15/+1
These should all no longer be necessary as they've been folded into the compiler.
2016-02-28rustbuild: Add steps for linking a sysrootAlex Crichton-6/+88
When cross compiling for a new host, we can't actually run the host compiler to generate its own libs. In theory, however, all stage2 compilers (for any host) will produce the same libraries, so we just require the build compiler to produce the necessary host libraries and then we link those into place.