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
1.4 KiB
1.4 KiB
codex-utils-cargo-bin runfiles strategy
We disable the directory-based runfiles strategy and rely on the manifest
strategy across all platforms. This avoids Windows path length issues and keeps
behavior consistent in local and remote builds on all platforms. Bazel sets
RUNFILES_MANIFEST_FILE, and the codex-utils-cargo-bin helpers use the
runfiles crate to resolve runfiles via that manifest.
Function behavior:
cargo_bin: readsCARGO_BIN_EXE_*environment variables (set by Cargo or Bazel) and resolves them via the runfiles manifest whenRUNFILES_MANIFEST_FILEis present. When not under runfiles, it only accepts absolute paths fromCARGO_BIN_EXE_*and returns an error otherwise.find_resource!: used by tests to locate fixtures relative to the calling package. Bazel compiles this helper withcodex_bazel, selecting runfiles lookup without embedding the build worker's Cargo source directory. Missing runfiles produce an error. Cargo builds retain theCARGO_MANIFEST_DIR-relative fallback when runfiles are unavailable.resolve_cargo_runfile: retains source-directory lookup for Cargo builds; Bazel builds return an unsupported-operation error. This also preventsrepo_rootfrom falling back to a build worker's source directory.
Background: