[libc-commits] [libc] [llvm] [libc][math] Refactor tanhf16 implementation to header-only in src/__support/math folder. (PR #178645)

Xinlong Chen via libc-commits libc-commits at lists.llvm.org
Fri Feb 13 06:49:51 PST 2026


================
@@ -3798,6 +3798,14 @@ libc_support_library(
     ],
 )
 
+libc_support_library(
+    name = "__support_math_tanhf16",
+    hdrs = ["src/__support/math/tanhf16.h"],
+    deps = [
----------------
Xinlong-Chen wrote:

ok, headers in `libc/src/__support/math/tanhf16.h` have maintained alphabetical order now; `libc/src/__support/math/CMakeLists.txt` mimic header's order;

BTY, some target in `libc/src/__support/math/CMakeLists.txt` is different from `libc/src/__support/math/tanhf16.h`

example:

headers: 
```
#include "src/__support/FPUtil/FEnvImpl.h"
```

cmake:
```
libc.src.__support.FPUtil.polyeval
```

so their alphabetical order is different; I keep cmake's dep order same as headers.

deps in bazel have re-order by alphabetical order .


https://github.com/llvm/llvm-project/pull/178645


More information about the libc-commits mailing list