Skip to content

Remove sqlx-macros strip workaround after macOS toolchain fix #43

@shiny-code-bot

Description

@shiny-code-bot

Current Status

Codex Lab carries a narrow Cargo profile workaround for macOS 27 / Xcode 27 builds:

[profile.release.package.sqlx-macros]
strip = "none"

The workaround keeps the build-time sqlx-macros proc-macro dylib unstripped because Rust must dlopen it during cargo build --release. On macOS 27 / Xcode 27, the stripped dylib can be rejected by dyld with:

mis-aligned LINKEDIT string pool

The final distributed Codex Lab binary still inherits the workspace release stripping; this workaround is only for the proc-macro dylib used during the build.

Removal Criteria

Remove the workaround when a real upstream/toolchain fix lands and all of the following hold on macOS 27 or newer:

  • A clean release build succeeds after deleting the [profile.release.package.sqlx-macros] override:
    cargo build --release -p codex-cli --bin codex
  • sqlx-macros can be loaded by rustc without the mis-aligned LINKEDIT string pool failure.
  • The Codex Lab macOS ARM64 app build workflow passes without the override.

Validation Notes

The workaround was proven with a minimal sqlx repro: release strip = "symbols" failed with the same LINKEDIT error, and adding only the sqlx-macros package override made the repro pass.

The Codex Lab validation branch also passed:

  • just fmt
  • CARGO_TARGET_DIR=/tmp/codex-lab-linkedit-fixed-target cargo build --release -p codex-cli --bin codex
  • just test -p codex-cli

Next Action

Periodically retest this after Rust, Xcode, or macOS runner updates. Close this issue only after the workaround has been removed from codex-rs/Cargo.toml and the macOS ARM64 app workflow is green without it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    planDurable planning issueplan:activePlan is actionable now

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions