Files
Ahmed Ibrahim 4a358b1ae9 Use prebuilt V8 archives for Bazel on macOS and GNU Linux (#47951)
## What changed

Select checksum-pinned `rusty_v8` 150.4.0 release archives and matching Rust bindings for x64 and arm64 macOS and GNU Linux when pointer compression and the V8 sandbox are enabled.

Add `--//:rusty_v8_from_source=true` to select source-built archives and bindings together for custom V8 C++ flags or instrumentation. Fall back to the existing source path when the sandbox or pointer compression settings differ from the published artifacts, and retain source builds for musl Linux and Windows GNU.

On GNU Linux, weaken the ten shared `std::logic_error` and `std::runtime_error` constructor and assignment symbols in the Bazel output so toolchain libc++ definitions take precedence. Preserve the checksum-verified inputs and constructors accepting `std::__Cr::string`.

Document artifact selection, source overrides, and checksum maintenance.

GitOrigin-RevId: cedd474c739ae16e07a78f35459d2c383e5781d8
2026-09-24 22:33:01 +00:00

88 lines
2.4 KiB
Python

load("@apple_support//xcode:xcode_config.bzl", "xcode_config")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
# Set for builds that need custom V8 C++ flags or source instrumentation.
bool_flag(
name = "rusty_v8_from_source",
build_setting_default = False,
visibility = ["//visibility:public"],
)
xcode_config(name = "disable_xcode")
# We mark the local platform as glibc-compatible so that rust can grab a toolchain for us.
# TODO(zbarsky): Upstream a better libc constraint into rules_rust.
# We only enable this on linux though for sanity, and because it breaks remote execution.
platform(
name = "local_linux",
constraint_values = [
# We mark the local platform as glibc-compatible because musl-built rust cannot dlopen proc macros.
"@llvm//constraints/libc:gnu.2.28",
],
parents = ["@platforms//host"],
)
platform(
name = "local_windows",
constraint_values = [
"@llvm//constraints/windows/abi:gnullvm",
"@llvm//constraints/windows/crt:msvcrt",
],
parents = ["@platforms//host"],
)
platform(
name = "local_windows_msvc",
constraint_values = [
"@llvm//constraints/windows/abi:msvc",
],
parents = ["@platforms//host"],
)
platform(
name = "windows_x86_64_gnullvm",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@llvm//constraints/windows/abi:gnullvm",
"@llvm//constraints/windows/crt:msvcrt",
],
)
platform(
name = "windows_x86_64_msvc",
constraint_values = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@llvm//constraints/windows/abi:msvc",
],
)
toolchain(
name = "windows_gnullvm_tests_on_msvc_host_toolchain",
exec_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@llvm//constraints/windows/abi:msvc",
],
target_compatible_with = [
"@platforms//cpu:x86_64",
"@platforms//os:windows",
"@llvm//constraints/windows/abi:gnullvm",
"@llvm//constraints/windows/crt:msvcrt",
],
toolchain = "@bazel_tools//tools/test:empty_toolchain",
toolchain_type = "@bazel_tools//tools/test:default_test_toolchain_type",
)
alias(
name = "rbe",
actual = "@rbe_platform",
)
exports_files([
"AGENTS.md",
"workspace_root_test_launcher.bat.tpl",
"workspace_root_test_launcher.sh.tpl",
])