Skip to content

[GR-77564] [BATCHED #24769] Separate builder and guest libc selection state#13998

Open
graalvmbot wants to merge 1 commit into
masterfrom
d-kozak/GR-77564/move-libc-identity-metadata-shared
Open

[GR-77564] [BATCHED #24769] Separate builder and guest libc selection state#13998
graalvmbot wants to merge 1 commit into
masterfrom
d-kozak/GR-77564/move-libc-identity-metadata-shared

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

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.

  • Keeps the complete LibCBase hierarchy and all HostedLibCBase toolchain policy builder-owned and unchanged.
  • Transfers only the closed, immutable LibCKind value and rematerializes it as a guest-owned SubstrateGuestLibC singleton.
  • Uses no-argument @GuestFold predicates to specialize libc-dependent runtime code while the image is built; the guest singleton is not a runtime callback into the builder.
  • Migrates the POSIX native-thread guard-size decision, providing a complete independently reviewable builder/guest state boundary.

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 LibCBase implementations 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 temporary com.oracle.svm.core.posix dependency on SVM_GUEST_STAGING is tracked by GR-73521 and can be removed when PosixPlatformThreads moves to guest-owned code.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 17, 2026
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
graalvmbot force-pushed the d-kozak/GR-77564/move-libc-identity-metadata-shared branch from 7c8ea83 to f4895de Compare July 17, 2026 10:39
@graalvmbot graalvmbot changed the title [GR-77564] Separate builder and guest libc selection state [GR-77564] [BATCHED #24769] Separate builder and guest libc selection state Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants