This is an archive of the discontinued LLVM Phabricator instance.

Make libc++ headers "just work" on all Android versions.
AbandonedPublic

Authored by enh on Sep 18 2020, 3:05 PM.

Details

Reviewers
danalbert
ldionne
Group Reviewers
Restricted Project
Summary

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.

Diff Detail

Event Timeline

enh created this revision.Sep 18 2020, 3:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 18 2020, 3:05 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
enh requested review of this revision.Sep 18 2020, 3:05 PM
danalbert accepted this revision.Oct 26 2020, 2:26 PM
ldionne requested changes to this revision.Oct 26 2020, 2:33 PM
ldionne added a subscriber: ldionne.

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.

This revision now requires changes to proceed.Oct 26 2020, 2:33 PM

Actually, talk about timing! The Clang patch was just posted here: https://reviews.llvm.org/D90188

danalbert requested changes to this revision.Oct 26 2020, 3:14 PM

Actually, talk about timing! The Clang patch was just posted here: https://reviews.llvm.org/D90188

That's perfect, I hadn't seen that. I have no problem waiting for that.

enh abandoned this revision.Nov 30 2020, 4:57 PM

yeah, https://reviews.llvm.org/D90188 sounds better to me too.