[libc-commits] [libc] [libc] Exclude Fuchsia from float128 detection (PR #73985)
via libc-commits
libc-commits at lists.llvm.org
Thu Nov 30 12:47:01 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Caslyn Tonelli (Caslyn)
<details>
<summary>Changes</summary>
Following from https://github.com/llvm/llvm-project/pull/73372:
Fuchsia targets currently don't support `float128`. Add detection for `LIBC_TARGET_OS_IS_FUCHSIA`, and exclude this OS from setting `LIBC_COMPILER_HAS_FLOAT128_EXTENSION`.
---
Full diff: https://github.com/llvm/llvm-project/pull/73985.diff
2 Files Affected:
- (modified) libc/src/__support/macros/properties/float.h (+2-1)
- (modified) libc/src/__support/macros/properties/os.h (+4)
``````````diff
diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index 7e00ddc8f0cd327..69d3ec400c37c53 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -62,7 +62,8 @@ using float16 = _Float16;
#define LIBC_COMPILER_HAS_C23_FLOAT128
#endif
#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 500)) && \
- (defined(LIBC_TARGET_ARCH_IS_X86_64))
+ (defined(LIBC_TARGET_ARCH_IS_X86_64) && \
+ !defined(LIBC_TARGET_OS_IS_FUCHSIA))
#define LIBC_COMPILER_HAS_FLOAT128_EXTENSION
#endif
diff --git a/libc/src/__support/macros/properties/os.h b/libc/src/__support/macros/properties/os.h
index 92e68b3e6612a82..ff0b29fd50c1751 100644
--- a/libc/src/__support/macros/properties/os.h
+++ b/libc/src/__support/macros/properties/os.h
@@ -37,4 +37,8 @@
#endif
#endif
+#if (defined(__Fuchsia__))
+#define LIBC_TARGET_OS_IS_FUCHSIA
+#endif
+
#endif // LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_OS_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/73985
More information about the libc-commits
mailing list