From dca28e588cb9c49bf275c073e28663bfc8393b5f Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Wed, 21 May 2025 21:04:07 -0400 Subject: [PATCH] Only specify that we have reliable f16 and f128 on targets where those types are supported --- src/lib.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6994c385fc83..66e9ce4627c8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -521,13 +521,16 @@ fn target_config(sess: &Session, target_info: &LockedTargetInfo) -> TargetConfig let target_features = f(false); let unstable_target_features = f(true); + let has_reliable_f16 = target_info.supports_target_dependent_type(CType::Float16); + let has_reliable_f128 = target_info.supports_target_dependent_type(CType::Float128); + TargetConfig { target_features, unstable_target_features, // There are no known bugs with GCC support for f16 or f128 - has_reliable_f16: true, - has_reliable_f16_math: true, - has_reliable_f128: true, - has_reliable_f128_math: true, + has_reliable_f16, + has_reliable_f16_math: has_reliable_f16, + has_reliable_f128, + has_reliable_f128_math: has_reliable_f128, } }