diff options
| author | Loïc BRANSTETT <lolo.branstett@numericable.fr> | 2022-04-03 18:42:39 +0200 |
|---|---|---|
| committer | Loïc BRANSTETT <lolo.branstett@numericable.fr> | 2022-04-03 21:29:57 +0200 |
| commit | 1a1f5b89a4acf44fc4720c097b4bbcebcfa26818 (patch) | |
| tree | 38936a74b195682852c20a6dca322bb4d762bfa2 /compiler/rustc_codegen_cranelift | |
| parent | c16a558f245cdf363ede29bed0d682434885f826 (diff) | |
| download | rust-1a1f5b89a4acf44fc4720c097b4bbcebcfa26818.tar.gz rust-1a1f5b89a4acf44fc4720c097b4bbcebcfa26818.zip | |
Cleanup after some refactoring in rustc_target
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/aot.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs index 2e047c7eea1..5e1e1c81d26 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs @@ -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, |
