Send -march to gcc

This commit is contained in:
Antoni Boucher
2023-09-14 20:42:14 -04:00
parent 87daba2cad
commit a9a2c687ff
3 changed files with 22 additions and 18 deletions

View File

@@ -198,3 +198,18 @@ pub fn check_tied_features(sess: &Session, features: &FxHashMap<&str, bool>) ->
}
None
}
fn handle_native(name: &str) -> &str {
if name != "native" {
return name;
}
unimplemented!();
}
pub fn target_cpu(sess: &Session) -> &str {
match sess.opts.cg.target_cpu {
Some(ref name) => handle_native(name),
None => handle_native(sess.target.cpu.as_ref()),
}
}