1
Fork 0

Cleanup after some refactoring in rustc_target

This commit is contained in:
Loïc BRANSTETT 2022-04-03 18:42:39 +02:00
parent c16a558f24
commit 1a1f5b89a4
25 changed files with 79 additions and 112 deletions

View file

@ -304,8 +304,12 @@ pub(crate) fn run_aot(
};
// FIXME handle `-Ctarget-cpu=native`
let target_cpu =
tcx.sess.opts.cg.target_cpu.as_ref().unwrap_or(&tcx.sess.target.cpu).to_owned();
let target_cpu = match tcx.sess.opts.cg.target_cpu {
Some(ref name) => name,
None => tcx.sess.target.cpu.as_ref(),
}
.to_owned();
Box::new((
CodegenResults {
modules,