build: move linking onto root modules - #373
Merged
Merged
Conversation
Zig 0.16 removes the link and include methods from std.Build.Step.Compile and keeps them only on std.Build.Module. Both spellings work in 0.15.2, so this lands ahead of the toolchain bump. Environment reads move to b.graph.env_map because std.posix.getenv is also removed in 0.16.
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.
Issue
Prepare Architect for Zig 0.16 by moving build linkage and include configuration off
std.Build.Step.Compile, where these APIs are removed.Solution
link_libc = trueon theexe_modandmcp_modroot modules.exe_mod.b.graph.env_map.Context
This is exactly Step 2 of the Zig 0.16 migration plan and remains compatible with the repository's Zig 0.15.2 toolchain. Compile-level
headerpad_max_install_namessettings remain on the executable steps.Test plan
zig buildpasses under the installed Zig 0.15.2 toolchain.zig build testpasses.just lintpasses, including test-registry and Zwanzig checks.std.posix.getenvcalls inbuild.zig.nix developcommands could not run because Nix is unavailable in this Linux sandbox; equivalent direct commands were run.otool -LSDL/framework checks were not run because this is Linux. The app launch was attempted but SDL could not initialize because the sandbox has no available video device; manual window verification still needs a macOS environment.