about summary refs log tree commit diff
path: root/src/bootstrap/flags.rs
AgeCommit message (Collapse)AuthorLines
2023-10-17move bootstrap utils into bootstrap/src/utils moduleonur-ozkan-568/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-09Add `--enable-bolt-settings` bootstrap flagJakub Beránek-0/+3
2023-08-10Auto merge of #112482 - tgross35:ci-non-rust-linters, r=pietroalbinibors-0/+11
Add support for tidy linting via external tools for non-rust files This change adds the flag `--check-extras` to `tidy`. It accepts a comma separated list of any of the options: * py (test everything applicable for python files) * py:lint (lint python files using `ruff`) * py:fmt (check formatting for python files using `black`) * shell or shell:lint (lint shell files using `shellcheck`) Specific files to check can also be specified via positional args. Examples: * `./x test tidy --check-extras=shell,py` * `./x test tidy --check-extras=py:fmt -- src/bootstrap/bootstrap.py` * `./x test tidy --check-extras=shell -- src/ci/*.sh` * Python formatting can be applied with bless: `./x test tidy --ckeck-extras=py:fmt --bless` `ruff` and `black` need to be installed via pip; this tool manages these within a virtual environment at `build/venv`. `shellcheck` needs to be installed on the system already. --- This PR doesn't fix any of the errors that show up (I will likely go through those at some point) and it doesn't enforce anything new in CI. Relevant zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Other.20linters.20in.20CI
2023-08-06fix(bootstrap): rename exclude flag to skip 🐛Meysam Azad-2/+5
2023-08-02Add support for tidy linting via external tools for non-rust filesTrevor Gross-0/+11
This change adds the flag `--check-extras` to `tidy`. It accepts a comma separated list of any of the options: - py (test everything applicable for python files) - py:lint (lint python files using `ruff`) - py:fmt (check formatting for python files using `black`) - shell or shell:lint (lint shell files using `shellcheck`) Specific files to check can also be specified via positional args. Examples: - `./x test tidy --check-extras=shell,py` - `./x test tidy --check-extras=py:fmt -- src/bootstrap/bootstrap.py` - `./x test tidy --check-extras=shell -- src/ci/*.sh` - Python formatting can be applied with bless: `./x test tidy --ckeck-extras=py:fmt --bless` `ruff` and `black` need to be installed via pip; this tool manages these within a virtual environment at `build/venv`. `shellcheck` needs to be installed on the system already.
2023-07-31Pass BOLT profile to bootstrap to be included in the reproducible artifacts ↵Jakub Beránek-5/+2
archive
2023-07-31Auto merge of #114126 - ozkanonur:stage-support-for-clean, r=ozkanonurbors-0/+4
clean stage-specific artifacts using `x clean --stage` fixes #109313
2023-07-30support `--stage` for `x clean`ozkanonur-0/+4
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-07-30bootstrap: inline format!() argsMatthias Krüger-1/+1
2023-07-13Rename `detail_exit_macro` to `exit`jyn-2/+2
`detail` and `macro` weren't adding any info.
2023-07-03Remove compare modeMichael Goulet-1/+1
2023-05-30create `build_helper/src/util` modozkanonur-2/+2
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-24Auto merge of #111566 - clubby789:bootstrap-override-config, r=ozkanonurbors-0/+3
Override config.toml options from command line https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Running.20tests.20on.20precompiled.20rustc/near/357763280 cc `@jyn514`
2023-05-19Override config.toml options from command lineclubby789-0/+3
2023-05-17Fix typo in bootstrap command descriptionJakub Beránek-1/+1
2023-05-10Generate shell completions for bootstrap with Clapclubby789-14/+35
2023-05-07Auto merge of #110693 - clubby789:x-clap-take-2, r=Mark-Simulacrumbors-659/+336
Migrate bootstrap to Clap-based argument parsing Supercedes #108083 I chose to re-do the work rather than rebase the onto the large changes since the original PR. If it's preferred I can instead force-push the original PR to this version. cc `@jyn514` `@albertlarsan68`
2023-05-06Migrate bootstrap to Clap-based argumentsclubby789-659/+336
2023-05-04Use `free-args` consistently in bootstrapjyn-18/+0
Previously, this was only passed to miri and compiletest. Extended it to all other tests and binaries as well.
2023-04-09feat: implement basic suggest-tests toolEzra Shaw-3/+11
2023-03-05Rollup merge of #108613 - jyn514:rm-skip-rebuild, r=Mark-SimulacrumMatthias Krüger-13/+0
Remove `llvm.skip-rebuild` option This was added to in 2019 to speed up rebuild times when LLVM was modified. Now that download-ci-llvm exists, I don't think it makes sense to support an unsound option like this that can lead to miscompiles; and the code cleanup is nice too. r? `@Mark-Simulacrum` cc `@varkor` #65612
2023-03-01Remove `llvm.skip-rebuild` optionJoshua Nelson-13/+0
This was added to in 2019 to speed up rebuild times when LLVM was modified. Now that download-ci-llvm exists, I don't think it makes sense to support an unsound option like this that can lead to miscompiles; and the code cleanup is nice too.
2023-02-25Rollup merge of #107848 - clubby789:x-setup-options, r=Mark-SimulacrumMichael Goulet-3/+10
Split `x setup` sub-actions to CLI arguments Closes #107846 This adds a new `none` profile option which simply skips the `config.toml` step. It also adds `hook` and `vscode` subcommands, for installing the pre-push hook and getting `settings.json` respectively.
2023-02-17Rollup merge of #107905 - clubby789:x-free-args, r=albertlarsan68Matthias Krüger-0/+11
Pass arguments to `x` subcommands with `--` Fixes #107375 Any arguments passed to `x` following `--` are removed and not parsed, instead passed down to subcommands (just the ones listed in the issue, not sure if more are needed). This does not remove the existing `--args` and `--test-args` behaviour, just extends it. It's also not documented in the help, not sure of the best way to format it. r? `@jyn514`
2023-02-13Add additional options to `x setup`clubby789-3/+10
2023-02-10Pass arguments to `x` subcommands with `--`clubby789-0/+11
2023-02-10add only modified for compiletestyukang-0/+10
2023-01-11Change `src/test` to `tests` in source files, fix tidy and testsAlbert Larsan-4/+4
2022-12-31Fix panic on `x build --help`Joshua Nelson-22/+22
2022-12-27Auto merge of #106168 - jyn514:clean-crates, r=Mark-Simulacrumbors-8/+2
Allow cleaning individual crates As a bonus, this stops special casing `clean` in `Builder`. ## Motivation Cleaning artifacts isn't strictly necessary to get cargo to rebuild; `touch compiler/rustc_driver/src/lib.rs` (for example) will also work. There's two reasons I thought making this part of bootstrap proper was a better approach: 1. `touch` does not *remove* artifacts, it just causes a rebuild. This is unhelpful for when you want to measure how long the compiler itself takes to build (e.g. for https://github.com/rust-lang/rust/issues/65031). 2. It seems a little more discoverable; and I want to extend it in the future to things like `x clean --stage 1 rustc`, which makes it easier to work around https://github.com/rust-lang/rust/issues/76720 without having to completely wipe all the stage 0 artifacts, or having to be intimately familiar with which directories to remove.
2022-12-26Allow cleaning individual cratesJoshua Nelson-8/+2
As a bonus, this stops special casing `clean` in `Builder`.
2022-12-26Fix panic on `x build --help --verbose`Joshua Nelson-1/+11
This also makes the panic message a little more informative in case it happens again.
2022-12-17Remove special cases for setup subcommandBenjamin Tong-3/+3
- Remove setup special-casing in Flags::parse
2022-11-26Don't update submodules for `x setup`Joshua Nelson-4/+5
Before, the submodule handling was very jank and would update *between two interactive prompts*: ``` ; x setup Building rustbuild Finished dev [unoptimized] target(s) in 0.05s Welcome to the Rust project! What do you want to do with x.py? a) library: Contribute to the standard library Please choose one (a/b/c/d/e): a Updating submodule library/backtrace Submodule 'library/backtrace' (https://github.com/rust-lang/backtrace-rs.git) registered for path 'library/backtrace' error: you asked `x.py` to setup a new config file, but one already exists at `config.toml` Build completed unsuccessfully in 0:00:02 ``` That's not a great user experience because you need to wait a long time between prompts. It would be possible to move the submodule handling either before or after the prompt, but it seems better to just not require submodules to be checked out at all, to minimize the time spend waiting just to create a new configuration.
2022-11-06bootstrap: add support for running Miri on a fileRalf Jung-8/+17
2022-10-09Use BOLT in x64 dist CI to optimize LLVMJakub Beránek-0/+6
2022-09-17Add a new component, `rust-json-docs`, to distribute the JSON-formatted ↵Luca Palmieri-1/+19
documentation for std crates in nightly toolchains. We also add a new flag to `x doc`, `--json`, to render the JSON-formatted version alongside the HTML-formatted one.
2022-08-15Revert "Revert "Remove num_cpus dependency from bootstrap, build-manifest ↵The 8472-1/+1
and rustc_session"" This reverts commit 1ae4b258267462da0b1aae1badcf83578153c799.
2022-08-14Impl Debug for some structs of rustbuildohno418-0/+1
2022-07-31Move `x test --skip` to be part of `--exclude`Joshua Nelson-12/+0
`--skip` is inconsistent with the rest of the interface and redundant with `--exclude`. Fix --exclude to work properly for files and directories rather than having a separate flag. If someone needs to use --skip for something other than compiletest, they can use `--test-args --skip` instead.
2022-07-29Don't give a hard error for `x check --keep-stage 0`Joshua Nelson-9/+0
Stage 1 check has been supported since https://github.com/rust-lang/rust/pull/81064. #81064 changed the error message for this, but I don't think there's any reason we should prevent using it. I tested locally and `keep-stage` works fine. Don't give a hard error when trying to use it.
2022-07-11Rollup merge of #97210 - Milo123459:clippy-args, r=jyn514Matthias Krüger-1/+16
Support `-A`, `-W`, `-D` and `-F` when running `./x.py clippy` Resolves #97059 This PR adds support for `-A`, `-W`, `-D` and `-F` when running `./x.py clippy`.
2022-07-11clippy argument supportMilo-1/+16
2022-07-07squash the commitstoshiki goto-7/+6
implement detail_exit but I'm not sure it is right. not create new file and write detail exit in lib.rs replace std::process::exit to detail_exit that is not related to code runnning. remove pub
2022-06-30Add a `--build-dir` flag to rustbuildThom Chiovoloni-0/+8
2022-06-09Revert "Remove num_cpus dependency from bootstrap, build-manifest and ↵David Tolnay-1/+1
rustc_session" This reverts commit 2d854f9c340df887e30896f49270ae81feb3e227.
2022-06-03Fully stabilize NLLJack Huey-1/+1
2022-05-28Rollup merge of #97411 - raiyansayeed:print-stderr-consistently, ↵Matthias Krüger-4/+4
r=Mark-Simulacrum Print stderr consistently Solves https://github.com/rust-lang/rust/issues/96712 I tried to follow what I perceived as the general consensus for error messages in boostrap i.e messages that were .. * resulting from an Err(...) => * literally called as "Error: ...." * by the end of the block scope forced to run a panic! or process::exit with a guaranteed non-zero error code.
2022-05-25feat: refactored bootstrap files to use stderr consistentlyRaiyan-4/+4
2022-05-10Add test skip supportCollin Baker-2/+19
libtest already supports a "--skip SUBSTRING" arg which excludes any test names matching SUBSTRING. This adds a "--skip" argument to compiletest and bootstrap which is forwarded to libtest.