File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -312,9 +312,9 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Arc<dyn TargetIs
312
312
313
313
let flags = settings:: Flags :: new ( flags_builder) ;
314
314
315
- let isa_builder = match sess. opts . cg . target_cpu . as_deref ( ) {
316
- Some ( "native" ) => cranelift_native:: builder_with_options ( true ) . unwrap ( ) ,
317
- Some ( value) => {
315
+ let isa_builder = match sess. opts . cg . target_cpu . as_deref ( ) . unwrap_or ( sess . target . cpu . as_ref ( ) ) {
316
+ "native" => cranelift_native:: builder_with_options ( true ) . unwrap ( ) ,
317
+ value => {
318
318
let mut builder =
319
319
cranelift_codegen:: isa:: lookup ( target_triple. clone ( ) ) . unwrap_or_else ( |err| {
320
320
sess. dcx ( ) . fatal ( format ! ( "can't compile for {}: {}" , target_triple, err) ) ;
@@ -325,18 +325,6 @@ fn build_isa(sess: &Session, backend_config: &BackendConfig) -> Arc<dyn TargetIs
325
325
}
326
326
builder
327
327
}
328
- None => {
329
- let mut builder =
330
- cranelift_codegen:: isa:: lookup ( target_triple. clone ( ) ) . unwrap_or_else ( |err| {
331
- sess. dcx ( ) . fatal ( format ! ( "can't compile for {}: {}" , target_triple, err) ) ;
332
- } ) ;
333
- if target_triple. architecture == target_lexicon:: Architecture :: X86_64 {
334
- // Don't use "haswell" as the default, as it implies `has_lzcnt`.
335
- // macOS CI is still at Ivy Bridge EP, so `lzcnt` is interpreted as `bsr`.
336
- builder. enable ( "nehalem" ) . unwrap ( ) ;
337
- }
338
- builder
339
- }
340
328
} ;
341
329
342
330
match isa_builder. finish ( flags) {
You can’t perform that action at this time.
0 commit comments