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
This commit is contained in:
Ahmed Ibrahim
2026-09-24 22:33:01 +00:00
committed by copyberry
parent cf792c3a25
commit 4a358b1ae9
7 changed files with 225 additions and 17 deletions
+11 -4
View File
@@ -7,7 +7,7 @@ diff --git a/orig/v8-15.0.245.2/bazel/defs.bzl b/mod/v8-15.0.245.2/bazel/defs.bz
index bbe1495..6673518 100644
--- a/orig/v8-15.0.245.2/bazel/defs.bzl
+++ b/mod/v8-15.0.245.2/bazel/defs.bzl
@@ -33,9 +33,21 @@ _create_option_int = rule(
@@ -33,9 +33,25 @@ _create_option_int = rule(
)
def v8_flag(name, default = False):
@@ -30,8 +30,14 @@ index bbe1495..6673518 100644
+ visibility = ["//visibility:public"],
+ )
def v8_string(name, default = ""):
_create_option_string(name = name, build_setting_default = default)
-def v8_string(name, default = ""):
- _create_option_string(name = name, build_setting_default = default)
+def v8_string(name, default = "", visibility = None):
+ _create_option_string(
+ name = name,
+ build_setting_default = default,
+ visibility = visibility,
+ )
@@ -97,7 +109,13 @@ v8_config = rule(
def _default_args():
@@ -169,12 +175,13 @@ index b432f86..28c567b 100644
v8_flag(name = "v8_enable_verify_csa")
v8_flag(name = "v8_enable_verify_heap")
@@ -313,7 +317,7 @@ v8_int(
@@ -313,7 +317,8 @@ v8_int(
# If no explicit value for v8_enable_pointer_compression, we set it to 'none'.
v8_string(
name = "v8_enable_pointer_compression",
- default = "none",
+ default = "False",
+ visibility = ["//visibility:public"],
)
# Default setting for v8_enable_pointer_compression.