Files
codex/codex-rs/v8-poc/BUILD.bazel
T
Sean Huang ab190cdfdf 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
2026-10-28 20:57:54 +00:00

16 lines
368 B
Python

load("//:defs.bzl", "codex_rust_crate")
codex_rust_crate(
name = "v8-poc",
crate_features = ["sandbox"],
crate_name = "codex_v8_poc",
deps_extra = ["@crates//:v8"],
# Bazel always builds the native pair required by the CppGC ABI checks.
unit_test_args = ["--include-ignored"],
)
alias(
name = "v8-poc-rusty-v8",
actual = ":v8-poc",
)