[libc-commits] [libc] [libc] Add missing shared_math docs in `add_math_function.md` (PR #188026)
via libc-commits
libc-commits at lists.llvm.org
Mon Mar 23 05:18:19 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Zorojuro (Sukumarsawant)
<details>
<summary>Changes</summary>
This PR intends to add/update the following things:
- Add missing doc for CMake for shared_math
- Add missing testing command for shared_math_test
- Nits (e.g., grammar, spaces, missing colons, etc.)
---
Full diff: https://github.com/llvm/llvm-project/pull/188026.diff
1 Files Affected:
- (modified) libc/src/math/docs/add_math_function.md (+18-8)
``````````diff
diff --git a/libc/src/math/docs/add_math_function.md b/libc/src/math/docs/add_math_function.md
index ae45d595bbdd6..08a2a424b321a 100644
--- a/libc/src/math/docs/add_math_function.md
+++ b/libc/src/math/docs/add_math_function.md
@@ -11,10 +11,10 @@ detail below.
To register the function's entry points for supported OSes and architectures,
together with its specifications:
-- Add entry points `libc.src.math.func` to the following files:
+- Add entry points `libc.src.math.<func>` to the following files:
```
- libc/config/linux/<arch>/entrypoints.txt
- libc/config/windows/entrypoints.txt
+ libc/config/linux/<arch>/entrypoints.txt
+ libc/config/windows/entrypoints.txt
```
- Add function specs to the file:
```
@@ -67,13 +67,17 @@ If the function should be available to internal LLVM projects:
```
libc/shared/math/<func>.h
```
-- add a simple test case to
+- Add a simple test case to
```
- libc/test/shared/shared_math_test.cpp
+ libc/test/shared/shared_math_test.cpp
```
-- add the corresponding `libc_support_library` and `libc_math_function` to:
+- Add the corresponding entry `libc.src.__support.math.<func>` to:
```
-utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+ libc/test/shared/CMakeLists.txt
+```
+- Add the corresponding `libc_support_library` and `libc_math_function` to:
+```
+ utils/bazel/llvm-project-overlay/libc/BUILD.bazel
```
### Floating point utility
@@ -210,7 +214,13 @@ implementation (which is very often glibc).
- Build and Run a specific unit test:
```
$ ninja libc.test.src.math.<func>_test.__unit__
- $ projects/libc/test/src/math/libc.test.src.math.<func>_test
+ $ projects/libc/test/src/math/libc.test.src.math.<func>_test.__unit__
+```
+
+- Build and Run shared math test:
+```
+ $ ninja libc.test.shared.shared_math_test.__unit__
+ $ projects/libc/test/shared/libc.test.shared.shared_math_test.__unit__
```
- Build and Run exhaustive test (might take hours to run):
``````````
</details>
https://github.com/llvm/llvm-project/pull/188026
More information about the libc-commits
mailing list