Repository navigation
refactor(bridge): classify satisfied-by-construction flags correctly (reld#123 Phase 1) - #128
Merged
Merged
Conversation
…(reld#123 §A) The four flags `--start-group`/`--end-group`, `--nostdlib`, `--sort-common`, `--stats` are satisfied by the native engine's unconditional behavior (cycle resolution, no built-in search paths, no common-symbol ordering, no stats), not "silently ignored". Rename the constant and drop the four already-routed flags (`--fatal-warnings`, `--color-diagnostics`, `--no-undefined-version`, `--undefined-version`) from the list — those route to lld, and now fail loudly under `--engine=reld` rather than being silently accepted. Refs: #123. Co-Authored-By: Claude Code <[email protected]>
zackees
added a commit
that referenced
this pull request
Sep 16, 2026
…ve + gc-sections difftest fixtures (#131) * fix(bridge): keep --no-undefined-version native, not routed to lld (reld#123 §B) The §A reclassification (PR #128) dropped --no-undefined-version / --undefined-version from the native parser's satisfied-by-construction list, believing they route to lld. But rustc emits --no-undefined-version on every cdylib, dylib, and proc-macro link, so routing it pushes all of those links off the fast native engine (and off the Nix RUNPATH derivation), which reld#123 §B forbids. Make them native: accept both flags as satisfied-by-construction (the native engine has no version-script undefined-symbol tracking, so the check is trivially satisfied), and delete the now-triggerless VersionScriptPolicy capability and its route-to-lld arm. Co-Authored-By: Claude Code <[email protected]> * fix(difftest): drop stale ignores from the gc-sections default change (reld#123) Phase 0 (#125) changed the native engine's --gc-sections default from on to off, matching ld/lld/mold. That change was landed without updating the difftest fixtures, so ~26 fixture-level DiffIgnore entries that suppressed gc-induced .rodata/.data/relocation/byte differences became stale. The difftest ratchet now fails each unused entry with "is no longer needed". Remove the stale entries: `section.rodata`, `section.rodata.alignment`, `section.data`, `rel.match_failed.R_X86_64_PLT32`, and `literal-byte-mismatch`. Arch-scoped variants (e.g. `... #13 arch=aarch64`) and still-needed ignores are untouched. Co-Authored-By: Claude Code <[email protected]> * test(external): un-skip mold tests that now pass under gc-sections-off Phase 0's --gc-sections default flip (#125) made nine mold-suite tests pass that were previously skipped. The Phase 1 external-test ratchet fails any skipped test that now passes, so remove them from the skip list: gc-sections.sh, start-lib.sh, undefined.sh, undefined2.sh, whole-archive.sh (the five reld#123 Phase 0 names "Passes when --no-gc-sections is passed"), plus nmagic.sh, section-attributes.sh, symbol-version.sh, symtab.sh. Co-Authored-By: Claude Code <[email protected]> --------- Co-authored-by: Claude Code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First sub-step of reld#123 Phase 1: correct the classification of the flags the audit called out in §A.
Changes
SILENTLY_IGNORED_FLAGS→SATISFIED_BY_CONSTRUCTION_FLAGSand document that--start-group/--end-group,--nostdlib,--sort-common,--statsare satisfied by the native engine's unconditional behavior, not silently dropped.--fatal-warnings,--color-diagnostics,--no-undefined-version,--undefined-versionfrom the list — those already route to lld via the bridge, and now fail loudly under--engine=reldinstead of being silently accepted.Tests
192 reld-core lib tests pass; clippy (
--all-targets) and fmt clean.Refs: #123.
🤖 Generated with Claude Code