None of these checks are specific to Android devices. If libc++ was
used with Bionic on a normal Linux system these checks would still be
needed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
So, the only thing that Im confused about is where does __BIONIC__ get defined?
include/__config | ||
---|---|---|
766 ↗ | (On Diff #71714) | Not your fault, but _WIN32 and __unix__? Im not sure if MinGW or cygwin define both. |
include/__config | ||
---|---|---|
340 ↗ | (On Diff #71714) | What happened to this include? I believe it's needed to get __GLIBC_PREREQ. |
Comment Actions
It's in Bionic's <sys/cdefs.h>, which gets pulled in via <features.h>.
include/__config | ||
---|---|---|
340 ↗ | (On Diff #71714) | Included much earlier now (L90). We always needed this for Linux, and having it at the top of the file means we won't accidentally forget to include it for an earlier check. |
766 ↗ | (On Diff #71714) | That is odd. I would assume that _WIN32 implies !__unix__. |
Comment Actions
LGTM after addressing the MUSL libc comment.
include/__config | ||
---|---|---|
90 ↗ | (On Diff #71714) | Does MUSL libc have a features.h? This include was previously guarded by if !defined(_LIBCPP_HAS_MUSL_LIBC). |
include/__config | ||
---|---|---|
90 ↗ | (On Diff #71714) |