diff --git a/third_party/libcxx/BUILD.mk b/third_party/libcxx/BUILD.mk index 953c37f8d..e33b96ee2 100644 --- a/third_party/libcxx/BUILD.mk +++ b/third_party/libcxx/BUILD.mk @@ -1040,6 +1040,7 @@ third_party/libcxx/ryu/d2s_intrinsics.h \ third_party/libcxx/ryu/digit_table.h \ third_party/libcxx/ryu/f2s.h \ third_party/libcxx/ryu/ryu.h \ +third_party/libcxx/stdfloat \ THIRD_PARTY_LIBCXX_A_SRCS = \ third_party/libcxx/algorithm.cpp \ diff --git a/third_party/libcxx/stdfloat b/third_party/libcxx/stdfloat new file mode 100644 index 000000000..4126b4a8c --- /dev/null +++ b/third_party/libcxx/stdfloat @@ -0,0 +1,25 @@ +// -*- C++ -*- + +export namespace std { + +#if defined(__STDCPP_FLOAT16_T__) + using float16_t = _Float16; +#endif + +#if defined(__STDCPP_FLOAT32_T__) + using float32_t = float; +#endif + +#if defined(__STDCPP_FLOAT64_T__) + using float64_t = double; +#endif + +#if defined(__STDCPP_FLOAT128_T__) + using float128_t = long double; +#endif + +#if defined(__STDCPP_BFLOAT16_T__) + using bfloat16_t = __bf16; +#endif + +} // namespace std