mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
## Why Windows MSVC builds relied on installed C++ toolchains, and V8 snapshot generation required native Windows execution. Cross-compiling V8 also needs a Windows snapshot generator to preserve Windows unwind metadata. ## What changed - Use the registered hermetic LLVM toolchain and declared Microsoft SDK for Windows MSVC builds, with static CRT linkage and the toolchain's declared `lld-link` for Rust. - Run Windows V8 snapshot generators natively or through `rules_wine` on Linux, preserving target CPU, OS, and sandbox settings. Keep separate archive and binding pairs for the workspace's ISO stdio ABI and the distributed MSVC stdio ABI. - Update build dependencies and bindgen, scope V8's Chromium libc++ settings to its own targets, and adapt native voice dependencies for clang-cl and Windows ARM64. - Build SQLite directly with Bazel and give `openssl-sys` an explicit build using Bazel's OpenSSL. - Remove build-worker source-directory dependencies from Bazel resource lookup, schema output discovery, and snapshot paths; embed assets in debug builds as well. GitOrigin-RevId: fd224d9d28d73a67baf90f6d73c6079d60f20351
60 lines
2.8 KiB
Diff
60 lines
2.8 KiB
Diff
# What: restore explicit build-script dependency annotations used by Codex.
|
|
# Scope: rules_rs crate-universe annotation plumbing only.
|
|
|
|
diff --git a/rs/extensions.bzl b/rs/extensions.bzl
|
|
--- a/rs/extensions.bzl
|
|
+++ b/rs/extensions.bzl
|
|
@@ -359,8 +359,8 @@ def _generate_hub_and_spokes(
|
|
kwargs = dict(
|
|
hub_name = hub_name,
|
|
crate_visibility = visibility_with_internal_access(annotation.visibility, internal_packages),
|
|
gen_build_script = annotation.gen_build_script,
|
|
- build_script_deps = [],
|
|
+ build_script_deps = annotation.build_script_deps,
|
|
build_script_deps_select = _select(feature_resolutions.build_deps),
|
|
build_script_data = annotation.build_script_data,
|
|
build_script_data_select = annotation.build_script_data_select,
|
|
@@ -1094,9 +1094,9 @@ _annotation = tag_class(
|
|
# "build_script_data_glob": attr.string_list(
|
|
# doc = "A list of glob patterns to add to a crate's `cargo_build_script::data` attribute",
|
|
# ),
|
|
- # "build_script_deps": attr.label_list(
|
|
- # doc = "A list of labels to add to a crate's `cargo_build_script::deps` attribute.",
|
|
- # ),
|
|
+ "build_script_deps": attr.string_list(
|
|
+ doc = "A list of labels to add to a crate's `cargo_build_script::deps` attribute.",
|
|
+ ),
|
|
"build_script_env_files": attr.label_list(
|
|
doc = "Files containing additional environment variables for a crate's `cargo_build_script`.",
|
|
allow_files = True,
|
|
diff --git a/rs/private/annotations.bzl b/rs/private/annotations.bzl
|
|
--- a/rs/private/annotations.bzl
|
|
+++ b/rs/private/annotations.bzl
|
|
@@ -2,6 +2,7 @@ def _crate_annotation(
|
|
additive_build_file = None,
|
|
additive_build_file_content = "",
|
|
gen_build_script = "auto",
|
|
+ build_script_deps = [],
|
|
build_script_data = [],
|
|
build_script_data_select = {},
|
|
build_script_env = {},
|
|
@@ -30,6 +31,7 @@ def _crate_annotation(
|
|
additive_build_file = additive_build_file,
|
|
additive_build_file_content = additive_build_file_content,
|
|
gen_build_script = gen_build_script,
|
|
+ build_script_deps = build_script_deps,
|
|
build_script_data = build_script_data,
|
|
build_script_data_select = build_script_data_select,
|
|
build_script_env = build_script_env,
|
|
diff --git a/rs/private/repository_utils.bzl b/rs/private/repository_utils.bzl
|
|
--- a/rs/private/repository_utils.bzl
|
|
+++ b/rs/private/repository_utils.bzl
|
|
@@ -298,6 +298,6 @@ rust_crate_attrs = {
|
|
"hub_name": attr.string(),
|
|
"gen_build_script": attr.string(),
|
|
- "build_script_deps": attr.label_list(),
|
|
+ "build_script_deps": attr.string_list(),
|
|
"build_script_deps_select": _label_list_dict(),
|
|
"build_script_data": attr.label_list(),
|
|
"build_script_data_select": _label_list_dict(),
|