[libc][bazel] Port bb7cea0

This commit is contained in:
Christian Sigg
2025-07-10 10:34:34 +02:00
parent 63f19f1c5c
commit 2e38beebcf
3 changed files with 31 additions and 0 deletions

View File

@@ -492,6 +492,7 @@ libc_support_library(
name = "__support_macros_properties_types",
hdrs = ["src/__support/macros/properties/types.h"],
deps = [
":__support_macros_config",
":__support_macros_properties_architectures",
":__support_macros_properties_compiler",
":__support_macros_properties_cpu_features",
@@ -1077,6 +1078,24 @@ libc_support_library(
],
)
libc_support_library(
name = "__support_fputil_bfloat16",
hdrs = ["src/__support/FPUtil/bfloat16.h"],
deps = [
":__support_cpp_bit",
":__support_cpp_type_traits",
":__support_fputil_cast",
":__support_fputil_dyadic_float",
":__support_macros_config",
":__support_macros_properties_types",
],
)
alias(
name = "bfloat16", # Alias for test/src/math:bfloat16_test.
actual = ":__support_fputil_bfloat16",
)
libc_support_library(
name = "__support_fputil_cast",
hdrs = ["src/__support/FPUtil/cast.h"],

View File

@@ -23,6 +23,17 @@ libc_test(
],
)
libc_test(
name = "bfloat16_test",
srcs = ["bfloat16_test.cpp"],
deps = [
"//libc:__support_fputil_bfloat16",
"//libc/test/UnitTest:fp_test_helpers",
"//libc/utils/MPFRWrapper:mp_common",
"//libc/utils/MPFRWrapper:mpfr_wrapper",
],
)
libc_test(
name = "dyadic_float_test",
srcs = ["dyadic_float_test.cpp"],

View File

@@ -42,6 +42,7 @@ libc_test_library(
"//libc:__support_cpp_string",
"//libc:__support_cpp_string_view",
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_bfloat16",
"//libc:__support_fputil_cast",
"//libc:__support_fputil_fp_bits",
"//libc:__support_macros_config",