Skip to content

build: move linking onto root modules - #373

Merged
forketyfork merged 3 commits into
mainfrom
prep/build-module-linking
Aug 31, 2026
Merged

build: move linking onto root modules#373
forketyfork merged 3 commits into
mainfrom
prep/build-module-linking

Conversation

@forketyfork

Copy link
Copy Markdown
Owner

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

  • Set link_libc = true on the exe_mod and mcp_mod root modules.
  • Move SDL3, SDL3_ttf, macOS framework, include-path, library-path, and SDK framework configuration onto exe_mod.
  • Read build environment values through b.graph.env_map.
  • Remove the redundant MCP test-step libc link.

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_names settings remain on the executable steps.

Test plan

  • zig build passes under the installed Zig 0.15.2 toolchain.
  • Unpiped zig build test passes.
  • just lint passes, including test-registry and Zwanzig checks.
  • The Step 2 grep gates report no Compile-level link/include calls and no std.posix.getenv calls in build.zig.
  • The prescribed nix develop commands could not run because Nix is unavailable in this Linux sandbox; equivalent direct commands were run.
  • macOS-only otool -L SDL/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.

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.
@forketyfork
forketyfork merged commit bb862a7 into main Aug 31, 2026
4 checks passed
@forketyfork
forketyfork deleted the prep/build-module-linking branch August 31, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant