Skip to content

Commit dca28e5

Browse files
committed
Only specify that we have reliable f16 and f128 on targets where those types are supported
1 parent 593d7ca commit dca28e5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,16 @@ fn target_config(sess: &Session, target_info: &LockedTargetInfo) -> TargetConfig
521521
let target_features = f(false);
522522
let unstable_target_features = f(true);
523523

524+
let has_reliable_f16 = target_info.supports_target_dependent_type(CType::Float16);
525+
let has_reliable_f128 = target_info.supports_target_dependent_type(CType::Float128);
526+
524527
TargetConfig {
525528
target_features,
526529
unstable_target_features,
527530
// 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,
531+
has_reliable_f16,
532+
has_reliable_f16_math: has_reliable_f16,
533+
has_reliable_f128,
534+
has_reliable_f128_math: has_reliable_f128,
532535
}
533536
}

0 commit comments

Comments
 (0)