Many of the functions exposed by the <c*> headers weren't in Android
from the beginning. Worse, they weren't all added at the same time. This
patch adds the missing #if guards so that the libc++ headers work fine
against any Android OS version.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I really want to avoid going down the road of adding more of these #ifs to our headers for importing stuff from the C library headers. It's a pain to maintain and it is very prone to creating conflicts with downstream patches. I've personally been keeping these #ifs downstream only to avoid creating too much burden on the upstream, until we have a better solution. We have been working on an implementation of the feature that was discussed here: http://lists.llvm.org/pipermail/cfe-dev/2020-June/066038.html, which would remove the need for these #ifs in the <cXXXX> headers.
I would rather wait until we have that Clang feature before we move forward.
Actually, talk about timing! The Clang patch was just posted here: https://reviews.llvm.org/D90188
clang-tidy: error: no member named 'acosf' in the global namespace; did you mean 'acos'? [clang-diagnostic-error]
not useful