about summary refs log tree commit diff
path: root/src/bootstrap/builder.rs
AgeCommit message (Collapse)AuthorLines
2020-11-28lint-docs: Add --validate flag to validate lint docs separately.Eric Huss-0/+1
2020-11-12Add `--color` support to bootstrapJoshua Nelson-1/+11
This allows using bootstrap with https://github.com/Canop/bacon.
2020-11-11Rollup merge of #78354 - 12101111:rustbuild_profiler, r=Mark-SimulacrumJonas Schievink-2/+2
Support enable/disable sanitizers/profiler per target This PR add options under `[target.*]` of `config.toml` which can enable or disable sanitizers/profiler runtime for corresponding target. If these options are empty, the global options under `[build]` will take effect. Fix #78329
2020-11-09Auto merge of #78201 - joshtriplett:rustc-tls-model, r=Mark-Simulacrumbors-0/+8
Compile rustc crates with the initial-exec TLS model This should produce more efficient code, with fewer calls to __tls_get_addr. The tradeoff is that libraries using it won't work with dlopen, but that shouldn't be a problem for rustc's internal libraries.
2020-11-06Compile tools and internal libraries with the initial-exec TLS modelJosh Triplett-0/+8
This should produce more efficient code, with fewer calls to __tls_get_addr. The tradeoff is that libraries using it won't work with dlopen, but that shouldn't be a problem for tools or for our own internal libraries. Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
2020-11-06Auto merge of #77351 - jyn514:clippy-sysroot, r=Mark-Simulacrumbors-4/+42
Fix `x.py clippy` I don't think this ever worked. Fixes https://github.com/rust-lang/rust/issues/77309. `--fix` support is a work in progress, but works for a very small subset of `libtest`. This works by using the host `cargo-clippy` driver; it does not use `stage0.txt` at all. To mitigate confusion from this, it gives an error if you don't have `rustc +nightly` as the default rustc in `$PATH`. Additionally, it means that bootstrap can't set `RUSTC`; this makes it no longer possible for clippy to detect the sysroot itself. Instead, bootstrap passes the sysroot to cargo. r? `@ghost`
2020-11-05Get `--fix` working for everything except rustdocJoshua Nelson-4/+3
Here's the error for rustdoc: ``` Checking rustdoc artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) error: no library targets found in package `rustdoc-tool` ```
2020-11-03build-manifest: remove legacy promote-release supportPietro Albini-1/+0
This commit removes support for the legacy promote-release, as that's not executed anymore on the nightly channel.
2020-10-26Allow using clippy with either beta or nightlyJoshua Nelson-5/+7
Not 100% sure this will _always_ work, but it works currently.
2020-10-26Add --fix support to `x.py clippy`Joshua Nelson-2/+2
2020-10-26Set the proper sysroot for clippyJoshua Nelson-2/+39
Clippy does its own runtime detection of the sysroot, which was incorrect in this case (it used the beta sysroot). This overrides the sysroot to use `stage0-sysroot` instead. - Get `x.py clippy` to work on nightly - Give a nice error message if nightly clippy isn't installed
2020-10-26Add support for using cg_clif to bootstrap rustcbjorn3-5/+32
2020-10-26Support enable/disable sanitizers/profiler per target12101111-2/+2
2020-10-12bootstrap: add --include-default-paths to ./x.pyPietro Albini-21/+21
2020-10-12bootstrap: add disabled by default build-manifest dist componentPietro Albini-0/+1
2020-10-05Remove the rust stuff and just make it a simple shell scriptCassandra Fridkin-1/+1
It's ok, now I'm writing enough Rust that i'm able to get my fix elsewhere
2020-10-05Merge branch 'master' into hooksCassandra Fridkin-72/+46
2020-10-05Rollup merge of #77407 - pietroalbini:less-build-manifest, r=Mark-SimulacrumDylan DPC-1/+1
Improve build-manifest to work with the improved promote-release This PR makes some changes to build-manifest to have it work better with the other improvements I'm making to [promote-release](https://github.com/rust-lang/promote-release). A new way to invoke the tool was added: `./x.py run src/tools/build-manifest`. The new invocation disables the generation of `.sha256` files and the generation of GPG signatures, as those steps are not tied to the Rust version we're building the manifest of: handling them in `promote-release` will improve the maintenability of our release process. Invocations through the old command (`./x.py dist hash-and-sign`) are referred inside the source code as "legacy". The new invocation also enables internal parallelism, disabled on legacy to avoid overloading our old server. Improvements were also made on how the checksums included in the manifest are generated: * The manifest is first generated with placeholder checksums, and then a function walks through the manifes and calculates only the needed hashes. Before this PR, all the hashes were calculated beforehand, including the hashes of unused files. * Calculating the hashes is now done in parallel with rayon, to better utilize all the available disk bandwidth. * The `sha2` crate is now used instead of the `sha256sum` CLI tool: this avoids the overhead of calling another process, but more importantly enables hardware acceleration whenever available (the `sha256sum` CLI tool doesn't support it at all). r? @Mark-Simulacrum This PR is best reviewed commit-by-commit.
2020-10-03Place all-targets checking behind a flagMark Rousskov-1/+1
This matches Cargo behavior and avoids the (somewhat expensive) double checking, as well as the unfortunate duplicate error messages (#76822, rust-lang/cargo#5128).
2020-09-30bootstrap: add ./x.py run src/tools/build-manifestPietro Albini-1/+1
2020-09-28Remove skip_only_host_stepsTyler Mandry-9/+1
And make tests explicitly list their hosts and targets.
2020-09-24Add `x.py setup`Joshua Nelson-1/+3
- Suggest `x.py setup` if config.toml doesn't exist yet (twice, once before and once after the build) - Prompt for a profile if not given on the command line - Print the configuration file that will be used - Print helpful starting commands after setup - Link to the dev-guide after finishing - Note that distro maintainers will see the changelog warning
2020-09-16Rollup merge of #76741 - Mark-Simulacrum:no-dry-run-timing, r=alexcrichtonTyler Mandry-1/+1
Avoid printing dry run timings This avoids a wall of text on CI with 0.000 as the likely time. r? @alexcrichton
2020-09-16Rollup merge of #76735 - jyn514:no-clone, r=Mark-SimulacrumTyler Mandry-1/+1
Remove unnecessary `clone()`s in bootstrap The performance difference is negligible, but it makes me feel better. r? @Mark-Simulacrum
2020-09-16Remove unnecessary `clone()`s in bootstrapJoshua Nelson-1/+1
The performance difference is negligible, but it makes me feel better. Note that this does not remove some clones in `config`, because it would require changing the logic around (and performance doesn't matter for bootstrap).
2020-09-16Rollup merge of #76717 - ehuss:fix-rustc-book-libdir, r=Mark-SimulacrumDylan DPC-2/+6
Fix generating rustc docs with non-default lib directory. If `libdir` is set in `config.toml`, then the tool to generate the rustc docs was unable to run `rustc` because it could not find the shared libraries. The solution is to set the dylib search path to include the libdir. I changed the API of `add_rustc_lib_path` to take `Command` instead of `Cargo` to try to share the code in several places. This is how it worked before https://github.com/rust-lang/rust/pull/64316, and I think this still retains the spirit of that change. Fixes #76702
2020-09-16Auto merge of #76625 - jyn514:default-stages, r=Mark-Simulacrumbors-29/+2
Make the default stage for x.py configurable This also allows configuring each sub-command individually. Possibly #76617 should land before this? I don't feel strongly either way, I don't mind waiting. Closes https://github.com/rust-lang/rust/issues/76165. r? `@Mark-Simulacrum`
2020-09-15Make the default stage for x.py configurableJoshua Nelson-29/+2
This allows configuring the default stage for each sub-command individually. - Normalize the stage as early as possible, so there's no confusion about which to use. - Don't add an explicit `stage` option in config.toml This offers no more flexibility than `*_stage` and makes it confusing which takes precedence. - Always give `--stage N` precedence over config.toml - Fix bootstrap tests This changes the tests to go through `Config::parse` so that they test the actual defaults, not the dummy ones provided by `default_opts`. To make this workable (and independent of the environment), it does not read `config.toml` for tests.
2020-09-15Avoid printing dry run timingsMark Rousskov-1/+1
2020-09-14Fix generating rustc docs with non-default lib directory.Eric Huss-2/+6
2020-09-12Auto merge of #76639 - Mark-Simulacrum:ci-hosts, r=pietroalbinibors-1/+1
Add host triples to CI builders This is a follow-up to #76415, which changed how x.py interprets cross-compilation target/host flags. This should fix the known cases, but I'm still working through CI logs before/after that PR to identify if anything else is missing.
2020-09-12Print all step timingsMark Rousskov-1/+1
It is really painful to inspect differences in what was built in CI if things are appearing and disappearing randomly as they hover around the 100ms mark. No matter what we choose there's always going to be quite a bit of variability on CI in timing, so we're going to see things appear and vanish.
2020-09-11Remove host parameter from step configurationsMark Rousskov-12/+9
rustc is a natively cross-compiling compiler, and generally none of our steps should care whether they are using a compiler built of triple A or B, just the --target directive being passed to the running compiler. e.g., when building for some target C, you don't generally want to build two stds: one with a host A compiler and the other with a host B compiler. Just one std is sufficient.
2020-09-10Auto merge of #76378 - petrochenkov:lldtest, r=Mark-Simulacrumbors-6/+11
rustbuild: Build tests with LLD if `use-lld = true` was passed Addresses https://github.com/rust-lang/rust/pull/76127#discussion_r479932392. Our test suite is generally ready to run with an explicitly specified linker (https://github.com/rust-lang/rust/pull/45191), so LLD specified with `use-lld = true` works as well. Only 4 tests fail (on `x86_64-pc-windows-msvc`): ``` ui/panic-runtime/lto-unwind.rs run-make-fulldeps/debug-assertions run-make-fulldeps/foreign-exceptions run-make-fulldeps/test-harness ``` All of them are legitimate issues with LLD (or at least with combination Rust+LLD) and manifest in segfaults on access to TLS (https://github.com/rust-lang/rust/pull/76127#issuecomment-683473325). UPD: These issues are caused by https://github.com/rust-lang/rust/issues/72145 and appear because I had `-Ctarget-cpu=native` set. UPD: Further commits build tests with LLD for non-MSVC targets and propagate LLD to more places when `use-lld` is enabled.
2020-09-09Move `rustllvm` into `rustc_llvm`Vadim Petrochenkov-3/+3
2020-09-09Rollup merge of #76379 - petrochenkov:nodegen, r=Mark-SimulacrumDylan DPC-5/+5
rustbuild: Remove `Mode::Codegen` It's no longer used.
2020-09-07Dedicated rust development tarballMark Rousskov-0/+1
This currently includes libLLVM, llvm-config, and FileCheck, but will perhaps expand to more tooling overtime. It should be considered entirely unstable and may change at any time.
2020-09-07rustbuild: Deduplicate LLD checks slightlyVadim Petrochenkov-4/+3
2020-09-07rustbuild: Propagate LLD to more places when `use-lld` is enabledVadim Petrochenkov-1/+7
2020-09-07rustbuild: Build tests with LLD if `use-lld = true` was passedVadim Petrochenkov-3/+3
2020-09-05rustbuild: Remove `Mode::Codegen`Vadim Petrochenkov-5/+5
2020-09-04There isn't a way to pass --remove yet, but you can rm if u likeCassandra Fridkin-1/+1
2020-09-03Check test/example/benchmark on x.py checkMark Rousskov-1/+1
Often when modifying compiler code you'll miss that you've changed an API used by unit tests, since x.py check didn't previously catch that. It's also useful to have this for editing with rust-analyzer and similar tooling where editing tests previously didn't notify you of errors in test files.
2020-08-31rustbuild: Remove one LLD workaroundVadim Petrochenkov-6/+2
2020-08-29Allow --bess ing expect-tests in toolsAleksey Kladov-0/+5
See #75773 and #75775
2020-08-16Auto merge of #75472 - Mark-Simulacrum:mangling-config, r=eddybbors-0/+4
Add option to use the new symbol mangling in rustc/std I don't know if this causes problems in some cases -- maybe it should be on by default for at least rustc. I've never encountered problems with it other than tools not supporting it, though. cc @nnethercote r? @eddyb
2020-08-14Deal with spaces in the rust version.Eric Huss-3/+7
2020-08-14Fix crate-version with rustdoc in bootstrap.Eric Huss-2/+1
2020-08-12Add option to use the new symbol mangling in rustc/stdMark Rousskov-0/+4
2020-08-12Add a script to verify the Platform Support page is up-to-date.Eric Huss-0/+1