Skip to content

Don't link libresolv by default on Darwin/MacOS - #4326

Open
Zer0-One wants to merge 1 commit into
bazelbuild:mainfrom
Zer0-One:main
Open

Zer0-One wants to merge 1 commit into
bazelbuild:mainfrom
Zer0-One:main

Conversation

@Zer0-One

@Zer0-One Zer0-One commented Oct 11, 2026 •

Copy link
Copy Markdown

This fixes compatibility with toolchains that don't ship a libresolv (e.g hermetic_cc_toolchain from Uber). rules_rust currently forces '-lresolv' for a rust stdlib that hasn't needed it for several years. For context, see rust-lang/rust#102766 and #2611 .

This fixes compatibility with toolchains that don't ship a libresolv
(e.g hermetic_cc_toolchain from Uber). rules_rust currently forces
'-lresolv' for a rust stdlib that hasn't needed it for several years.
For context, see rust-lang/rust#102766 and
bazelbuild#2611 .
dzbarsky added a commit to hermeticbuild/rules_rs that referenced this pull request Oct 13, 2026
Remove -lresolv from the macOS stdlib_linkflags in declare_rustc_toolchains. Rust standard libraries no longer need libresolv on macOS, so this allows toolchains without libresolv to link Rust binaries. Keep the existing iOS link flags, matching bazelbuild/rules_rust#4326.

This branch has not been deployed

No deployments
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