[libc-commits] [libc] [libc] Check if arm targets support FPSCR in FEnvImpl.h. (PR #72158)

via libc-commits libc-commits at lists.llvm.org
Mon Nov 13 13:59:47 PST 2023


================
@@ -28,7 +28,7 @@
 // the apple condition here should be removed.
 #elif defined(LIBC_TARGET_ARCH_IS_X86) && !defined(__APPLE__)
 #include "x86_64/FEnvImpl.h"
-#elif defined(LIBC_TARGET_ARCH_IS_ARM)
+#elif defined(LIBC_TARGET_ARCH_IS_ARM) && __has_builtin(__builtin_arm_get_fpscr)
----------------
michaelrj-google wrote:

iirc `__has_builtin` is a clang specific extension, should we also check what compiler we're using?

https://github.com/llvm/llvm-project/pull/72158


More information about the libc-commits mailing list