fix: an optimized test build links on macOS - #390
Merged
Merged
Conversation
The toolkit compiles its macOS host into every binary built from the app module, including the test binary and the model-contract tool. The host calls two functions the toolkit exports from Zig, native_sdk_update_verify_feed and native_sdk_update_verify_archive, but only its macOS platform module references them, and only the app's run path reaches that module. A Debug link dropped the unused host object; a ReleaseFast one kept it and failed with both symbols undefined. main.zig now references them on macOS, so they are exported wherever the module is built. CI's macOS job now runs the suite in ReleaseFast as well, the mode the app ships in, which is the check that would have caught this.
This was referenced Sep 25, 2026
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.
Closes #389
main.zigreferencesnative_sdk.updater.c_api.native_sdk_update_verify_feedand..._archivein a macOS-onlycomptimeblock, so they are exported in every binary built from the app module. In the app they were already exported through the platform module; the reference is the same symbol, not a second one.appjob runszig build test -Doptimize=ReleaseFastafternative test.Verified on macOS: on main,
zig build test -Doptimize=ReleaseFastfails to link (the test binary andplaza-model-contract); with this change it passes, Debug still passes, and the ReleaseFast app still builds with both symbols exported once.The cause is in the toolkit's build wiring rather than here; this makes Plaza's own builds whole in the meantime.