Skip to content

Commit 69046fa

Browse files
committed
Cleanup after some refactoring in rustc_target
1 parent 7665d87 commit 69046fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/driver/aot.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,12 @@ pub(crate) fn run_aot(
304304
};
305305

306306
// FIXME handle `-Ctarget-cpu=native`
307-
let target_cpu =
308-
tcx.sess.opts.cg.target_cpu.as_ref().unwrap_or(&tcx.sess.target.cpu).to_owned();
307+
let target_cpu = match tcx.sess.opts.cg.target_cpu {
308+
Some(ref name) => name,
309+
None => tcx.sess.target.cpu.as_ref(),
310+
}
311+
.to_owned();
312+
309313
Box::new((
310314
CodegenResults {
311315
modules,

0 commit comments

Comments
 (0)