Skip to content

feat(flag-table): bootstrap the declarative flag table (reld#123 Phase 1 / D1) - #139

Merged
zackees merged 1 commit into
mainfrom
phase1-flag-table
Sep 16, 2026
Merged

zackees merged 1 commit into
mainfrom
phase1-flag-table

Conversation

@zackees

@zackees zackees commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

What

Starts reld#123 Phase 1 (D1) — the declarative flag table that will replace the scattered flag classification.

Introduces the model and an initial table:

  • Disposition: Native / SatisfiedByConstruction / Requires(Capability) / Unsupported.
  • FlagRule { spellings, value, disposition, emitters }, plus ValueMatch and Emitter.
  • An initial FLAG_TABLE classifying the flags reld already handles (the SATISFIED_BY_CONSTRUCTION/IGNORED/DEFAULT sets and the routed capabilities).
  • --print-flag-table, which emits the table (e.g. for docs/flags.md generation later).

Not in this PR (Phase 1 follow-ups)

  • Vendoring lld's Options.td + GNU ld's option list to grow the table to the full ~150-option union, with a CI drift check.
  • Migrating the parser (collect_requested_capabilities, the -z fallback, warn_unsupported, and the SILENTLY_IGNORED_FLAGS/IGNORED_FLAGS/DEFAULT_FLAGS tables) to read from the flag table.

This is the bootstrap so the table is concrete and the migration can be tracked against it.

Verification

  • cargo run --bin reld -- --print-flag-table — emits the table.
  • cargo clippy -p reld-core --all-targets -- -D warnings — clean.
  • cargo fmt --check — clean.

🤖 Generated with Claude Code

…e 1 / D1)

Introduce the four-way Disposition (Native / SatisfiedByConstruction /
Requires(Capability) / Unsupported) and FlagRule model, and an initial table
classifying the flags reld already handles. Add `--print-flag-table` to emit it.

This is the D1 bootstrap: the table currently covers the existing
SATISFIED_BY_CONSTRUCTION / IGNORED / DEFAULT flags and the routed
capabilities. The full Phase 1 vendoring of lld's Options.td + GNU ld's option
list (growing the table to the ~150-option union, and a CI drift check) is a
follow-up; the parser still reads its existing tables.

Co-Authored-By: Claude Code <[email protected]>
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