Skip to content

Defer native linker input expansion to Args - #74

Merged
dzbarsky merged 1 commit into
mainfrom
codex/defer-native-link-flags
Oct 2, 2026
Merged

dzbarsky merged 1 commit into
mainfrom
codex/defer-native-link-flags

Conversation

@dzbarsky

@dzbarsky dzbarsky commented Oct 2, 2026

Copy link
Copy Markdown
Member

Pass transitive_noncrates directly to Args and construct each linker input tuple during argument expansion. This avoids retaining a flattened list and repeated option tuples per linking action. Keep the existing platform callbacks and library order, use shared PIC/non-PIC directory callbacks, and let Args deduplicate directory arguments.

Validation: 29 focused macOS tests pass, including native arguments, runtime libraries, rustdoc, and an actual Rust–C–Rust link; four platform-specific cases skip. All 17 native/ambiguous-library analysis tests also pass with stripped output paths. The stripped integration build fails in process_wrapper on both this branch and unmodified main because an LLVM compiler-rt argument retains an unmapped output path. Buildifier and git diff --check pass.

-zbarskybot

Pass transitive_noncrates directly to Args and construct each linker input tuple during argument expansion. This avoids retaining a flattened list and repeated option tuples in every linking action while preserving the existing platform callbacks, library order, and execution-path mapping.

Reuse global PIC and non-PIC directory callbacks and let Args deduplicate directory arguments.
@dzbarsky
dzbarsky merged commit b53494d into main Oct 2, 2026
3 checks passed
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