about summary refs log tree commit diff
path: root/src/bootstrap/flags.rs
AgeCommit message (Collapse)AuthorLines
2021-08-13Enable `--all-targets` for `x.py check` unconditionallyJoshua Nelson-4/+6
Now that Cargo deduplicates diagnostics from different targets, this doesn't flood the console with duplicate errors. Note that this doesn't add `--all-targets` in `Builder::cargo` directly because `impl Step for Std` actually wants to omit `--all-targets` the first time while it's still building libtest. When passed `--all-targets`, this warns that the option isn't needed, but still continues to compile.
2021-08-03Add x.py option to --force-rerun compiletest testsSmitty-0/+10
2021-07-21Make `x.py d` an alias for `x.py doc`inquisitivecrystal-4/+5
2021-05-11Rollup merge of #84783 - jyn514:fmt-one, r=Mark-SimulacrumYuki Okushi-1/+2
Allow formatting specific subdirectories Fixes https://github.com/rust-lang/rust/issues/71094.
2021-05-01Allow formatting specific subdirectoriesJoshua Nelson-1/+2
2021-04-30Fix help for profile flagsTyler Mandry-2/+2
2021-04-30Add support for --run for non-ui testsTyler Mandry-6/+1
2021-04-30Add run flag to bootstrap testTyler Mandry-0/+15
2021-02-16avoid full-slicing slicesMatthias Krüger-1/+1
If we already have a slice, there is no need to get another full-range slice from that, just use the original. clippy::redundant_slicing
2021-01-16Support non-stage0 checkMark Rousskov-5/+1
2020-12-22Utilize PGO for rustc linux dist buildsMark Rousskov-0/+7
This implements support for applying PGO to the rustc compilation step (not standard library or any tooling, including rustdoc). Expanding PGO to more tools is not terribly difficult but will involve more work and greater CI time commitment. For the same reason of avoiding greater time commitment, this currently avoids implementing for platforms outside of x86_64-unknown-linux-gnu, though in practice it should be quite simple to extend over time to more platforms. The initial implementation is intentionally minimal here to avoid too much work investment before we start seeing wins for a subset of Rust users. The choice of workloads to profile here is somewhat arbitrary, but the general rationale was to aim for a small set that largely avoided time regressions on perf.rust-lang.org's full suite of crates. The set chosen is libcore, cargo (and its dependencies), and a few ad-hoc stress tests from perf.rlo. The stress tests are arguably the most controversial, but they benefit those cases (avoiding regressions) and do not really remove wins from other benchmarks. The primary next step after this PR lands is to implement support for PGO in LLVM. It is unclear whether we can afford a full LLVM rebuild in CI, though, so the approach taken there may need to be more staggered. rustc-only PGO seems well affordable on linux at least, giving us up to 20% wall time wins on some crates for 15 minutes of extra CI time (1 hour up from 45 minutes). The PGO data is uploaded to allow others to reuse it if attempting to reproduce the CI build or potentially, in the future, on other platforms where an off-by-one strategy is used for dist builds at minimal performance cost.
2020-11-12Add `--color` support to bootstrapJoshua Nelson-0/+30
This allows using bootstrap with https://github.com/Canop/bacon.
2020-10-26Add --fix support to `x.py clippy`Joshua Nelson-1/+5
2020-10-23x.py test --test-args flag description enhancementNelson J Morais-1/+7
2020-10-14x.py: setup: Provide a description of what it doesIan Jackson-3/+10
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-14x.py: setup: Refactor to centralise list of profilesIan Jackson-3/+1
Put all()'s otuput in the order we want to print things in, and add a comment about why they are in this order. Provide purpose() and all_for_help(). Use these things everywhere. Move all the abbrev character ("a", "b", etc.) processing into interactive_path. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-12bootstrap: add --include-default-paths to ./x.pyPietro Albini-0/+7
2020-10-07Rollup merge of #77624 - akoptelov:c-all-targets-fix, r=jyn514Dylan DPC-1/+1
Add c as a shorthand check alternative for new options #77603 There is a missing "c" that is a shorthand for "check" in newly added match arm for handling check-specific options.
2020-10-06Add c as a shorthand check alternative for new options #77603Alexander Koptelov-1/+1
2020-10-06Use String type for Profile parse errorAntoine Martin-2/+2
2020-10-06Show available profiles on errorAntoine Martin-1/+8
2020-10-06Use Profile enum for x.py setupAntoine Martin-7/+9
2020-10-03Place all-targets checking behind a flagMark Rousskov-1/+9
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-29Filter out empty items in bootstrap::flags::splitTyler Mandry-1/+1
2020-09-26Rollup merge of #76631 - jyn514:x.py-setup, r=Mark-SimulacrumRalf Jung-1/+31
Add `x.py setup` Closes #76503. - Suggest `x.py setup` if config.toml doesn't exist yet - Prompt for a profile if not given on the command line - Print the configuration that will be used - Print helpful starting commands after setup - Link to the dev-guide after finishing
2020-09-24Add `x.py setup`Joshua Nelson-1/+31
- 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-23Add `keep-stage-std` to `x.py`Dylan MacKenzie-1/+16
This keeps only the `std` artifacts compiled by the given stage, not the compiler. This is useful when working on the latter stages of the compiler in tandem with the standard library, since you don't have to rebuild the *entire* compiler when the standard library changes.
2020-09-16Don't generate bootstrap usage unless it's neededJoshua Nelson-30/+32
Previously, `x.py` would unconditionally run `x.py build` to get the help message. After https://github.com/rust-lang/rust/issues/76165, when checking the CI stage was moved into `Config`, that would cause an assertion failure (but only only in CI!): ``` thread 'main' panicked at 'assertion failed: `(left == right)` left: `1`, right: `2`', src/bootstrap/config.rs:619:49 ``` This changes bootstrap to only generate a help message when it needs to (when someone passes `--help`).
2020-09-11Stop implicitly appending triples to config.toml hosts and targetsMark Rousskov-10/+22
Previously, the CLI --target/--host definitions and configured options differed in their effect: when setting these on the CLI, only the passed triples would be compiled for, while in config.toml we would also compile for the build triple and any host triples. This is needlessly confusing; users expect --target and --host to be identical to editing the configuration file. The new behavior is to respect --host and --target when passed as the *only* configured triples (no triples are implicitly added). The default for --host is the build triple, and the default for --target is the host triple(s), either configured or the default build triple.
2020-08-30mv compiler to compiler/mark-1/+1
2020-08-22bootstrap: fix a couple of clippy lint warningsMatthias Krüger-5/+2
clippy::print_literal clippy::clone_on_copy clippy::single_char_pattern clippy::into_iter_on_ref clippy::match_like_matches_macro
2020-07-28Use --stage 2 in checktoolsJoshua Nelson-1/+1
- Remove useless --stage 2 argument to checktools.sh - Fix help text for expand-yaml-anchors (it had a typo)
2020-07-27mv std libs to library/mark-16/+16
2020-07-17Teach bootstrap about target files vs target triplesJake Goulding-6/+5
`rustc` allows passing in predefined target triples as well as JSON target specification files. This change allows bootstrap to have the first inkling about those differences. This allows building a cross-compiler for an out-of-tree architecture (even though that compiler won't work for other reasons). Even if no one ever uses this functionality, I think the newtype around the `Interned<String>` improves the readability of the code.
2020-06-19Rollup merge of #73352 - ehuss:bootstrap-metadata, r=Mark-SimulacrumRalf Jung-5/+2
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-19Rollup merge of #73317 - davidtwco:bootstrap-config-env-var, r=Mark-SimulacrumRalf Jung-8/+2
bootstrap: read config from $RUST_BOOTSTRAP_CONFIG This PR modifies bootstrap so that `config.toml` is read first from `RUST_BOOTSTRAP_CONFIG`, then `--config` and finally `config.toml` in the current directory. This is a subjective change, intended to improve the ergnomics when using "development shells" for rustc development (for example, using tools such as Nix) which set environment variables to ensure a reproducible environment (these development shells can then be version controlled, e.g. [my rustc shell](https://github.com/davidtwco/veritas/blob/6b74a5c170b6efb2c7b094352932f9158f97eec0/nix/shells/rustc.nix)). By optionally reading `config.toml` from an environment variable, a `config.toml` can be defined in the development shell and a path to it exposed in the `RUST_BOOTSTRAP_CONFIG` environment variable - avoiding the need to manually symlink the contents of this file to `config.toml` in the working directory.
2020-06-16bootstrap: read config from $RUST_BOOTSTRAP_CONFIGDavid Wood-8/+2
This commit modifies bootstrap so that `config.toml` is read first from `RUST_BOOTSTRAP_CONFIG`, then `--config` and finally `config.toml` in the current directory. This is a subjective change, intended to improve the ergnomics when using "development shells" for rustc development (for example, using tools such as Nix) which set environment variables to ensure a reproducible environment (these development shells can then be version controlled). By optionally reading `config.toml` from an environment variable, a `config.toml` can be defined in the development shell and a path to it exposed in the `RUST_BOOTSTRAP_CONFIG` environment variable - avoiding the need to manually symlink the contents of this file to `config.toml` in the working directory. Signed-off-by: David Wood <david@davidtw.co>
2020-06-15Add more info to `x.py build --help` on default value for `-j JOBS`.Felix S. Klock II-1/+6
2020-06-13Speed up bootstrap a little.Eric Huss-5/+2
2020-05-21Add flag to open docs: x.py doc --openDavid Tolnay-1/+13
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-13Forbid stage arguments to checkMark Rousskov-0/+14
Users generally expect that check builds are fast, and that's only true in stage 0 (stages beyond that need us to build a compiler, which is slow).
2020-05-05Add command aliases from Cargo to x.py commandsmibac138-13/+17
2020-04-02bootstrap: add `--json-output` for rust-analyzerNiko Matsakis-0/+3
2020-03-24ci: add github actions configurationPietro Albini-0/+24
2020-03-11Rollup merge of #69603 - chrissimpkins:tidy-docs-update, r=petrochenkovMazdak Farrokhzad-1/+5
tidy: replace `make check` with `./x.py test` in documentation This PR includes a minor documentation update for tidy. It replaces the `make check` approach with `./x.py test` and describes how to execute the tidy checks (only) with ~~`./x.py test src/tools/tidy`~~ `./x.py test tidy`.
2020-03-09remove trailing whitespace (tidy)Chris Simpkins-1/+1
2020-03-09Add documentation of tool testing with x.py scriptChris Simpkins-2/+6
2020-03-06fix various typosMatthias Krüger-1/+1
2020-02-03bootstrap: fix clippy warningsMatthias Krüger-1/+1
2020-01-22bootstrap: update clippy subcmd decriptionMatthias Krüger-1/+1
Clarify where the clippy used in `./x.py clippy` is coming from. It uses whatever clippy binary was installed via rustup, cargo-install or otherwise and does NOT use the binary generated by `./x.py build src/tools/clippy`.