Skip to content

fix: skip ARM unaligned shim during dependency generation - #481

Merged
messense merged 1 commit into
mainfrom
codex/fix-arm-dependency-generation
Sep 9, 2026
Merged

fix: skip ARM unaligned shim during dependency generation#481
messense merged 1 commit into
mainfrom
codex/fix-arm-dependency-generation

Conversation

@messense

@messense messense commented Sep 9, 2026

Copy link
Copy Markdown
Member

ARM compiler invocations using -M or -MM, such as Jemalloc's Makefile dependency generation, were treated as linking commands and received an extra aeabi_unaligned.c input. With a single -o output, Zig rejected the resulting command with cannot specify -o when generating multiple output files.

Skip the shim for both dependency-only modes. Keep injecting it for linking, including -MD/-MMD, which generate dependencies as a side effect. Regression tests exercise the CLI argument path and cover both behaviors plus the existing -c/-E/-S exclusions.

Validation:

  • cargo test: 59 tests passed; the new dependency-generation test failed before the fix.
  • Real Zig 0.16.0 ARM -M and -MM invocations with the reported CPU flag successfully generated dependency files after the fix.
  • cargo fmt --all --check and git diff --check: passed.
  • cargo clippy --all-targets --all-features -- -D warnings: blocked by five pre-existing warnings in unchanged code (useless_conversion, useless_borrows_in_formatting, and chunks_exact_to_as_chunks).

Fixes #478.

@messense
messense enabled auto-merge (squash) September 9, 2026 11:32
@messense
messense merged commit e799e0f into main Sep 9, 2026
59 of 60 checks passed
@messense
messense deleted the codex/fix-arm-dependency-generation branch September 9, 2026 12: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.

ARM targets fail when building C dependencies with -MM: "cannot specify -o when generating multiple output files"

1 participant