This subcommand accepts a number of paths to directories to the crates
and/or artifacts to compile. For example:
- ./x.py build src/libcore
- ./x.py build src/libcore src/libproc_macro
- ./x.py build src/libstd --stage 1
+ ./x.py build library/core
+ ./x.py build library/core library/proc_macro
+ ./x.py build library/std --stage 1
If no arguments are passed then the complete artifacts for that stage are
also compiled.
For a quick build of a usable compiler, you can pass:
- ./x.py build --stage 1 src/libtest
+ ./x.py build --stage 1 library/test
This will first build everything once (like `--stage 0` without further
arguments would), and then use the compiler built in stage 0 to build
- src/libtest and its dependencies.
+ library/test and its dependencies.
Once this is done, build/$ARCH/stage1 contains a usable compiler.",
);
}
This subcommand accepts a number of paths to directories to the crates
and/or artifacts to compile. For example:
- ./x.py check src/libcore
- ./x.py check src/libcore src/libproc_macro
+ ./x.py check library/core
+ ./x.py check library/core library/proc_macro
If no arguments are passed then the complete artifacts are compiled: std, test, and rustc. Note
also that since we use `cargo check`, by default this will automatically enable incremental
This subcommand accepts a number of paths to directories to the crates
and/or artifacts to run clippy against. For example:
- ./x.py clippy src/libcore
- ./x.py clippy src/libcore src/libproc_macro",
+ ./x.py clippy library/core
+ ./x.py clippy library/core library/proc_macro",
);
}
"fix" => {
This subcommand accepts a number of paths to directories to the crates
and/or artifacts to run `cargo fix` against. For example:
- ./x.py fix src/libcore
- ./x.py fix src/libcore src/libproc_macro",
+ ./x.py fix library/core
+ ./x.py fix library/core library/proc_macro",
);
}
"fmt" => {
should be compiled and run. For example:
./x.py test src/test/ui
- ./x.py test src/libstd --test-args hash_map
- ./x.py test src/libstd --stage 0 --no-doc
+ ./x.py test library/std --test-args hash_map
+ ./x.py test library/std --stage 0 --no-doc
./x.py test src/test/ui --bless
./x.py test src/test/ui --compare-mode nll
Note that `test src/test/* --stage N` does NOT depend on `build src/rustc --stage N`;
- just like `build src/libstd --stage N` it tests the compiler produced by the previous
+ just like `build library/std --stage N` it tests the compiler produced by the previous
stage.
Execute tool tests with a tool name argument:
./x.py doc src/doc/book
./x.py doc src/doc/nomicon
- ./x.py doc src/doc/book src/libstd
- ./x.py doc src/libstd --open
+ ./x.py doc src/doc/book library/std
+ ./x.py doc library/std --open
If no arguments are passed then everything is documented:
This subcommand accepts a number of paths to tools to build and run. For
example:
- ./x.py run src/tool/expand-yaml-anchors
+ ./x.py run src/tools/expand-yaml-anchors
At least a tool needs to be called.",
);
if let Subcommand::Check { .. } = &cmd {
if matches.opt_str("stage").is_some() {
- println!("{}", "--stage not supported for x.py check, always treated as stage 0");
+ println!("--stage not supported for x.py check, always treated as stage 0");
process::exit(1);
}
if matches.opt_str("keep-stage").is_some() {
- println!(
- "{}",
- "--keep-stage not supported for x.py check, only one stage available"
- );
+ println!("--keep-stage not supported for x.py check, only one stage available");
process::exit(1);
}
}