Conversation
The key change here is that the GHC/Stack build path now goes through Zig CC. Once Zig is the compiler driver in that path, we can explicitly choose which GNU libc version we target instead of inheriting whatever happens to be on the build host. On Linux, the Zig wrapper scripts accept ACTON_ZIG_GLIBC_VERSION and derive a -target of the form <host-arch>-linux-gnu.<major.minor> from zig env, so we do not hard-code CPU architecture while still pinning a glibc baseline. If an explicit target is already supplied, it takes precedence. macOS behavior is unchanged. The Makefile now defaults ACTON_ZIG_GLIBC_VERSION to 2.31 on Linux and exports it, and the dev guide documents the knob. In practice this gives us deliberate control over glibc compatibility for the compiler build products.
We now dynamically link glibc on Linux on x86_64 while keeping other libs static, just like we already do for aarch64.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b232e7d7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| rm -f dist/bin/actonc | ||
| cd compiler && sed 's,^version: BUILD_VERSION,version: "$(VERSION)",' < lib/package.yaml.in > lib/package.yaml | ||
| cd compiler && unset CC && unset CXX && unset CFLAGS && stack build acton lsp-server-acton --dry-run 2>&1 | grep "Nothing to build" || \ | ||
| cd compiler && $(STACK) build acton lsp-server-acton --dry-run 2>&1 | grep "Nothing to build" || \ |
There was a problem hiding this comment.
Add dist/zig dependency for compiler target
dist/bin/acton now invokes $(STACK) at this line, and $(STACK) is defined to use compiler/tools/zig-cc.sh/zig-cxx.sh, which abort when dist/zig/zig is not present. Because the target prerequisites still do not include $(DIST_ZIG), running make dist/bin/acton directly (or in a parallel flow that has not built Zig yet) can fail nondeterministically before the build starts; declaring the Zig artifact as an explicit prerequisite would make this target reliable.
Useful? React with 👍 / 👎.
No description provided.