summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2020-07-04Fix caching issue when building tools.Eric Huss-4/+14
2020-07-03Add rust-analyzer submoduleAleksey Kladov-0/+3
The current plan is that submodule tracks the `release` branch of rust-analyzer, which is updated once a week. rust-analyzer is a workspace (with a virtual manifest), the actual binary is provide by `crates/rust-analyzer` package. Note that we intentionally don't add rust-analyzer to `Kind::Test`, for two reasons. *First*, at the moment rust-analyzer's test suite does a couple of things which might not work in the context of rust repository. For example, it shells out directly to `rustup` and `rustfmt`. So, making this work requires non-trivial efforts. *Second*, it seems unlikely that running tests in rust-lang/rust repo would provide any additional guarantees. rust-analyzer builds with stable and does not depend on the specifics of the compiler, so changes to compiler can't break ra, unless they break stability guarantee. Additionally, rust-analyzer itself is gated on bors, so we are pretty confident that test suite passes.
2020-07-01Rollup merge of #73929 - kraai:fix-comment-typo, r=jonas-schievinkManish Goregaokar-1/+1
Fix comment typo
2020-07-01Fix comment typoKRAAI, MATTHEW [VISUS]-1/+1
2020-06-29rustbuild: Move compiler-builtins build logic to manifestAlex Crichton-8/+8
This commit moves the compiler-builtins-specific build logic from `src/bootstrap/bin/rustc.rs` into the workspace `Cargo.toml`'s `[profile]` configuration. Now that rust-lang/cargo#7253 is fixed we can ensure that Cargo knows about debug assertions settings, and it can also be configured to specifically disable debug assertions unconditionally for compiler-builtins. This should improve rebuild logic when debug-assertions settings change and also improve build-std integration where Cargo externally now has an avenue to learn how to build compiler-builtins as well.
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-2/+3
2020-06-20Rollup merge of #73404 - ajpaverd:cfguard_syntax, r=Mark-SimulacrumRalf Jung-2/+2
Update CFGuard syntax Update the naming and syntax of the control-flow-guard option, as discussed in #68793. r? @Mark-Simulacrum
2020-06-19Rollup merge of #73352 - ehuss:bootstrap-metadata, r=Mark-SimulacrumRalf Jung-11/+41
Speed up bootstrap a little. The bootstrap script was calling `cargo metadata` 3 times (or 6 with `-v`). This is a very expensive operation, and this attempts to avoid the extra calls. On my system, a simple command like `./x.py test -h -v` goes from about 3 seconds to 0.4. An overview of the changes: - Call `cargo metadata` only once with `--no-deps`. Optional dependencies are filtered in `in_tree_crates` (handling `profiler_builtins` and `rustc_codegen_llvm` which are driven by the config). - Remove a duplicate call to `metadata::build` when using `-v`. I'm not sure why it was there, it looks like a mistake or vestigial from previous behavior. - Remove check for `_shim`, I believe all the `_shim` crates are now gone. - Remove check for `rustc_` and `*san` for `test::Crate::should_run`, these are no longer dependencies in the `test` tree. - Use relative paths in `./x.py test -h -v` output. - Some code cleanup (remove unnecessary `find_compiler_crates`, etc.). - Show suite paths (`src/test/ui/...`) in `./x.py test -h -v` output. - Some doc comments.
2020-06-16Update CFGuard syntaxAndrew Paverd-2/+2
2020-06-15Rollup merge of #73296 - ehuss:remove-msvc-aux, r=Mark-SimulacrumRalf Jung-1/+0
Remove vestigial CI job msvc-aux. This CI job isn't really doing anything, so it seems prudent to remove it. For some history: * This was introduced in #48809 when the msvc job was split in two to keep it under 2 hours (oh the good old days). At the time, this check-aux job did a bunch of things: * tidy * src/test/pretty * src/test/run-pass/pretty * src/test/run-fail/pretty * src/test/run-pass-valgrind/pretty * src/test/run-pass-fulldeps/pretty * src/test/run-fail-fulldeps/pretty * Tidy was removed in #60777. * run-pass and run-pass-fulldeps moved to UI in #63029 * src/test/pretty removed in #58140 * src/test/run-fail moved to UI in #71185 * run-fail-fulldeps removed in #51285 Over time through attrition, the job was left with one lonely thing: `src/test/run-pass-valgrind/pretty`. And of course, this wasn't actually running the "pretty" tests. The normal `run-pass-valgrind` tests ran, and then when it tried to run in "pretty" mode, all the tests were ignored because compiletest thought nothing had changed (apparently compiletest isn't fingerprinting the mode? Needs more investigation…). `run-pass-valgrind` is already being run as part of `x86_64-msvc-1`, so there's no need to run it here. I've taken the liberty of removing `src/test/run-pass-valgrind/pretty` as a distinct test. I'm guessing from the other PR's that the pretty tests should now live in `src/test/pretty`, and that the team has moved away from doing pretty tests on other parts of the `src/test` tree.
2020-06-14Add some doc comments regarding PathSet.Eric Huss-3/+25
2020-06-14Show suite paths (`src/test/ui/...`) in help output.Eric Huss-6/+12
2020-06-14Switch bootstrap metadata to --no-deps.Eric Huss-2/+4
This should run much faster. There are also some drive-by cleanups here to try to simplify things. Also, the paths for in-tree crates are now displayed as relative in `x.py test -h -v`.
2020-06-12Remove vestigial CI job msvc-aux.Eric Huss-1/+0
2020-06-12x.py: do not build Miri by defaultRalf Jung-0/+2
2020-06-01bump Miri, update for cargo-miri being a separate projectRalf Jung-0/+2
2020-05-29Get libdir from stage0 compilerO01eg-0/+1
2020-05-21Add flag to open docs: x.py doc --openDavid Tolnay-1/+1
Tested with: # opens doc/index.html x.py doc --stage 0 --open x.py doc --stage 0 --open src/doc # opens doc/book/index.html x.py doc --stage 0 --open src/doc/book # opens doc/std/index.html x.py doc --stage 0 --open src/libstd # opens doc/proc_macro/index.html x.py doc --stage 0 --open src/libproc_macro # opens both x.py doc --stage 0 --open src/libstd src/libproc_macro
2020-05-15Rollup merge of #72146 - Mark-Simulacrum:separate-std-asserts, r=alexcrichtonDylan DPC-1/+8
Provide separate option for std debug asserts On local one-off benchmarking of libcore metadata-only, debug asserts in std are a significant hit (15s to 20s). Provide an option for compiler developers to disable them. A build with a nightly compiler is around 10s, for reference.
2020-05-14Auto merge of #72058 - RalfJung:no-dist-lldb, r=Mark-Simulacrumbors-1/+0
bootstrap: remove lldb dist packaging The lldb-preview rustup package is missing on every single target, and has never been shipped beyond x86_64-apple-darwin. It was removed in #62592 which landed around a year ago, and there's not been demand that we re-enable it since, so we're now removing support entirely to cleanup the code a bit. The hope is that this will also kill the useless "lldb-preview" row on https://rust-lang.github.io/rustup-components-history/.
2020-05-12Provide separate option for std debug assertsMark Rousskov-1/+8
2020-05-10remove lldb package from bootstrap, config and build-manifestRalf Jung-1/+0
it's not been built since a long time ago
2020-05-06Remove code related to `test/run-fail`Yuki Okushi-2/+0
2020-05-03Auto merge of #71815 - Mark-Simulacrum:no-llvm-rebuild, r=jonas-schievinkbors-2/+10
Don't bust caches on x.py check/build switches Fixes #71152
2020-05-02Don't skip building LLVM if already builtMark Rousskov-2/+10
2020-05-02Auto merge of #70655 - oli-obk:subrepo_funness, r=Mark-Simulacrumbors-1/+1
Make clippy a git subtree instead of a git submodule r? @eddyb cc #70651 documentation at https://github.com/rust-lang/rust/pull/70654
2020-05-02Also build clippy with `./x.py check`Oliver Scherer-1/+1
2020-05-01bootstrap: also apply unused-attributes hack without deny_warningsRalf Jung-6/+6
2020-04-24Only set *FLAGS env vars if they are not emptyDylan MacKenzie-2/+10
2020-04-23Set RUSTDOCFLAGS in `cargo` invocationDylan MacKenzie-2/+9
2020-04-12rustbuild: Remove LLD flavor workaround for MSVCVadim Petrochenkov-16/+0
2020-04-07bootstrap: work around "unused attribute" errors in incremental stdlib rebuilds.Eduard-Mihai Burtescu-0/+7
2020-04-02Translate the virtual `/rustc/$hash` prefix back to a real directory.Eduard-Mihai Burtescu-1/+6
2020-03-24ci: add github actions configurationPietro Albini-0/+5
2020-03-19Avoid llvm-config in more situations, like bootstrap test runsJosh Stone-8/+19
2020-03-18Ensure LLVM is in the link path for rustc toolsJosh Stone-2/+16
2020-03-18Rename add_lib_path to add_dylib_pathJosh Stone-2/+2
2020-03-15Bump the bootstrap compilerJonas Schievink-8/+2
2020-02-11Rollup merge of #68824 - ajpaverd:cfguard-rustbuild, r=Mark-SimulacrumDylan DPC-0/+14
Enable Control Flow Guard in rustbuild Now that Rust supports Control Flow Guard (#68180), add a config.toml option to build the standard library with CFG enabled. r? @nagisa
2020-02-10Enable Control Flow Guard in rustbuildAndrew Paverd-0/+14
2020-02-09Auto merge of #68623 - Zoxc:lld, r=Mark-Simulacrumbors-3/+24
Add an option to use LLD to link the compiler on Windows platforms Based on https://github.com/rust-lang/rust/pull/68609. Using LLD is good way to improve compile times on Windows since `link.exe` is quite slow. The time for `x.py build --stage 1 src/libtest` goes from 0:12:00 to 0:08:29. Compile time for `rustc_driver` goes from 226.34s to 18.5s. `rustc_macros` goes from 28.69s to 7.7s. The size of `rustc_driver` is also reduced from 83.3 MB to 78.7 MB. r? @Mark-Simulacrum
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-1/+7
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-16/+8
2020-01-29Link a linking issueJohn Kåre Alsaker-1/+2
2020-01-29Add an option to use LLD to link the compiler on Windows platformsJohn Kåre Alsaker-3/+23
2020-01-23Clear out std, not std toolsMark Rousskov-1/+1
This was a typo that slipped in, and meant that we were still not properly clearing out std.
2020-01-09Add bootstrap step for building sanitizer runtimesTomasz Miąsko-0/+1
2020-01-08Auto merge of #67760 - Mark-Simulacrum:rustc-dirty, r=alexcrichtonbors-1/+13
Clear out target directory if compiler has changed Previously, we relied fully on Cargo to detect that the compiler had changed and it needed to rebuild the standard library (or later "components"). This used to not quite be the case prior to moving to LLVM be a separate cargo invocation; subsequent compiles would recompile std and friends if LLVM had changed (#67077 is the PR that changes things here). This PR moves us to clearing out libstd when it is being compiled if the rustc we're using has changed. We fairly harshly limit the cases in which we do this (e.g., ignoring dry run mode, and so forth, as well as rustdoc invocations). This is primarily because when we're not using the compiler directly, so clearing out in other cases is likely to lead to bugs, particularly as our deletion scheme is pretty blunt today (basically removing more than is needed, i.e., not just the rustc artifacts). In practice, this targeted fix does fix the known bug, though it may not fully resolve the problem here. It's also not clear that there is a full fix hiding here that doesn't involve a more major change (like -Zbinary-dep-depinfo was). As a drive-by fix, don't delete the compiler before calling Build::copy, as that also deletes the compiler.
2020-01-02bootstrap: Allow for setting the ThinLTO import limit used for compiler the ↵Michael Woerister-0/+15
compiler.
2020-01-01Clear out target directory if compiler has changedMark Rousskov-1/+13
Previously, we relied fully on Cargo to detect that the compiler had changed and it needed to rebuild the standard library (or later "components"). This used to not quite be the case prior to moving to LLVM be a separate cargo invocation; subsequent compiles would recompile std and friends if LLVM had changed (#67077 is the PR that changes things here). This PR moves us to clearing out libstd when it is being compiled if the rustc we're using has changed. We fairly harshly limit the cases in which we do this (e.g., ignoring dry run mode, and so forth, as well as rustdoc invocations). This is primarily because when we're not using the compiler directly, so clearing out in other cases is likely to lead to bugs, particularly as our deletion scheme is pretty blunt today (basically removing more than is needed, i.e., not just the rustc artifacts). In practice, this targeted fix does fix the known bug, though it may not fully resolve the problem here. It's also not clear that there is a full fix hiding here that doesn't involve a more major change (like -Zbinary-dep-depinfo was). As a drive-by fix, don't delete the compiler before calling Build::copy, as that also deletes the compiler.