[GR-77564] [BATCHED #24769] Separate builder and guest libc selection state#13998
Open
graalvmbot wants to merge 1 commit into
Open
[GR-77564] [BATCHED #24769] Separate builder and guest libc selection state#13998graalvmbot wants to merge 1 commit into
graalvmbot wants to merge 1 commit into
Conversation
Keep the existing LibCBase API unchanged for builder and host-analyzed callers. Introduce a shared LibCKind value, rematerialize it in the guest context, and expose guest-owned folded predicates where runtime code is already guest-owned. Migrate PosixPlatformThreads to that guest state. Truffle NFI remains on its existing builder-folded LibCBase query until that code is migrated separately.
graalvmbot
force-pushed
the
d-kozak/GR-77564/move-libc-identity-metadata-shared
branch
from
July 17, 2026 10:39
7c8ea83 to
f4895de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a preparatory PR for GR-72850.
Separate authoritative builder libc selection from guest-owned selection metadata so runtime-owned POSIX code can be analyzed in an isolated guest context without reading the builder singleton.
LibCBasehierarchy and allHostedLibCBasetoolchain policy builder-owned and unchanged.LibCKindvalue and rematerializes it as a guest-ownedSubstrateGuestLibCsingleton.@GuestFoldpredicates to specialize libc-dependent runtime code while the image is built; the guest singleton is not a runtime callback into the builder.Commit Structure
The PR contains one coherent commit covering the shared identity value, explicit builder-to-guest transfer, guest singleton installation, POSIX thread call-site migration, and the required module dependency.
Scope
This PR intentionally transfers only libc identity. All state currently exposed by the non-hosted
LibCBaseimplementations is determined by that identity, while compiler selection, linker options, cross-compilation policy, C-binding filtering, and other hosted behavior remain in the builder. It does not move the libc hierarchy or native bindings and does not migrate Truffle NFI. The temporarycom.oracle.svm.core.posixdependency on SVM_GUEST_STAGING is tracked by GR-73521 and can be removed whenPosixPlatformThreadsmoves to guest-owned code.