mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Enforce V8 artifact profiles at Bazel target boundaries (#57165)
## Why V8 source and release artifacts require different ABI and C++ runtime settings. Selecting a named artifact should also select its required settings, without callers coordinating separate sandbox, pointer compression, libc++, and CPU flags. ## What changed - Add Bazel transitions for `source`, `release`, and `sandbox_release` profiles. Source builds use the sandbox ABI and workspace runtime; release pairs use Chromium's pinned runtime with their respective ABI. - Select the V8 CPU from the artifact target and enforce matching target platform constraints. - Make the underlying V8 settings unavailable as CLI flags and remove redundant configuration from release tooling and workflows. - Select Darwin/Linux prebuilts solely through `rusty_v8_from_source`, keeping source archives and bindings paired when enabled. GitOrigin-RevId: f72fc06b6f74b79ab2ab8ca697e4f2006076a833
This commit is contained in:
@@ -25,7 +25,7 @@ class RustyV8BazelTest(unittest.TestCase):
|
||||
"aarch64_pc_windows_gnullvm",
|
||||
"aarch64_pc_windows_msvc",
|
||||
"aarch64_unknown_linux_gnu_bazel",
|
||||
"aarch64_unknown_linux_musl_release_base",
|
||||
"aarch64_unknown_linux_musl_release",
|
||||
"x86_64_apple_darwin_bazel",
|
||||
"x86_64_pc_windows_gnullvm",
|
||||
"x86_64_pc_windows_msvc",
|
||||
@@ -72,22 +72,6 @@ class RustyV8BazelTest(unittest.TestCase):
|
||||
with patch.object(rusty_v8_bazel, "MODULE_BAZEL", module_bazel):
|
||||
self.assertEqual("146.4.0", rusty_v8_bazel.command_version(None))
|
||||
|
||||
def test_artifact_bazel_configs_always_enable_upstream_libcxx(self) -> None:
|
||||
self.assertEqual(
|
||||
["rusty-v8-upstream-libcxx"],
|
||||
rusty_v8_bazel.artifact_bazel_configs(),
|
||||
)
|
||||
self.assertEqual(
|
||||
["rusty-v8-upstream-libcxx", "v8-release-compat"],
|
||||
rusty_v8_bazel.artifact_bazel_configs(["v8-release-compat"]),
|
||||
)
|
||||
self.assertEqual(
|
||||
["rusty-v8-upstream-libcxx", "v8-release-compat"],
|
||||
rusty_v8_bazel.artifact_bazel_configs(
|
||||
["rusty-v8-upstream-libcxx", "v8-release-compat"]
|
||||
),
|
||||
)
|
||||
|
||||
def test_bazel_commands_use_shared_buildbuddy_remote_config_library(self) -> None:
|
||||
with patch.dict(environ, {}, clear=True):
|
||||
self.assertEqual(
|
||||
@@ -276,7 +260,7 @@ class RustyV8BazelTest(unittest.TestCase):
|
||||
"macos_arm64",
|
||||
["//third_party/v8:pair"],
|
||||
"opt",
|
||||
["rusty-v8-upstream-libcxx"],
|
||||
["ci-macos"],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -284,14 +268,14 @@ class RustyV8BazelTest(unittest.TestCase):
|
||||
"macos_arm64",
|
||||
["//third_party/v8:pair"],
|
||||
"opt",
|
||||
["rusty-v8-upstream-libcxx"],
|
||||
["ci-macos"],
|
||||
download_toplevel=True,
|
||||
)
|
||||
bazel_output_files.assert_called_once_with(
|
||||
"macos_arm64",
|
||||
["//third_party/v8:pair"],
|
||||
"opt",
|
||||
["rusty-v8-upstream-libcxx"],
|
||||
["ci-macos"],
|
||||
)
|
||||
|
||||
def test_update_module_bazel_replaces_and_inserts_sha256(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user