diff options
| author | Alexey Samsonov <vonosmas@gmail.com> | 2025-09-17 21:52:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-17 21:52:30 -0700 |
| commit | b6e440b3a3f16245ec410e29ff4fcc079e8456ca (patch) | |
| tree | 0950380e73fb036e2f4dffb08d93e7bf3defef43 /utils | |
| parent | 8548fa00f1d57c39119a24cfda4ef84232ead7e0 (diff) | |
[libc][bazel] Add BUILD rules for fma and fmaf functions. (#159502)
This change adds the capability to build fma/fmaf with Bazel (fmal,
fmaf128 variants are not implemented yet), and run smoke tests.
BUILD rules for regular MPFR-based tests will be added later, since they
require support for building rand/srand as well, which is missing in
Bazel for now.
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/bazel/llvm-project-overlay/libc/BUILD.bazel | 14 | ||||
| -rw-r--r-- | utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel | 10 |
2 files changed, 22 insertions, 2 deletions
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel index c491eb11a460..6850b9c786a2 100644 --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -3834,7 +3834,19 @@ libc_math_function(name = "floorf128") libc_math_function(name = "floorf16") -# TODO: Add fma, fmaf, fmal, fmaf128 functions. +libc_math_function( + name = "fma", + additional_deps = [ + ":__support_fputil_fma", + ], +) + +libc_math_function( + name = "fmaf", + additional_deps = [ + ":__support_fputil_fma", + ], +) libc_math_function( name = "fmaf16", diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel index 2bffcdea5847..b213c0f53b69 100644 --- a/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel @@ -475,7 +475,15 @@ math_test( hdrs = ["FloorTest.h"], ) -# TODO: Add fma, fmaf, fmal, fmaf128 tests. +math_test( + name = "fma", + hdrs = ["FmaTest.h"], +) + +math_test( + name = "fmaf", + hdrs = ["FmaTest.h"], +) # TODO: Reenable this test once it passes at Google. # math_test( |
