[build] Upgrade rules_rs to 0.0.90 and build Rust against @llvm on macOS - #17683
Merged
Conversation
AutomatedTester
force-pushed
the
rules_rs_0.00.89
branch
from
June 16, 2026 09:14
1df3621 to
e23ae8d
Compare
rules_rs 0.0.90 bundles a newer rules_rust and pulls llvm 0.8.3, which breaks the Selenium Manager build in three ways: 1. The cargo build-script runner now rejects libtool as the archiver (AR). macOS C++ toolchains (autodetected and apple_support alike) use libtool by default, breaking every Rust crate with a build script. Fix: register the hermetic @llvm toolchain for macOS exec (mirroring Windows) and, on macOS, disable C++ toolchain autodetection and switch the rules_cc archiver from libtool to llvm-ar. 2. The selenium-manager binary fails to compile because clap's #[clap(about)] derives the description from CARGO_PKG_DESCRIPTION, which rules_rust no longer sets. Fix: set it via rustc_env, kept in sync with rust/Cargo.toml. 3. On Windows, no Rust toolchain matches //:local_windows_gnullvm: the gnullvm toolchain now requires crt:msvcrt, but the crt constraint defaults to ucrt. Fix: select msvcrt explicitly on the platform. Also pins llvm to 0.8.3 to match the resolved version. Linux is unaffected.
AutomatedTester
force-pushed
the
rules_rs_0.00.89
branch
from
June 16, 2026 10:00
e23ae8d to
8b001d0
Compare
AutomatedTester
added a commit
that referenced
this pull request
Jun 16, 2026
Cross-compiles selenium-manager for every supported OS/arch via rules_rs platform transitions + the hermetic @llvm toolchain (musl on Linux, gnullvm on Windows), so release bundles can build all platform binaries from a single host. Bindings (Java, Python, Ruby, JS, .NET) updated to probe per-(os, arch) paths from the bundle. Rebased onto trunk's rules_rs 0.0.90 / @llvm-on-macOS work (#17683).
This was referenced Jul 11, 2026
This was referenced Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrades
rules_rsfrom 0.0.61 to 0.0.90 (which also pulls inllvm0.8.3). The bump surfaces three independent build breakages, fixed here.1. macOS:
error: libtool cannot be used as ARThe newer
rules_rustbuild-script runner rejects an archiver whose name containslibtool. Both the autodetected macOS toolchain and@apple_support(current 2.6.1 hardcodes"ar": libtool) use libtool, so every Rust crate with a build script fails — including the macOSbazel test //rust/...CI job.Fix: build Rust against the hermetic
@llvmtoolchain on macOS (archiver =llvm-ar):@llvmfor macOS exec (aarch64 + x86_64), mirroring the existing Windows registration.common:macos:BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1+use_libtool_on_macos=False.2. All platforms:
error: cannot derive 'about' from Cargo.tomlclap's
#[clap(about)]readsCARGO_PKG_DESCRIPTIONat compile time; the newerrules_rustno longer sets it forrust_binary, and the re-resolved clap now hard-errors instead of defaulting to empty.Fix: set
CARGO_PKG_DESCRIPTIONviarustc_envon theselenium-managerbinary, kept in sync withrust/Cargo.toml.3. Windows:
No matching toolchains found for ...rust:toolchain_typeWith
llvm0.8.3 the gnullvm Rust toolchain'starget_compatible_withnow requires@llvm//constraints/windows/crt:msvcrt. Thecrtconstraint defaults toucrt, and//:local_windows_gnullvmdidn't select one, so nothing matched.Fix: add
@llvm//constraints/windows/crt:msvcrtto thelocal_windows_gnullvmplatform. Also pinsllvmto 0.8.3 to match the resolved version (clears the direct-dependency version-skew warning).Verification
bazel build //rust:selenium-manager✅,bazel build //rust/...✅,bazel test //rust/...✅ (download tests are network-dependent).@platforms//host). Relying on CI here.Linux is unaffected.
Checklist