LATX, KZT: add per-library-family wrapper controls - #395
Merged
LaurenIsACoder merged 4 commits intoAug 13, 2026
Merged
Conversation
LaurenIsACoder
force-pushed
the
lauren/kzt-cairo-native
branch
from
August 13, 2026 07:58
8ee9faf to
a44bc13
Compare
Add one declarative registry for KZT group names, bit positions, stability, and dependencies, then annotate each existing wrapper with its group. This prepares the registry for dependency-aware controls without changing wrapper selection behavior. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Add Wine-style KZT group selection for command-line and application-specific configuration. Derive group names, default stability, and dependency closure from the central group registry so new families have one policy definition. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
The help handler and usage formatter were compiled only for LATX or TCG debug configurations, so product binaries rejected -h and --help. Make help available in all builds and tolerate argument-table entries without an environment-variable name. Both single- and double-dash option spellings remain supported. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Add --kzt-libs as a no-guest query for the library groups, stability status, dependencies, and accepted LATX_KZT_LIBS syntax compiled into the installed translator. Keep the README independent of a duplicated group inventory by directing users to the query command. The existing -h and --help output advertises both the selector and query. Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
LaurenIsACoder
force-pushed
the
lauren/kzt-cairo-native
branch
from
August 13, 2026 08:19
a44bc13 to
85c5f0e
Compare
LaurenIsACoder
marked this pull request as ready for review
August 13, 2026 08:26
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
kzt-group-list.hregistryLATX_KZT_LIBS, for stable, exact, and delta selectionsLATX_KZT_LOG=1diagnostics for the effective group set and per-library wrapper eligibilitylatx-x86_64 --kzt-libsso the installed binary reports its groups, stability status, dependencies, and accepted syntax-hand--helpin product builds so the selector and query are discoverableThe README points users to
--kzt-libsinstead of duplicating a library-group inventory that would become stale. This PR contains only product, configuration, and documentation changes; it does not add test or audit programs.Behavior
Normal use remains simple:
LATX_KZT=1Targeted rollback and debugging use the same selector:
Dependencies are resolved before wrapper loading. Disabling a dependency prunes dependent groups, preventing a host object from crossing into a guest-translated dependency. Unknown groups, mixed selector forms, and invalid
LATX_KZTorLATX_KZT_LOGvalues disable KZT for that process and report the reason instead of enabling an unintended wrapper set.Library-group eligibility only means that LAT may use the registered KZT wrapper. It does not imply that every function in that library reaches a host implementation; custom wrappers may deliberately re-enter guest execution.
Validation
Validated on LoongArch64 with the normal
tests=autoproduct configuration:latx-x86_64: passed-hand--help: exit 0 with identical outputLATX_KZT_LIBS,-latx-kzt-libs, and-kzt-libs--kzt-libs: exit 0 without a guest programstable,x11, and-x11: exit 0 with the expected dependency closureLATX_KZT=3, andLATX_KZT_LOG=2: KZT disabled with an explicit reason; guest execution continued successfullytrue: selected-x11and resolved tocore:0: gtkperf completed withLATX_KZT=0, the stable set,LATX_KZT_LIBS=-x11, andLATX_KZT_LIBS=x11libX11,libX11-xcb, andlibxcb-renderwrappers; the disabled run kept them on the guest pathRenderBadPicture, new X Error, SIGSEGV, SIGILL, or SIGABRT was observedFinal product binary SHA-256: