[libc-commits] [libc] [libc] Proof of concept of aliasing long double math functions. (PR #132627)

via libc-commits libc-commits at lists.llvm.org
Mon Mar 24 11:07:41 PDT 2025


================
@@ -88,9 +108,9 @@ add_math_entrypoint_object(ceilf128)
 
 add_math_entrypoint_object(copysign)
 add_math_entrypoint_object(copysignf)
-add_math_entrypoint_object(copysignl)
 add_math_entrypoint_object(copysignf16)
 add_math_entrypoint_object(copysignf128)
+add_long_double_math_entrypoint_object(copysign)
----------------
lntue wrote:

So to answer to your question about the cmake changes: we could leave the cmake inplace, and make `copysignl.cpp` generate nothing when` copysignl` function is aliased to `copysign` or `copysignf128`, but then we will need to change the testing dependency for `copysignl_test`, because `copysignl` symbol is not defined in `libc.src.math.copysignl -> libc.src.math.generic.copysignl` anymore, due to `copysignl` symbol now has to be in the same translation unit with `copysign` or `copysignf128`.  So it is actually easier to let `libc.src.copysignl` point to `libc.src.math.generic.copysign` or `libc.src.math.generic.copysignf128` instead.

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


More information about the libc-commits mailing list