[libc-commits] [libc] 3693f44 - [libc] Exclude Fuchsia from float128 detection (#73985)
via libc-commits
libc-commits at lists.llvm.org
Fri Dec 1 10:30:25 PST 2023
Author: Caslyn Tonelli
Date: 2023-12-01T10:30:18-08:00
New Revision: 3693f44fffc0622760979dd5e2143797662913fe
URL: https://github.com/llvm/llvm-project/commit/3693f44fffc0622760979dd5e2143797662913fe
DIFF: https://github.com/llvm/llvm-project/commit/3693f44fffc0622760979dd5e2143797662913fe.diff
LOG: [libc] Exclude Fuchsia from float128 detection (#73985)
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`.
Added:
Modified:
libc/src/__support/macros/properties/float.h
libc/src/__support/macros/properties/os.h
Removed:
################################################################################
diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index bae51cbe8aee8e2..756579024cad8b6 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -60,7 +60,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..1c8fd5721ce679c 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
More information about the libc-commits
mailing list