about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2018-07-17Allow clippy to be installed with make installO01eg-0/+2
After #51122 clippy is available as a component but don't install when building from source. This PR allows to install clippy with extended tools.
2018-07-16Enable incremental independent of stageMark Rousskov-4/+1
Previously we'd only do so for stage 0 but with keep-stage improvements it seems likely that we'll see more developers working in the stage 1, so we should allow enabling incremental for them. Ideally, the check we probably want is to only enable incremental for the last compiler build scheduled, but there's no good way to do so today. Just enabling incremental in all stages should be sufficient; we may be doing extra work that's needles -- compiling incrementally something that will never be recompiled in-place -- but that should be sufficiently unlikely (i.e., users either don't care or won't be compiling the compiler twice).
2018-07-16Revert some changes from #51917 to fix #52317.O01eg-1/+1
2018-07-12Rollup merge of #52220 - ljedrz:dyn_bootstrap, r=kennytmkennytm-1/+1
Deny bare trait objects in `src/bootstrap` Enforce `#![deny(bare_trait_objects)]` in `src/bootstrap`.
2018-07-11Auto merge of #51230 - nikic:no-verify-lto, r=pnkfelixbors-0/+4
Disable LLVM verification by default Currently -Z no-verify only controls IR verification prior to LLVM codegen, while verification is performed unconditionally both before and after linking with (Thin)LTO. Also wondering what the sentiment is on disabling verification by default (and e.g. only enabling it on ALT builds with assertions). This does not seem terribly useful outside of rustc development and it does seem to show up in profiles (at something like 3%). **EDIT:** A table showing the various configurations and what is enabled when. | Configuration | Dynamic verification performed | LLVM static assertions compiled in | | --- | --- | --- | | alt builds | | yes | | nightly builds | | no | | stable builds | | no | | CI builds | | | | dev builds in a checkout | | |
2018-07-10Deny bare trait objects in `src/bootstrap`.ljedrz-1/+1
2018-07-03Compile stage0 tools with the raw bootstrap compilerAlex Crichton-3/+19
This commit updates the stage0 build of tools to use the libraries of the stage0 compiler instead of the compiled libraries by the stage0 compiler. This should enable us to avoid any stage0 hacks (like missing SIMD).
2018-06-22Added stripping current directory prefixes when comparing suite path namesSteven Laabs-0/+6
2018-06-21Auto merge of #50336 - japaric:llvm-tools, r=Mark-Simulacrumbors-0/+1
ship LLVM tools with the toolchain this PR adds llvm-{nm,objcopy,objdump,size} to the rustc sysroot (right next to LLD) this slightly increases the size of the rustc component. I measured these numbers on x86_64 Linux: - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.gz 180M -> 193M (+7%) - rustc-1.27.0-dev-x86_64-unknown-linux-gnu.tar.xz 129M -> 137M (+6%) r? @alexcrichton cc #49584
2018-06-16Move bootstrap tests to the end of the default test runMark Simulacrum-1/+2
Since they are unlikely to fail and are almost never going to fail except with bootstrap changes (which would be tested locally anyway) it makes sense to run these tests close to last.
2018-06-12Add verify-llvm-ir flag to config.tomlNikita Popov-0/+4
2018-06-10Allowing building the codegen backend specifically.kennytm-0/+1
Use `./x.py build src/librustc_codegen_llvm` to build the codegen backend.
2018-06-08Do not require stage 2 compiler for rustdocMark Simulacrum-4/+1
2018-06-03make a llvm-tools rustup componentJorge Aparicio-0/+1
2018-06-03impl is_tool on Mode enumCollins Abitekaniza-2/+2
make is_tool inherent prop of mode fix errors from rebase resolve issues from review
2018-06-03refactor Mode enumCollins Abitekaniza-6/+6
2018-05-31builder.cargo(): don't add "--target"/"--release" to cargo installJohannes Nixdorf-5/+10
This is required to use builder.cargo for cargo-vendor.
2018-05-31bootstrap: pass crt-static for the compiler host as wellJohannes Nixdorf-0/+4
2018-05-30Run rustfmtSantiago Pastorino-490/+756
2018-05-30Add compare-mode to x.pySantiago Pastorino-0/+1
2018-05-28Auto merge of #50892 - davidtwco:issue-50004, r=alexcrichtonbors-2/+2
Added rustdoc documentation to compiler docs. Fixes #50004. r? @alexcrichton (since you reviewed the last PR about compiler docs)
2018-05-20Added rustdoc documentation step outputting into compiler documentation.David Wood-2/+2
2018-05-19Auto merge of #50709 - alexcrichton:revert-musl, r=sfacklerbors-4/+0
Revert #50105 until regression is fixed Discovered at https://github.com/rust-lang/rust/pull/50105#issuecomment-388630750 it looks like this caused a regression with i686 musl, so let's revert in the meantime while a fix is worked out
2018-05-17Rollup merge of #50806 - oli-obk:gesundheit, r=ehussMark Simulacrum-0/+1
Add `bless` x.py subcommand for easy ui test replacement fixes #49815 r? @nikomatsakis
2018-05-17Revert "bootstrap: pass crt-static for the compiler host as well"Alex Crichton-4/+0
This reverts commit ec2b861c2f8013e10ab1f6e01c9aed9ad1daaefe.
2018-05-17Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichtonbors-5/+4
Switch to bootstrapping from 1.27 It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17Remove MAKEFLAGS to prevent accidental inheritanceMark Simulacrum-5/+4
2018-05-17Fix selftestsOliver Schneider-0/+1
2018-05-17Make `bless` a flag instead of a subcommandOliver Schneider-5/+0
2018-05-17Add `bless` x.py subcommand for easy ui test replacementOliver Schneider-0/+5
2018-05-17Rename trans to codegen everywhere.Irina Popa-1/+1
2018-05-15Ensure libraries built in stage0 have unique metadataJosh Stone-1/+9
Issue #50786 shows a case with local rebuild where the libraries built by stage0 had the same suffix as stage0's own, and were accidentally loaded by that stage0 rustc when compiling `librustc_trans`. Now we set `__CARGO_DEFAULT_LIB_METADATA` to "bootstrap" during stage0, rather than the release channel like usual, so the library suffix will always be completely distinct from the stage0 compiler.
2018-05-11Auto merge of #50105 - mixi:crt-included, r=alexcrichtonbors-0/+4
Use the correct crt*.o files when linking musl targets. This is supposed to support optionally using the system copy of musl libc instead of the included one if supported. This currently only affects the start files, which is enough to allow building rustc on musl targets. Most of the changes are analogous to crt-static. Excluding the start files is something musl based distributions usually patch into their copy of rustc: - https://github.com/alpinelinux/aports/blob/eb064c8/community/rust/musl-fix-linux_musl_base.patch - https://github.com/voidlinux/void-packages/blob/77400fc/srcpkgs/rust/patches/link-musl-dynamically.patch For third-party distributions that not yet carry those patches it would be nice if it was supported without the need to patch upstream sources. ## Reasons ### What breaks? Some start files were missed when originally writing the logic to swap in musl start files (gcc comes with its own start files, which are suppressed by -nostdlib, but not manually included later on). This caused #36710, which also affects rustc with the internal llvm copy or any other system libraries that need crtbegin/crtend. ### How is it fixed? The system linker already has all the logic to decide which start files to include, so we can just defer to it (except of course if it doesn't target musl). ### Why is it optional? In #40113 it was first tried to remove the start files, which broke compiling musl-targeting static binaries with a glibc-targeting compiler. This is why it eventually landed without removing the start files. Being an option side-steps the issue. ### Why are the start files still installed? This has the nice side-effect, that the produced rust-std-* binaries can still be used by on a glibc-targeting system with a rustc built against glibc. ## Does it work? With the following build script (using [musl-cross-make](https://github.com/richfelker/musl-cross-make)): https://shadowice.org/~mixi/rust-musl/build.sh, I was able to cross-compile a musl-host musl-targeting rustc on a glibc-based system. The resulting binaries are at https://shadowice.org/~mixi/rust-musl/binaries/. This also requires #50103 and #50104 (which are also applied to the branch the build script uses).
2018-05-10Auto merge of #50200 - alexcrichton:compile-with-clang, r=kennytmbors-1/+5
Compile LLVM with Clang on release builders Attempting to cache in on some rustc compile time wins mentioned in https://github.com/rust-lang/rust/issues/49879#issuecomment-383602941
2018-05-10Auto merge of #49729 - collin5:b48483, r=Mark-Simulacrumbors-13/+38
./x.py test should be able to run individual tests Allows user to be able to run individual tests by specifying filename i.e `./x.py test src/test/run-pass/foo.rs` Fixes #48483
2018-05-09ci: Compile LLVM with Clang 6.0.0Alex Crichton-1/+5
Currently on CI we predominately compile LLVM with the default system compiler which means gcc on Linux, some version of Clang on OSX, MSVC on Windows, and gcc on MinGW. This commit switches Linux, OSX, and Windows to all use Clang 6.0.0 to build LLVM (aka the C/C++ compiler as part of the bootstrap). This looks to generate faster code according to #49879 which translates to a faster rustc (as LLVM internally is faster) The major changes here were to the containers that build Linux releases, basically adding a new step that uses the previous gcc 4.8 compiler to compile the next Clang 6.0.0 compiler. Otherwise the OSX and Windows scripts have been updated to download precompiled versions of Clang 6 and configure the build to use them. Note that `cc` was updated here to fix using `clang-cl` with `cc-rs` on MSVC, as well as an update to `sccache` on Windows which was needed to correctly work with `clang-cl`. Finally the MinGW compiler is entirely left out here intentionally as it's currently thought that Clang can't generate C++ code for MinGW and we need to use gcc, but this should be verified eventually.
2018-05-07./x.py test should be able to run individual testsCollins Abitekaniza-13/+38
trim and pass relative test paths as test-args use collect for getting test_args move suite_path to ShouldRun and make Option append existing args to test_args use enum for PathSet handle Suites differently from Paths Error out if part of test suite but not file refactor, make requested changes
2018-05-06Auto merge of #50466 - kennytm:rustbuild-stage0-lib-test, r=Mark-Simulacrumbors-3/+40
rustbuild: Allow quick testing of libstd and libcore at stage0 This PR implemented two features: 1. Added a `--no-doc` flag to allow testing a crate *without* doc tests. In this mode, we don't need to build rustdoc, and thus we can skip building the stage2 compiler. (Ideally stage0 test should use the bootstrap rustdoc, but I don't want to mess up the core builder logic here) 2. Moved all libcore tests externally and added a tidy test to ensure we don't accidentally add `#[test]` into libcore. After this PR, one could run `./x.py test --stage 0 --no-doc src/libstd` to test `libstd` without building the compiler, thus enables us to quickly test new library features.
2018-05-06s/DocTestsOption/DocTests/gkennytm-3/+3
2018-05-05Misc tweaksJohn Kåre Alsaker-0/+4
2018-05-06Added test case.kennytm-0/+35
2018-05-06Added `./x.py test --no-doc` option.kennytm-3/+5
This enables `./x.py test --stage 0 src/libstd --no-doc` and ensures the stage2-rustc and rustdoc need to be built.
2018-04-29bootstrap: pass crt-static for the compiler host as wellJohannes Nixdorf-0/+4
2018-04-27Rollup merge of #49707 - steveklabnik:rustc-book, r=QuietMisdreavuskennytm-2/+2
Add "the Rustc book" This PR introduces a new book into the documentation, "The rustc book". We already have books for Cargo, and for Rustdoc, rustc should have some too. This book is focused on *users* of rustc, and provides a nice place to write documentation for users. I haven't put content here, but plan on scaffolding it out very soon, and wanted this PR open for a few discussions first. One of those is "what exactly should said TOC be?" I plan on having a proposed one up tomorrow, but figured I'd let people know to start thinking about it now. The big one is that we also will want to put https://github.com/rust-lang-nursery/rustc-guide in-tree as well, and the naming is... tough. I'm proposing: * doc.rust-lang.org/rustc is "The Rustc book", to mirror the other tools' books. * doc.rust-lang.org/rustc-contribution is "The Rustc contribution guide", and contains that book @nikomatsakis et al, any thoughts on this? I'm not attached to it in particular, but had to put something together to get this discussion going. I think mirroring the other tools is a good idea for this work, but am not sure where exactly that leaves yours. Fixes https://github.com/rust-docs/team/issues/11
2018-04-19Ensure CleanTools is run for check rustdocvarkor-1/+2
2018-04-19Add rustdoc to x.py checkvarkor-1/+1
This can often encounter errors after modifying rustc, so it's useful to include it in the steps that are checked.
2018-04-19Auto merge of #49890 - varkor:xpy-check-rustc_trans, r=alexcrichtonbors-2/+8
Add rustc_trans to x.py check r? @Mark-Simulacrum I looked at `bootstrap/compile.rs` and `bootstrap/check.rs` to try to work out which steps were appropriate, but I'm sure I've overlooked some details here, so it's worth checking carefully I've got all the steps right (e.g. I wasn't sure whether we want to build LLVM if necessary with `x.py check`, though I thought it was probably better to than to not). From a quick test, it seems to be working, though.
2018-04-18Auto merge of #50022 - nrc:doc-analysis, r=mark-simulacrumbors-1/+3
Only emit save-analysis data for `cargo build` tasks Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer. cc https://github.com/rust-lang-nursery/rls/issues/826 r? @Mark-Simulacrum
2018-04-18Do not rebuild LLVM for x.py checkvarkor-0/+6
2018-04-18Add rustc_trans to x.py checkvarkor-2/+2