@@ -102,7 +102,7 @@ use rustc_codegen_ssa::back::write::{
102
102
} ;
103
103
use rustc_codegen_ssa:: base:: codegen_crate;
104
104
use rustc_codegen_ssa:: traits:: { CodegenBackend , ExtraBackendMethods , WriteBackendMethods } ;
105
- use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen } ;
105
+ use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen , TargetConfig } ;
106
106
use rustc_data_structures:: fx:: FxIndexMap ;
107
107
use rustc_data_structures:: sync:: IntoDynSyncSend ;
108
108
use rustc_errors:: DiagCtxtHandle ;
@@ -260,8 +260,8 @@ impl CodegenBackend for GccCodegenBackend {
260
260
. join ( sess)
261
261
}
262
262
263
- fn target_features_cfg ( & self , sess : & Session ) -> ( Vec < Symbol > , Vec < Symbol > ) {
264
- target_features_cfg ( sess, & self . target_info )
263
+ fn target_config ( & self , sess : & Session ) -> TargetConfig {
264
+ target_config ( sess, & self . target_info )
265
265
}
266
266
}
267
267
@@ -485,10 +485,7 @@ fn to_gcc_opt_level(optlevel: Option<OptLevel>) -> OptimizationLevel {
485
485
}
486
486
487
487
/// Returns the features that should be set in `cfg(target_feature)`.
488
- fn target_features_cfg (
489
- sess : & Session ,
490
- target_info : & LockedTargetInfo ,
491
- ) -> ( Vec < Symbol > , Vec < Symbol > ) {
488
+ fn target_config ( sess : & Session , target_info : & LockedTargetInfo ) -> TargetConfig {
492
489
// TODO(antoyo): use global_gcc_features.
493
490
let f = |allow_unstable| {
494
491
sess. target
@@ -523,5 +520,14 @@ fn target_features_cfg(
523
520
524
521
let target_features = f ( false ) ;
525
522
let unstable_target_features = f ( true ) ;
526
- ( target_features, unstable_target_features)
523
+
524
+ TargetConfig {
525
+ target_features,
526
+ unstable_target_features,
527
+ // There are no known bugs with GCC support for f16 or f128
528
+ has_reliable_f16 : true ,
529
+ has_reliable_f16_math : true ,
530
+ has_reliable_f128 : true ,
531
+ has_reliable_f128_math : true ,
532
+ }
527
533
}
0 commit comments