Skip to content

Fix platform-specific linker resolution - #872

Merged
helly25 merged 1 commit into
bazel-contrib:masterfrom
helly25:fix/linker-version-platform-semantics
Sep 29, 2026
Merged

helly25 merged 1 commit into
bazel-contrib:masterfrom
helly25:fix/linker-version-platform-semantics

Conversation

@helly25

@helly25 helly25 commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Allow one toolchain configuration to select catalogued linkers on some target platforms and native or bundled linkers on others. This makes configurations such as Linux mold plus macOS auto work as intended.

Fixes #871.

Details:

  • preserve target keys while materializing catalogued linker distributions;
  • skip a catalogue artifact unavailable on the execution platform when it belongs only to targets for another OS;
  • omit those unusable cross-target toolchain configurations rather than breaking valid native targets;
  • apply linker_version requirements only to catalogue selections, ignoring them for auto, absolute paths, and the LLVM-distribution linker;
  • document and test the inherited-version behavior.

Validation:

  • bazel test //...
  • trunk check
  • xff macOS build with one toolchain selecting auto on Darwin and latest mold on Linux

@helly25
helly25 merged commit eac33e3 into bazel-contrib:master Sep 29, 2026
87 checks passed
@helly25
helly25 deleted the fix/linker-version-platform-semantics branch September 29, 2026 20:29
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.

Define version semantics for auto and path-based linker selections

1 participant