summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2017-01-19let BSD to use gmake for GNU-makeSébastien Marie-1/+3
the diff extends build_helper to provide an function to return the expected name of GNU-make on the host: "make" or "gmake". Fixes #38429
2017-01-17rustbuild: Don't enable debuginfo in rustcAlex Crichton-0/+16
In #37280 we enabled line number debugging information in release artifacts, primarily to close out #36452 where debugging information was critical for MSVC builds of Rust to be useful in production. This commit, however, apparently had some unfortunate side effects. Namely it was noticed in #37477 that if `RUST_BACKTRACE=1` was set then any compiler error would take a very long time for the compiler to exit. The cause of the problem here was somewhat deep: * For all compiler errors, the compiler will `panic!` with a known value. This tears down the main compiler thread and allows cleaning up all the various resources. By default, however, this panic output is suppressed for "normal" compiler errors. * When `RUST_BACKTRACE=1` was set this caused every compiler error to generate a backtrace. * The libbacktrace library hits a pathological case where it spends a very long time in its custom allocation function, `backtrace_alloc`, because the compiler has so much debugging information. More information about this can be found in #29293 with a summary at the end of #37477. To solve this problem this commit simply removes debuginfo from the compiler but not from the standard library. This should allow us to keep #36452 closed while also closing #37477. I've measured the difference to be orders of magnitude faster than it was before, so we should see a much quicker time-to-exit after a compile error when `RUST_BACKTRACE=1` is set. Closes #37477 Closes #37571
2017-01-07Merge pull request #38884 from nikomatsakis/beta-unmergedAlex Crichton-1/+10
More beta backports
2017-01-06rustbuild: Stop building docs for std dependanciesOliver Middleton-1/+10
2017-01-06rustbuild: Fix source tarballs and the vendor dirAlex Crichton-0/+7
The source tarball creation step would attempt to skip a number of files that we want to ignore ourselves, but once we've hit the vendor directory we don't want to skip anything so be sure to vendor everything inside that directory. Closes #38690
2016-12-30rustbuild: Stop building docs for libtest by defaultOliver Middleton-1/+1
They cause the search index from the std docs to get overwritten just like #34800. Part of #38319.
2016-12-30rustbuild: Update Cargo download locationAlex Crichton-13/+9
I updated the beta compiler used to bootstrap the master branch in #38438 with the intention of fixing Travis OSX linkage issues but I mistakenly forgot that the PR only updated rustc, not Cargo itself. Cargo has a new release process with downloads in a different location, so this commit updates rustbuild to download from this new location by tracking revisions instead of Cargo nightly dates.
2016-12-30std: Don't build docs for misc facade cratesAlex Crichton-1/+2
Retain the same behavior as stable. Closes #38319
2016-12-19Auto merge of #38405 - alexcrichton:rustbuild-fixes, r=japaricbors-0/+6
rustbuild: Fix `copy` helper with existing files This erroneously truncated files when the destination already existed and was an existing hard link to the source. This in turn caused weird bugs! Closes #37745
2016-12-18Use exec for the wrapper on UNIXesSimonas Kazlauskas-3/+14
This not only avoids the small – and unnecessary – constant overhead for each compiler invocation, but also helps somewhat by only having “correct” rustc processes to look for in `/proc/`. This also makes the wrapper behave effectively as a regular exec wrapper its intended to be.
2016-12-18Auto merge of #38440 - alexcrichton:fix-osx-nightlies, r=brsonbors-0/+9
rustbuild: Fix LC_ID_DYLIB directives on OSX Currently libraries installed by rustbuild on OSX have an incorrect `LC_ID_DYLIB` directive located in the dynamic libraries that are installed. The directive we expect looks like: @rpath/libstd.dylib Which means that if you want to find that dynamic library you should look at the dylib's other `@rpath` directives. Typically our `@rpath` directives look like `@loader_path/../lib` for the compiler as that's where the installed libraries will be located. Currently, though, rustbuild produces dylibs with the directive that looks like: /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib In other words, the build directory is encoded erroneously. The compiler already [knows how] to change this directive, but it only passes that argument when `-C rpath` is also passed. The rustbuild system, however, explicitly [does not pass] this option explicitly and instead bakes its own. This logic then also erroneously didn't pass `-Wl,-install_name` like the compiler. [knows how]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214 [does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/bootstrap/bin/rustc.rs#L133-L158 To fix this regression this patch introduces a new `-Z` flag, `-Z osx-rpath-install-name` which basically just forces the compiler to take the previous `-install_name` branch when creating a dynamic library. Hopefully we can sort out a better rpath story in the future, but for now this "hack" should suffice in getting our nightly builds back to the same state as before. Closes #38430
2016-12-18Auto merge of #38439 - alexcrichton:fix-nightlies, r=brsonbors-0/+1
rustbuild: Create directories in mingw dist Previously we accidentally relied on the mingw dist step running last, but the step just needed to ensure the directories were created.
2016-12-17rustbuild: Fix LC_ID_DYLIB directives on OSXAlex Crichton-0/+9
Currently libraries installed by rustbuild on OSX have an incorrect `LC_ID_DYLIB` directive located in the dynamic libraries that are installed. The directive we expect looks like: @rpath/libstd.dylib Which means that if you want to find that dynamic library you should look at the dylib's other `@rpath` directives. Typically our `@rpath` directives look like `@loader_path/../lib` for the compiler as that's where the installed libraries will be located. Currently, though, rustbuild produces dylibs with the directive that looks like: /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib In other words, the build directory is encoded erroneously. The compiler already [knows how] to change this directive, but it only passes that argument when `-C rpath` is also passed. The rustbuild system, however, explicitly [does not pass] this option explicitly and instead bakes its own. This logic then also erroneously didn't pass `-Wl,-install_name` like the compiler. [knows how]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214 [does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/bootstrap/bin/rustc.rs#L133-L158 To fix this regression this patch introduces a new `-Z` flag, `-Z osx-rpath-install-name` which basically just forces the compiler to take the previous `-install_name` branch when creating a dynamic library. Hopefully we can sort out a better rpath story in the future, but for now this "hack" should suffice in getting our nightly builds back to the same state as before. Closes #38430
2016-12-17rustbuild: Create directories in mingw distAlex Crichton-0/+1
Previously we accidentally relied on the mingw dist step running last, but the step just needed to ensure the directories were created.
2016-12-16Auto merge of #38359 - alexcrichton:sccache, r=brsonbors-7/+38
rustbuild: Add sccache support This commit adds support for sccache, a ccache-like compiler which works on MSVC and stores results into an S3 bucket. This also switches over all Travis and AppVeyor automation to using sccache to ensure a shared and unified cache over time which can be shared across builders. The support for sccache manifests as a new `--enable-sccache` option which instructs us to configure LLVM differently to use a 'sccache' binary instead of a 'ccache' binary. All docker images for Travis builds are updated to download Mozilla's tooltool builds of sccache onto various containers and systems. Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of our ccache goodies. --- Note that this does not currently change Windows [due to previously written up issues](https://github.com/rust-lang/rust/issues/38119#issuecomment-266631585). Despite that, however, I was curious to get timings for the builds on Travis to see what ranges we're working with. As a result, this is a WIP PR I'm using to gauge build times and such.
2016-12-15rustbuild: Fix `copy` helper with existing filesAlex Crichton-0/+6
This erroneously truncated files when the destination already existed and was an existing hard link to the source. This in turn caused weird bugs! Closes #37745
2016-12-15Auto merge of #38394 - alexcrichton:fix-nightlies, r=brsonbors-1/+6
rustbuild: Package rust-mingw by default This fixes the `make dist` step on MinGW to package the `rust-mingw` component by default. This should hopefully be the last step in fixing nightlies.
2016-12-15rustbuild: Package rust-mingw by defaultAlex Crichton-1/+6
This fixes the `make dist` step on MinGW to package the `rust-mingw` component by default. This should hopefully be the last step in fixing nightlies.
2016-12-15Auto merge of #38331 - bluss:assume-stage, r=alexcrichtonbors-0/+16
rustbuild: Add cli option --keep-stage This option is intended to be used like: ./x.py build --stage 1 --keep-stage 0 Which skips all stage 0 steps, so that stage 1 can be recompiled directly (even if for example libcore has changes). This is useful when working on `cfg(not(stage0))` parts of the libraries or when re-running stage 1 tests in libraries in general. Fixes #38326
2016-12-15rustbuild: Add small description of --keep-stageUlrik Sverdrup-0/+9
2016-12-14rustbuild: Add sccache supportAlex Crichton-7/+38
This commit adds support for sccache, a ccache-like compiler which works on MSVC and stores results into an S3 bucket. This also switches over all Travis and AppVeyor automation to using sccache to ensure a shared and unified cache over time which can be shared across builders. The support for sccache manifests as a new `--enable-sccache` option which instructs us to configure LLVM differently to use a 'sccache' binary instead of a 'ccache' binary. All docker images for Travis builds are updated to download Mozilla's tooltool builds of sccache onto various containers and systems. Additionally a new `rust-lang-ci-sccache` bucket is configured to hold all of our ccache goodies.
2016-12-14rustbuild: Run `dist` on a `distcheck`Alex Crichton-1/+2
This is what the nightly bots expect, so let's be sure to do that.
2016-12-14Auto merge of #38351 - sanxiyn:doc-test-args, r=alexcrichtonbors-3/+2
Document --test-args for rustbuild There are three changes: * Replace --filter with --test-args * Delete `./x.py test src/test/run-pass/assert-*` example, which doesn't work * As driveby, update Buildbot URLs to https Fix #38275. r? @alexcrichton
2016-12-13rustbuild: Don't dist docs if disabledAlex Crichton-0/+5
This commit skips the `docs` dist step if the `--disable-docs` flag is passed, fixing a compile error seen on nightly.
2016-12-13rustbuild: Skip some more non-relevant dist stepsAlex Crichton-1/+14
This commit skips a few more dist tragets during compilation which shouldn't be necessary. * First, when packaging std we only take action when the host target is the build target. Otherwise we package the same artifacts a number of times, which shouldn't be necessary. * Next, we apply the same logic to the save-analysis build. This is actually required for correctness as the build compiler is the only one which actually has save analysis information. This should fix an error seen on nightlies.
2016-12-14Document --test-args for rustbuildSeo Sanghyeon-3/+2
2016-12-13rustbuild: Add cli option --keep-stageUlrik Sverdrup-0/+7
This option is intended to be used like: ./x.py build --stage 1 --keep-stage 0 Which skips all stage 0 steps, so that stage 1 can be recompiled directly (even if for example libcore has changes). This is useful when working on `cfg(not(stage0))` parts of the libraries, or when re-running stage 1 tests in libraries in general.
2016-12-12rustbuild: Fix dist of save-analysis infoAlex Crichton-10/+3
We don't need an extra bare tarball, the save-analysis info is already produced with a version/target in the filename.
2016-12-12rustbuild: Check for .git as a dirAlex Crichton-2/+2
Git worktrees have this as a file and typically won't work inside docker containers, but that's ok, so instead of just checking for existence check for a directory to see if the git commands will succeed.
2016-12-12rustbuild: Enable unstable features in rustdocAlex Crichton-0/+1
This ensures that stable releases produced by rustbuild will succeed in testing as some of the rustdoc tests use unstable features.
2016-12-11Auto merge of #38252 - pnkfelix:mildly-robustify-configure-msg, r=alexcrichtonbors-1/+1
Make configure message re x.py not assume build dir == src dir Fix #38251 but perhaps not BEST fix for it. As driveby, fix copyright year in `Makefile.in`
2016-12-10Auto merge of #38231 - vadimcn:errormode, r=alexcrichtonbors-0/+11
Prevent Windows from displaying UI on errors. Otherwise tests like run-pass/out-of-stack get wedged on Windows error reporting dialog (unless error reporting has been disabled, of course).
2016-12-10Auto merge of #38233 - alexcrichton:more-errors, r=japaricbors-2/+1
rustbuild: Print out failing commands Just ensure that we always print out the command line which should aid in debugging. Closes #38228
2016-12-09Create tar balls of save-analysis-api metadata for the standard libraries as ↵Nick Cameron-1/+58
part of `make dist`.
2016-12-08rustbuild: Implement distcheckAlex Crichton-9/+42
This commit implements the `distcheck` target for rustbuild which is only ever run on our nightly bots. This essentially just creates a tarball, un-tars it, and then runs a full build, validating that the release tarballs do indeed have everything they need to build Rust.
2016-12-08Fix #38251 but perhaps not BEST fix for it.Felix S. Klock II-1/+1
2016-12-08Auto merge of #38076 - alexcrichton:another-rustbuild-bug, r=japaricbors-0/+8
rustbuild: Use src/rustc for assembled compilers The `src/rustc` path is intended for assembling a compiler (e.g. the bare bones) not actually compiling the whole compiler itself. This path was accidentally getting hijacked to represent the whole compiler being compiled, so let's redirect that elsewhere for that particular cargo project. Closes #38039
2016-12-07Preserve inherited mode flags.Vadim Chugunov-1/+2
2016-12-07Prevent Windows from displaying UI on errors.Vadim Chugunov-0/+10
2016-12-07rustbuild: Print out failing commandsAlex Crichton-2/+1
Just ensure that we always print out the command line which should aid in debugging. Closes #38228
2016-12-07mk: Switch rustbuild to the default build systemAlex Crichton-142/+516
This commit switches the default build system for Rust from the makefiles to rustbuild. The rustbuild build system has been in development for almost a year now and has become quite mature over time. This commit is an implementation of the proposal on [internals] which slates deletion of the makefiles on 2016-01-02. [internals]: https://internals.rust-lang.org/t/proposal-for-promoting-rustbuild-to-official-status/4368 This commit also updates various documentation in `README.md`, `CONTRIBUTING.md`, `src/bootstrap/README.md`, and throughout the source code of rustbuild itself. Closes #37858
2016-12-03Rollup merge of #38073 - cardoe:fix-typo, r=frewsxcvCorey Farwell-1/+1
bootstrap/README: fix small typo
2016-12-02Auto merge of #38050 - alexcrichton:fix-llvm-deps, r=japaricbors-0/+7
rustbuild: Cross-compiled LLVM depens on host We use the host's tblgen so we need to be sure to always build the host first. Closes #38037
2016-11-30Update the bootstrap compilerAlex Crichton-35/+5
Now that we've got a beta build, let's use it!
2016-11-29rustbuild: Use src/rustc for assembled compilersAlex Crichton-0/+8
The `src/rustc` path is intended for assembling a compiler (e.g. the bare bones) not actually compiling the whole compiler itself. This path was accidentally getting hijacked to represent the whole compiler being compiled, so let's redirect that elsewhere for that particular cargo project. Closes #38039
2016-11-29bootstrap/README: fix small typoDoug Goldstein-1/+1
2016-11-28rustbuild: Cross-compiled LLVM depens on hostAlex Crichton-0/+7
We use the host's tblgen so we need to be sure to always build the host first. Closes #38037
2016-11-26Auto merge of #38008 - bluss:rustbuild-benches, r=alexcrichtonbors-14/+88
Add rustbuild command `bench` Add command bench to rustbuild, so that `./x.py bench <path>` can compile and run benchmarks. `./x.py bench --stage 1 src/libcollections` and `./x.py bench --stage 1 src/libstd` should both compile well. Just `./x.py bench` runs all benchmarks for the libstd crates. Fixes #37897
2016-11-25rustbuild: Add bench subcommandUlrik Sverdrup-14/+88
Add command `./x.py bench`; use `./x.py bench --help -v` to list all available benchmark targets.
2016-11-23std: make compilation of libpanic_unwind optional via a Cargo featureJorge Aparicio-1/+1
with this feature disabled, you can (Cargo) compile std with "panic=abort" rustbuild will build std with this feature enabled, to maintain the status quo fixes #37252