[libc-commits] [libc] [libc] Add baremetal minor archive support. (PR #203015)

Simi Pallipurath via libc-commits libc-commits at lists.llvm.org
Wed Jul 29 07:07:48 PDT 2026


simpal01 wrote:

Hi @michaelrj-google @vhscampos 
This PR https://github.com/llvm/llvm-project/pull/212774/   implements an alternative approach to https://github.com/llvm/llvm-project/pull/203015, as suggested here. 

The ealier PR https://github.com/llvm/llvm-project/pull/203015 performs the subarchiving step at install time, after the full libc entrypoint set has already been built. Because it sees the complete set of entrypoints, it can partition the archive with complete visibility. Hermetic testing also should just run without any  problem for the minor archive.

But in this alternate implementation, the downstream project controls the overlay contents through LIBC_CONFIG_PATH. The downstream config provides the relevant target entrypoint lists for the minor variant, so LLVM libc only builds the entrypoints selected for that overlay archive. This is another reason the implementation does not have whole-libc visibility: the visible entrypoint universe is intentionally constrained by the downstream configuration, and anything outside that set may be supplied by the base libc layer.  Because the build intentionally does not see or build the whole libc, it has to treat some missing symbols, startup objects, and support entrypoints as belonging to the base libc layer. That is why the patch needs explicit base-layer handling instead of relying only on LLVM libc’s own entrypoint graph.

Please have a look and let me know your comments.

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


More information about the libc-commits mailing list