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
Diff Detail
Event Timeline
So, the only thing that Im confused about is where does __BIONIC__ get defined?
include/__config | ||
---|---|---|
766 | Not your fault, but _WIN32 and __unix__? Im not sure if MinGW or cygwin define both. |
include/__config | ||
---|---|---|
340 | What happened to this include? I believe it's needed to get __GLIBC_PREREQ. |
It's in Bionic's <sys/cdefs.h>, which gets pulled in via <features.h>.
include/__config | ||
---|---|---|
340 | 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 | That is odd. I would assume that _WIN32 implies !__unix__. |
LGTM after addressing the MUSL libc comment.
include/__config | ||
---|---|---|
90 | Does MUSL libc have a features.h? This include was previously guarded by if !defined(_LIBCPP_HAS_MUSL_LIBC). |
include/__config | ||
---|---|---|
90 |
Does MUSL libc have a features.h? This include was previously guarded by if !defined(_LIBCPP_HAS_MUSL_LIBC).