Build V8 from source by default in Bazel (#57832)

## Why

Source-built V8 archives and generated Rust bindings must agree on their ABI, including in debug builds. Linux platform selection must also distinguish GNU and musl when using LLVM platforms.

## What changed

- Always select source-built V8 archives and matching bindings for Bazel consumers, removing the `rusty_v8_from_source` flag.
- Use LLVM's libc-aware Linux selectors for archives, bindings, headers, and bindgen targets.
- Keep `V8_ENABLE_CHECKS` undefined in debug builds to match Rust's `HandleScope` layout, and set `V8_LOGGING_LEVEL=2` for debug verification.
- Include compiler-rt builtins in the ARM64 GNU/Linux archive to provide `__clear_cache`.
- Set the Intel macOS minimum version for `codex-code-mode-host` releases to 10.13 for V8's aligned allocation support.

## Testing

Always include the existing ignored CppGC ABI checks in Bazel `v8-poc` unit tests and remove their exclusion from Bazel CI.

GitOrigin-RevId: f698a47502154cdfb80febed02e4465d9f2d1e0c
This commit is contained in:
Sean Huang
2026-10-28 20:57:54 +00:00
committed by copyberry
parent 2f47f97792
commit ab190cdfdf
8 changed files with 80 additions and 126 deletions
+2
View File
@@ -8,4 +8,6 @@ codex_rust_crate(
release_binary(
binary = ":codex-code-mode-host",
# V8 and its libc++ use aligned new and delete, available on macOS 10.13.
macos_x86_64_minimum_os = "10.13",
)