[compiler-rt] [compiler-rt] allow removing libc dependency on Android (PR #152394)

Axel Karjalainen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 11:11:16 PDT 2025


axelkar wrote:

> i worry a bit about the proximity of "allow removing" and "make it easy for the actual Android llvm build to fuck up and accidentally ship with all the __isOSVersionAtLeast() stuff broken".
>
> i guess i don't really understand the upside to this, and the downside for the actual shipping configuration worries me.
>
> if this is useful, should it be a separate _opt-in_ option?

This is important feedback and why PRs get reviewed. :)

We could put `os_version_check.c` behind just a non-baremetal conditional. Currently it's disabled if Fuchia is targeted, the baremetal build flag is on, or the GPU build flag is on.

The upside is that we have an initial compiler-rt without a dependency to libc, which is useful for building Bionic libc.

The includes could also be put behind the baremetal build flag instead of checking for headers. Why do the non-Android Linux includes test for `<sys/auxv.h>`?

https://github.com/llvm/llvm-project/pull/152394


More information about the llvm-commits mailing list