Add x.py setup
- 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
This commit is contained in:
@@ -141,6 +141,7 @@ mod metadata;
|
||||
mod native;
|
||||
mod run;
|
||||
mod sanity;
|
||||
mod setup;
|
||||
mod test;
|
||||
mod tool;
|
||||
mod toolstate;
|
||||
@@ -165,7 +166,7 @@ mod job {
|
||||
|
||||
use crate::cache::{Interned, INTERNER};
|
||||
pub use crate::config::Config;
|
||||
use crate::flags::Subcommand;
|
||||
pub use crate::flags::Subcommand;
|
||||
|
||||
const LLVM_TOOLS: &[&str] = &[
|
||||
"llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility
|
||||
@@ -470,6 +471,10 @@ impl Build {
|
||||
return clean::clean(self, all);
|
||||
}
|
||||
|
||||
if let Subcommand::Setup { path: include_name } = &self.config.cmd {
|
||||
return setup::setup(&self.config.src, include_name);
|
||||
}
|
||||
|
||||
{
|
||||
let builder = builder::Builder::new(&self);
|
||||
if let Some(path) = builder.paths.get(0) {
|
||||
|
||||
Reference in New Issue
Block a user