removed sources_cmd (it may make a return)
This commit is contained in:
parent
a5ccce1fb5
commit
c044c3deb0
1 changed files with 2 additions and 14 deletions
|
@ -10,7 +10,6 @@ pub struct TargetConfig {
|
||||||
pub linker_flags: Vec<String>,
|
pub linker_flags: Vec<String>,
|
||||||
pub linker_libs: Vec<String>,
|
pub linker_libs: Vec<String>,
|
||||||
pub sources: Vec<String>,
|
pub sources: Vec<String>,
|
||||||
pub sources_cmd: String,
|
|
||||||
pub is_default: bool,
|
pub is_default: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +24,6 @@ impl TargetConfig {
|
||||||
linker_flags: Vec::new(),
|
linker_flags: Vec::new(),
|
||||||
linker_libs: Vec::new(),
|
linker_libs: Vec::new(),
|
||||||
sources: Vec::new(),
|
sources: Vec::new(),
|
||||||
sources_cmd: String::from(""),
|
|
||||||
is_default: false,
|
is_default: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,13 +116,6 @@ impl TargetConfig {
|
||||||
panic!("fatal: {k} invalid type, must be a array of strings.");
|
panic!("fatal: {k} invalid type, must be a array of strings.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"sources_cmd" => {
|
|
||||||
if let Value::String(s) = table.get(k).unwrap() {
|
|
||||||
ret.sources_cmd = s.to_owned();
|
|
||||||
} else {
|
|
||||||
panic!("fatal: {k} invalid type, must be a string.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"default" => {
|
"default" => {
|
||||||
if let Value::Boolean(b) = table.get(k).unwrap() {
|
if let Value::Boolean(b) = table.get(k).unwrap() {
|
||||||
ret.is_default = *b;
|
ret.is_default = *b;
|
||||||
|
@ -145,11 +136,8 @@ impl TargetConfig {
|
||||||
ret.linker = ret.compiler.clone();
|
ret.linker = ret.compiler.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret.sources == Vec::<String>::new()) && (ret.sources_cmd == String::from("")) {
|
if ret.sources == Vec::<String>::new() {
|
||||||
panic!("fatal: must specify EITHER sources OR sources_cmd, not both.");
|
panic!("fatal: you MUST specify at least one source");
|
||||||
}
|
|
||||||
if !(ret.sources == Vec::<String>::new()) && !(ret.sources_cmd == String::from("")) {
|
|
||||||
panic!("fatal: must specify EITHER sources OR sources_cmd");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
Loading…
Reference in a new issue