[libc-commits] [libc] [libc] Only declare float128 math functions in the generated math.h if float128 type is supported. (PR #81010)

via libc-commits libc-commits at lists.llvm.org
Wed Feb 7 16:36:05 PST 2024


lntue wrote:

> I don't understand why we need to have these guards at compile time and we can't check if the compiler supports float128 when we're generating the headers. Was there a patch I missed with discussion that explained that?

This came up during the discussion of https://github.com/llvm/llvm-project/pull/80682, namely, the distinction between compilers used to build our libc vs. the compilers of the users of the generated libc / headers.  Without the guards for these functions, if the compiler used to build the libc has `float128` support, it will force users of generated headers to use compilers supporting `float128` also.  Otherwise, it will error out whenever the generated `math.h` is included transitively.


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


More information about the libc-commits mailing list