mirror of
https://github.com/openai/codex.git
synced 2026-04-30 09:26:44 +00:00
Setup a new v8-poc package
This is a new package that depends on rusty-v8 for embedding a v8 engine. This builds and works on non-musl platforms now because rusty-v8 provides versions for that. But we mocked out the loading of a musl built library. TODO: iterate on providing the musl built version for musl-linux builds. TODO: create a release workflow for publishing the artifact that rusty-v8 can link against
This commit is contained in:
15
MODULE.bazel
15
MODULE.bazel
@@ -132,6 +132,21 @@ crate.annotation(
|
||||
workspace_cargo_toml = "rust/runfiles/Cargo.toml",
|
||||
)
|
||||
|
||||
crate.annotation(
|
||||
build_script_data_select = {
|
||||
"aarch64-unknown-linux-musl": ["//third_party/v8:rusty_v8_archive"],
|
||||
"x86_64-unknown-linux-musl": ["//third_party/v8:rusty_v8_archive"],
|
||||
},
|
||||
build_script_env_select = {
|
||||
# Replace the placeholder archive with a musl-built librusty_v8 artifact before
|
||||
# enabling codex-v8-poc's `rusty_v8` feature for musl Cargo or Bazel builds.
|
||||
"aarch64-unknown-linux-musl": "{\"RUSTY_V8_ARCHIVE\":\"$(execpath //third_party/v8:rusty_v8_archive)\"}",
|
||||
"x86_64-unknown-linux-musl": "{\"RUSTY_V8_ARCHIVE\":\"$(execpath //third_party/v8:rusty_v8_archive)\"}",
|
||||
},
|
||||
crate = "v8",
|
||||
gen_build_script = "on",
|
||||
)
|
||||
|
||||
llvm = use_extension("@llvm//extensions:llvm.bzl", "llvm")
|
||||
use_repo(llvm, "llvm-project")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user