Merge commit '3187d32079b817522cc17413ec9185b130daf693' into subtree-update
This commit is contained in:
@@ -98,7 +98,7 @@ impl ConfigFile {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
#[derive(Default, Debug, Clone)]
|
||||
pub struct ConfigInfo {
|
||||
pub target: String,
|
||||
pub target_triple: String,
|
||||
@@ -123,6 +123,7 @@ pub struct ConfigInfo {
|
||||
pub no_download: bool,
|
||||
pub no_default_features: bool,
|
||||
pub backend: Option<String>,
|
||||
pub features: Vec<String>,
|
||||
}
|
||||
|
||||
impl ConfigInfo {
|
||||
@@ -133,6 +134,13 @@ impl ConfigInfo {
|
||||
args: &mut impl Iterator<Item = String>,
|
||||
) -> Result<bool, String> {
|
||||
match arg {
|
||||
"--features" => {
|
||||
if let Some(arg) = args.next() {
|
||||
self.features.push(arg);
|
||||
} else {
|
||||
return Err("Expected a value after `--features`, found nothing".to_string());
|
||||
}
|
||||
}
|
||||
"--target" => {
|
||||
if let Some(arg) = args.next() {
|
||||
self.target = arg;
|
||||
@@ -443,6 +451,7 @@ impl ConfigInfo {
|
||||
pub fn show_usage() {
|
||||
println!(
|
||||
"\
|
||||
--features [arg] : Add a new feature [arg]
|
||||
--target-triple [arg] : Set the target triple to [arg]
|
||||
--target [arg] : Set the target to [arg]
|
||||
--out-dir : Location where the files will be generated
|
||||
|
||||
Reference in New Issue
Block a user