Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ build:windows --host_per_file_copt=external/protobuf\\+.*@/w
common --enable_platform_specific_config
common:linux --host_platform=//:local_linux_gnu
common:windows --host_platform=//:local_windows_gnullvm

# rules_rs 0.0.90 bundles a newer rules_rust whose cargo build-script runner
# rejects libtool as the archiver (AR). macOS toolchains use libtool by default,
# so build Rust against the hermetic @llvm toolchain (registered for macOS exec
# in MODULE.bazel) with the rules_cc archiver switched from libtool to llvm-ar.
common:macos --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
common:macos --@rules_cc//cc/toolchains/args/archiver_flags:use_libtool_on_macos=False
build:linux --workspace_status_command=scripts/build-info.sh
build:macos --workspace_status_command=scripts/build-info.sh
build:windows --workspace_status_command="powershell.exe scripts/build-info.ps1"
Expand Down
5 changes: 5 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,12 @@ platform(
platform(
name = "local_windows_gnullvm",
constraint_values = [
# alias -> @llvm//constraints/windows/abi:gnullvm
"@rules_rs//rs/platforms/constraints:windows_gnullvm",
# rules_rs 0.0.90 (via llvm 0.8.3) requires the CRT to be selected
# explicitly; the gnullvm Rust toolchain targets msvcrt, while the crt
# constraint otherwise defaults to ucrt and no toolchain would match.
"@llvm//constraints/windows/crt:msvcrt",
],
parents = ["@platforms//host"],
)
Expand Down
12 changes: 10 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bazel_dep(name = "bazel_features", version = "1.47.1")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2")
bazel_dep(name = "contrib_rules_jvm", version = "0.33.0")
bazel_dep(name = "llvm", version = "0.7.9")
bazel_dep(name = "llvm", version = "0.8.3")
bazel_dep(name = "package_metadata", version = "0.0.10")
bazel_dep(name = "platforms", version = "1.1.0")

Expand Down Expand Up @@ -39,7 +39,7 @@ bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_python", version = "1.9.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_ruby", version = "0.26.0")
bazel_dep(name = "rules_rs", version = "0.0.61")
bazel_dep(name = "rules_rs", version = "0.0.90")

single_version_override(
module_name = "rules_jvm_external",
Expand Down Expand Up @@ -399,6 +399,14 @@ llvm_toolchains.exec(
arch = "aarch64",
os = "windows",
)
llvm_toolchains.exec(
arch = "aarch64",
os = "macos",
)
llvm_toolchains.exec(
arch = "x86_64",
os = "macos",
)
use_repo(llvm_toolchains, "llvm_toolchains")

register_toolchains("@llvm_toolchains//:all")
Expand Down
6 changes: 6 additions & 0 deletions rust/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ rust_binary(
srcs = ["src/main.rs"],
aliases = aliases(),
edition = "2024",
# clap's `#[clap(about)]` derives the CLI description from
# CARGO_PKG_DESCRIPTION. Cargo sets this from Cargo.toml automatically, but
# the Bazel build must supply it explicitly. Keep in sync with rust/Cargo.toml.
rustc_env = {
"CARGO_PKG_DESCRIPTION": "Selenium Manager is a CLI tool that automatically manages the browser/driver resources required by Selenium.",
},
version = "0.4.45",
visibility = ["//visibility:public"],
deps = [
Expand Down