Skip to content

feat(elf): make --fatal-warnings native (reld#123 Phase 2) - #141

Merged
zackees merged 1 commit into
mainfrom
phase2-fatal-warnings-native
Sep 16, 2026
Merged

zackees merged 1 commit into
mainfrom
phase2-fatal-warnings-native

Conversation

@zackees

@zackees zackees commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

What

Implements a reld#123 Phase 2 item: --fatal-warnings / --no-fatal-warnings are native diagnostics plumbing, not a route to lld.

Before, --fatal-warnings routed to lld via a FatalWarnings capability. Now it's handled natively:

  • CommonArgs gains fatal_warnings: bool and warning_count: AtomicUsize.
  • warning() increments the count.
  • At the end of the native run, --fatal-warnings promotes any emitted warning to a link error.
  • The FatalWarnings capability and its routing are removed.

Verification

  • cargo test -p reld-core --lib bridge::tests — 52 pass (incl. fatal_warnings_stays_native).
  • cargo clippy -p reld-core --all-targets -- -D warnings — clean.
  • cargo fmt --check — clean.

Notes

  • --color-diagnostics remains routed to lld (the ColorDiagnostics capability); making it native is a separate Phase 2 follow-up.
  • Docs (README/polylinker) updated to drop the now-inaccurate "warning policy" routing claim.

🤖 Generated with Claude Code

`--fatal-warnings` was routed to lld (a FatalWarnings capability). Implement it
natively: track the warning count, and promote any warning to a link error at
the end of the native run. Remove the now-unused FatalWarnings capability and
its routing, and update the README/polylinker capability-table claims.

Part of reld#123 Phase 2 ("--fatal-warnings / --no-fatal-warnings … native
diagnostics plumbing").

Co-Authored-By: Claude Code <[email protected]>
@zackees
zackees merged commit 3873c15 into main Sep 16, 2026
17 checks passed
@zackees
zackees deleted the phase2-fatal-warnings-native branch September 16, 2026 21:19
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