@@ -634,6 +634,7 @@ pub struct Target {
634634    pub  runner :  Option < String > , 
635635    pub  no_std :  bool , 
636636    pub  codegen_backends :  Option < Vec < String > > , 
637+     pub  optimized_compiler_builtins :  Option < bool > , 
637638} 
638639
639640impl  Target  { 
@@ -1219,6 +1220,7 @@ define_config! {
12191220        no_std:  Option <bool > = "no-std" , 
12201221        codegen_backends:  Option <Vec <String >> = "codegen-backends" , 
12211222        runner:  Option <String > = "runner" , 
1223+         optimized_compiler_builtins:  Option <bool > = "optimized-compiler-builtins" , 
12221224    } 
12231225} 
12241226
@@ -2096,6 +2098,7 @@ impl Config {
20962098                target. sanitizers  = cfg. sanitizers ; 
20972099                target. profiler  = cfg. profiler ; 
20982100                target. rpath  = cfg. rpath ; 
2101+                 target. optimized_compiler_builtins  = cfg. optimized_compiler_builtins ; 
20992102
21002103                if  let  Some ( ref  backends)  = cfg. codegen_backends  { 
21012104                    let  available_backends = [ "llvm" ,  "cranelift" ,  "gcc" ] ; 
@@ -2609,6 +2612,13 @@ impl Config {
26092612        self . target_config . get ( & target) . and_then ( |t| t. rpath ) . unwrap_or ( self . rust_rpath ) 
26102613    } 
26112614
2615+     pub  fn  optimized_compiler_builtins ( & self ,  target :  TargetSelection )  -> bool  { 
2616+         self . target_config 
2617+             . get ( & target) 
2618+             . and_then ( |t| t. optimized_compiler_builtins ) 
2619+             . unwrap_or ( self . optimized_compiler_builtins ) 
2620+     } 
2621+ 
26122622    pub  fn  llvm_enabled ( & self ,  target :  TargetSelection )  -> bool  { 
26132623        self . codegen_backends ( target) . contains ( & "llvm" . to_owned ( ) ) 
26142624    } 
@@ -3162,6 +3172,9 @@ fn check_incompatible_options_for_ci_rustc(
31623172
31633173            let  profiler = & ci_cfg. profiler ; 
31643174            err ! ( current_cfg. profiler,  profiler,  "build" ) ; 
3175+ 
3176+             let  optimized_compiler_builtins = & ci_cfg. optimized_compiler_builtins ; 
3177+             err ! ( current_cfg. optimized_compiler_builtins,  optimized_compiler_builtins,  "build" ) ; 
31653178        } 
31663179    } 
31673180
0 commit comments