Android only provides this function on API 28+; fix libc++ builds when
targeting older API levels.
Details
Details
- Reviewers
arichardson danalbert rprichard philnik - Group Reviewers
Restricted Project - Commits
- rG49c8f903efea: [libc++] Fix aligned_alloc usage for Android
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm not involved with that effort directly (I work on Meta's Android compiler team, whereas @rprichard is on the Android NDK team at Google), but I understand wanting a buildbot to test this configuration. I can't speak on his behalf, but I trust that Ryan will work on that actively once holiday season is wrapped up.
Comment Actions
Yeah I'll be resuming work on that soon.
The D139147 configuration currently only tests a configuration where libc++ is built against API21 and run on an API33 emulator. I think(?) that would be sufficient to catch this issue because the API21 headers and libc.so stub wouldn't have an aligned_alloc function? The emulator image would have one in its /system/lib64/libc.so though.
This change looks OK to me.