Skip to content

fix(bridge): classify reld-only flags as NativeControl or Stripped (reld#123 D6) - #135

Merged
zackees merged 1 commit into
mainfrom
phase0-reld-only-flags
Sep 16, 2026
Merged

zackees merged 1 commit into
mainfrom
phase0-reld-only-flags

Conversation

@zackees

@zackees zackees commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

What

Implements the reld#123 D6 item: every reld-only option is NativeControl or Stripped, so nothing reld-only reaches a child linker.

Before this, a routed link forwarded reld-only flags to lld and was rejected:

  • --sym-info=x --icf=all forwarded --sym-info=x → lld rejects it.
  • --time --icf=all forwarded --time → lld rejects it.

Change

  • NativeControl (force native; conflicts loudly with a routed requirement): add --sym-info[=name] to the existing --validate-output/--write-layout/--write-trace set.
  • Stripped (dropped from the forwarded argv): --update-in-place, --time, --mmap-output-file, --no-mmap-output-file, --fallocate-output-file, --no-fallocate-output-file, --madvise-huge-pages, --no-madvise-huge-pages, --threads, --no-threads, --no-fork, --fork. --time/--threads also drop a following value token when spelled --flag value.

Verification

  • cargo test -p reld-core --lib bridge::tests — 51 pass.
  • cargo clippy -p reld-core --all-targets -- -D warnings — clean.
  • cargo fmt --check — clean.

Notes

  • --engine was already consumed before parsing and is not forwarded.
  • The Stripped flags are dropped silently today; a RELD_LOG_ENGINE note when a flag is dropped is a Phase 5 observability item (reld#123 D5), not done here.

🤖 Generated with Claude Code

…eld#123 D6)

reld-only options leaked through to lld on a routed link and were rejected
(`--sym-info=x --icf=all` forwarded `--sym-info`, `--time --icf=all` forwarded
`--time`). Split them per reld#123 D6:

- NativeControl (force native, conflict loudly when a routed requirement is
  also present): add `--sym-info[=name]` to the existing validate-output /
  write-layout / write-trace set.
- Stripped (dropped from the forwarded argv): `--update-in-place`, `--time`,
  `--mmap-output-file`, `--no-mmap-output-file`, `--fallocate-output-file`,
  `--no-fallocate-output-file`, `--madvise-huge-pages`, `--no-madvise-huge-pages`,
  `--threads`, `--no-threads`, `--no-fork`, `--fork`.

Nothing reld-only reaches a child linker.

Co-Authored-By: Claude Code <[email protected]>
@zackees
zackees merged commit 0bfa327 into main Sep 16, 2026
17 checks passed
@zackees
zackees deleted the phase0-reld-only-flags branch September 16, 2026 19:59
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