mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +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
31 lines
864 B
Python
31 lines
864 B
Python
"""Supply libsqlite3-sys's bindings and Bazel-owned native library."""
|
|
|
|
load("@rules_cc//cc:defs.bzl", "CcInfo")
|
|
load("@rules_rust//rust/private:providers.bzl", "BuildInfo")
|
|
|
|
def _sqlite_build_info_impl(ctx):
|
|
out_dir = ctx.file.out_dir
|
|
if not out_dir.is_directory:
|
|
fail("out_dir must be a directory")
|
|
|
|
return [
|
|
BuildInfo(
|
|
compile_data = depset(),
|
|
dep_env = None,
|
|
flags = None,
|
|
linker_flags = None,
|
|
link_search_paths = None,
|
|
out_dir = out_dir,
|
|
rustc_env = None,
|
|
),
|
|
ctx.attr.cc_lib[CcInfo],
|
|
]
|
|
|
|
sqlite_build_info = rule(
|
|
implementation = _sqlite_build_info_impl,
|
|
attrs = {
|
|
"cc_lib": attr.label(mandatory = True, providers = [CcInfo]),
|
|
"out_dir": attr.label(allow_single_file = True, mandatory = True),
|
|
},
|
|
)
|