@@ -102,7 +102,7 @@ use rustc_codegen_ssa::back::write::{
102102} ;
103103use rustc_codegen_ssa:: base:: codegen_crate;
104104use rustc_codegen_ssa:: traits:: { CodegenBackend , ExtraBackendMethods , WriteBackendMethods } ;
105- use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen } ;
105+ use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen , TargetConfig } ;
106106use rustc_data_structures:: fx:: FxIndexMap ;
107107use rustc_data_structures:: sync:: IntoDynSyncSend ;
108108use rustc_errors:: DiagCtxtHandle ;
@@ -260,8 +260,8 @@ impl CodegenBackend for GccCodegenBackend {
260260 . join ( sess)
261261 }
262262
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 )
265265 }
266266}
267267
@@ -485,10 +485,7 @@ fn to_gcc_opt_level(optlevel: Option<OptLevel>) -> OptimizationLevel {
485485}
486486
487487/// 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 {
492489 // TODO(antoyo): use global_gcc_features.
493490 let f = |allow_unstable| {
494491 sess. target
@@ -523,5 +520,14 @@ fn target_features_cfg(
523520
524521 let target_features = f ( false ) ;
525522 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+ }
527533}
0 commit comments