[libcxx-commits] [PATCH] D135781: [libc++] Assume that builtins for math.h functions are available

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 28 11:43:52 PDT 2022


EricWF added a comment.

In D135781#3892488 <https://reviews.llvm.org/D135781#3892488>, @ldionne wrote:

> In D135781#3892483 <https://reviews.llvm.org/D135781#3892483>, @EricWF wrote:
>
>> Obviously, this would be less complex and nicer if we could assume their presence, but I have no doubt this more complicated code was written because we couldn't at some point.
>
> Our compiler requirements have changed a lot since 2012, and nowadays the compilers we support are tested in the CI. I assume @philnik's reasoning was that "I'll try doing it, and if the CI is happy, then it means that all supported compilers are happy". That's what we normally do and it has led to large simplifications (e.g. in how we implement `type_traits`). I agree it would make sense to record that rationale (or whatever the rationale is in case I'm wrong) in the commit message though.

It's my understanding that the availability of some of these builtins is a property of what math libraries happen to be on the system that compiled the compiler. As in, if the compiler doesn't have a math library which can perform the computation, it doesn't provide the builtin. Am I incorrect about that?

That would mean that the availability of the builtins is sometimes independent of compiler version.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135781/new/

https://reviews.llvm.org/D135781



More information about the libcxx-commits mailing list