Skip to content

[codex] Use baseline CPU for Linux release builds - #273

Merged
Jesssullivan merged 1 commit into
mainfrom
codex/linux-release-baseline-cpu
Apr 29, 2026
Merged

[codex] Use baseline CPU for Linux release builds#273
Jesssullivan merged 1 commit into
mainfrom
codex/linux-release-baseline-cpu

Conversation

@Jesssullivan

Copy link
Copy Markdown
Owner

Summary

Supersedes the -Dtarget=... release-build approach from PR #272 with -Dcpu=baseline.

Why

Release run 25082497926 showed that explicit -Dtarget=x86_64-linux-gnu makes the vendor library builds behave like cross-builds and stop finding distro system libraries via pkg-config/system paths:

  • unable to find dynamic system library 'secret-1'
  • unable to find dynamic system library 'gio-2.0'
  • unable to find dynamic system library 'gobject-2.0'
  • unable to find dynamic system library 'glib-2.0'

We still need to avoid native runner CPU features in release artifacts because the Fedora VM smoke test previously showed Illegal instruction for both cmux --version and cmux --help.

-Dcpu=baseline is the narrower fix: it keeps native OS/ABI and system library resolution, while preventing Zig from emitting instructions for the builder CPU.

Changes

  • Replace release workflow -Dtarget=${{ matrix.arch.zig }} with -Dcpu=baseline.
  • Remove the now-unneeded release matrix zig target fields.

The stricter distro VM smoke test and Rocky sed delimiter fix remain from #272.

Validation

  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release-linux.yml"); puts "release-linux.yml parses"'
  • nix-instantiate --parse nix/tests-distro.nix
  • git diff --check

Release run 25082497926 was cancelled after the -Dtarget vendor-link failure was confirmed.

@Jesssullivan
Jesssullivan marked this pull request as ready for review April 29, 2026 01:03
@Jesssullivan
Jesssullivan merged commit d8e6473 into main Apr 29, 2026
10 checks passed
@Jesssullivan
Jesssullivan deleted the codex/linux-release-baseline-cpu branch April 29, 2026 01:03
@greptile-apps

greptile-apps Bot commented Apr 29, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces Zig's -Dtarget=<triple> cross-compile flag with -Dcpu=baseline across all Linux release build jobs, fixing system library resolution failures (secret-1, gio-2.0, etc.) introduced by the previous explicit-target approach while still preventing the emission of builder-specific CPU instructions that caused Illegal instruction crashes on older distro VMs. The zig matrix field is cleanly removed since it is no longer referenced anywhere in the workflow.

Confidence Score: 5/5

Safe to merge — the change is mechanically correct, complete, and well-validated by the PR description.

The substitution of -Dtarget with -Dcpu=baseline is applied uniformly across all three job blocks and all six build steps. Since each runner's native architecture already matches its intended target (x86_64 on ubuntu-latest, aarch64 on ubuntu-24.04-arm), removing the explicit target triple causes no regression: Zig will auto-detect the correct native target while -Dcpu=baseline prevents builder-specific instruction emission. No dangling matrix.arch.zig references remain. No issues found.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release-linux.yml Replaces -Dtarget=${{ matrix.arch.zig }} with -Dcpu=baseline in all three build jobs (DEB, RPM, RPM terminal-first) and removes the now-unneeded zig field from each matrix; change is consistent and complete across all occurrences.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[GHA matrix: ubuntu-latest / ubuntu-24.04-arm] --> B[Build vendor libraries\nzig build -Dcpu=baseline -Doptimize=ReleaseFast]
    B --> C[Build libghostty\nzig build -Dcpu=baseline ...]
    C --> D[Build cmux-linux\nzig build -Dcpu=baseline ...]
    D --> E[Build cmuxd\nzig build -Dcpu=baseline ...]
    E --> F[Assemble DEB / RPM package]
    F --> G[Smoke test on distro VM]
Loading

Reviews (1): Last reviewed commit: "Use baseline CPU for Linux release build..." | Re-trigger Greptile

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