about summary refs log tree commit diff
path: root/src/bootstrap/flags.rs
AgeCommit message (Collapse)AuthorLines
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`.
2020-01-10Match llvm-skip-rebuild flagMatthew Healy-0/+5
2020-01-09Add llvm-skip-rebuild to optsMatthew Healy-0/+8
2019-12-22Format the worldMark Rousskov-60/+37
2019-12-21Implement `./x.py fmt [--check]`.Adam Perry-1/+25
2019-11-10make the error message more readableGuanqun Lu-3/+3
2019-09-04Rename --warnings=allow to --warnings=warnMark Rousskov-3/+3
We never allowed the warnings, only made them not denied.
2019-07-27Remove run-pass test suitesVadim Petrochenkov-1/+1
2019-07-05Lint on invalid values passed to x.py --warningsMark Rousskov-3/+21
This also introduces support for `--warnings allow` and fixes --warnings being overridden by the configuration file, config.toml.
2019-06-24bootstrap: pass '--pass' on to compiletest.Mazdak Farrokhzad-0/+17
2019-05-25Add clippy and fix commands to x.pyljedrz-0/+34
2019-03-25Save coverage file in build_base path, not /tmpPhilipp Hansch-1/+1
2019-03-24Add a way to track Rustfix UI test coveragePhilipp Hansch-0/+15
This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-10bootstrap: fix editionljedrz-5/+5
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-10-26bootstrap: clean up a few clippy findingsMatthias Krüger-10/+9
remove useless format!()s remove redundant field names in a few struct initializations pass slice instead of a vector to a function use is_empty() instead of comparisons to .len() No functional change intended.
2018-08-28expand keep-stage --help textRalf Jung-1/+2
2018-07-30improve test stage documentationRalf Jung-2/+6
2018-07-30improve --stage documentationRalf Jung-1/+4
2018-07-14Change keep-stage to only affect the passed stageMark Rousskov-3/+5
The best way to build a stage 2 rustc is now probably ./x.py build --stage 2 src/rustc # once ./x.py build --stage 2 --keep-stage 1 src/rustc
2018-05-30Run rustfmtSantiago Pastorino-98/+130
2018-05-30Add compare-mode to x.pySantiago Pastorino-0/+11
2018-05-17Make `bless` a flag instead of a subcommandOliver Schneider-10/+10
2018-05-17Add `bless` x.py subcommand for easy ui test replacementOliver Schneider-0/+12
2018-05-06s/DocTestsOption/DocTests/gkennytm-7/+7
2018-05-06Added `./x.py test --no-doc` option.kennytm-6/+13
This enables `./x.py test --stage 0 src/libstd --no-doc` and ensures the stage2-rustc and rustdoc need to be built.
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-0/+6
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-04-07Don't default to stage 1 with incrementalTamir Duberstein-7/+1
Closes #43177.
2018-04-03Refactor to use a dry-run config instead of cfg(test)Mark Simulacrum-1/+3
This ensures that each build will support the testing design of "dry running" builds. It's also checked that a dry run build is equivalent step-wise to a "wet" run build; the graphs we generate when running are directly compared node/node and edge/edge, both for order and contents.
2018-04-03Stop accessing current_dir in bootstrapMark Simulacrum-8/+0
This ensures that the working directory of rustbuild has no effect on it's run; since tests will run with a different cwd this is required for consistent behavior.
2018-03-15Support extra-verbose builds:comex-1/+1
- The bootstrap crate currently passes -v to Cargo if itself invoked with -vv. But Cargo supports -vv (to show build script output), so make bootstrap pass that if itself invoked with -vvv. (More specifically, pass N '-v's to Cargo if invoked with N+1 of them.) - bootstrap.py currently tries to pass on up to two '-v's to cargo when building bootstrap, but incorrectly ('-v' is marked as 'store_true', so argparse stores either False or True, ignoring multiple '-v's). Fix this, allow passing any number of '-v's, and make it consistent with bootstrap's invocation of Cargo (i.e. subtract one from the number of '-v's). - Also improve bootstrap.py's config.toml 'parsing' to support arbitrary verbosity levels, + allow command line to override it.