llvm / llvm/llvm-project

[libc][bazel] Add targets for float functions/tests to bazel files

Open
#223,664 4 comments 0 reactions 1 assignee Claimed by @Popie52 View on GitHub
bazel good first issue libc
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Part of #221801

## 1. Public Headers & Support Libraries
Check `utils/bazel/llvm-project-overlay/libc/BUILD.bazel` for `float` functions.
The end result should be that every implemented `float` function has both its internal support library (`libc_support_library`) and public entrypoint target (`libc_math_function` / `libc_function`) in the Bazel file.

## 2. Tests
For every `float` function implemented so far:
* Check whether a regular MPFR-based test exists under `libc/test/src/math/`. If it exists, check whether it is added to `utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel`. If not, add it.
* Check whether a smoke test exists under `libc/test/src/math/smoke/`. If it exists, check whether it is added to `utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel`. If not, add it.

This should be done for all `float` math functions implemented so far.

## Additional Guidelines:
- Please split into 3 separate PRs (one for each file to be edited: `libc/BUILD.bazel`, `libc/test/src/math/BUILD.bazel`, and `libc/test/src/math/smoke/BUILD.bazel`).
- Please also cross-reference https://libc.llvm.org/headers/math/index.html to identify which functions have implementations/tests in CMake but are missing from Bazel.

Example case:
- `acospif`: Implemented in `libc/src/math/acospif.h` + has smoke test in `libc/test/src/math/smoke/acospif_test.cpp` + has no MPFR(consider only src/math one not exhaustive)
so only 2 additions, apart from MPFR ones which isn't added yet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.