Skip to content

Commit 2e38bee

Browse files
committed
[libc][bazel] Port bb7cea0
1 parent 63f19f1 commit 2e38bee

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ libc_support_library(
492492
name = "__support_macros_properties_types",
493493
hdrs = ["src/__support/macros/properties/types.h"],
494494
deps = [
495+
":__support_macros_config",
495496
":__support_macros_properties_architectures",
496497
":__support_macros_properties_compiler",
497498
":__support_macros_properties_cpu_features",
@@ -1077,6 +1078,24 @@ libc_support_library(
10771078
],
10781079
)
10791080

1081+
libc_support_library(
1082+
name = "__support_fputil_bfloat16",
1083+
hdrs = ["src/__support/FPUtil/bfloat16.h"],
1084+
deps = [
1085+
":__support_cpp_bit",
1086+
":__support_cpp_type_traits",
1087+
":__support_fputil_cast",
1088+
":__support_fputil_dyadic_float",
1089+
":__support_macros_config",
1090+
":__support_macros_properties_types",
1091+
],
1092+
)
1093+
1094+
alias(
1095+
name = "bfloat16", # Alias for test/src/math:bfloat16_test.
1096+
actual = ":__support_fputil_bfloat16",
1097+
)
1098+
10801099
libc_support_library(
10811100
name = "__support_fputil_cast",
10821101
hdrs = ["src/__support/FPUtil/cast.h"],

utils/bazel/llvm-project-overlay/libc/test/src/__support/FPUtil/BUILD.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ libc_test(
2323
],
2424
)
2525

26+
libc_test(
27+
name = "bfloat16_test",
28+
srcs = ["bfloat16_test.cpp"],
29+
deps = [
30+
"//libc:__support_fputil_bfloat16",
31+
"//libc/test/UnitTest:fp_test_helpers",
32+
"//libc/utils/MPFRWrapper:mp_common",
33+
"//libc/utils/MPFRWrapper:mpfr_wrapper",
34+
],
35+
)
36+
2637
libc_test(
2738
name = "dyadic_float_test",
2839
srcs = ["dyadic_float_test.cpp"],

utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ libc_test_library(
4242
"//libc:__support_cpp_string",
4343
"//libc:__support_cpp_string_view",
4444
"//libc:__support_cpp_type_traits",
45+
"//libc:__support_fputil_bfloat16",
4546
"//libc:__support_fputil_cast",
4647
"//libc:__support_fputil_fp_bits",
4748
"//libc:__support_macros_config",

0 commit comments

Comments
 (0)