mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
## Why The Bazel V8 source build supported Windows GNU but lacked an MSVC-targeting toolchain to produce `*-pc-windows-msvc` archives. ## What changed - Add opt-in archive targets for native Windows x64 and ARM64 hosts, selected by `//third_party/v8:rusty_v8_native_windows_archive_for_target`. - Fetch pinned LLVM and scope its `clang-cl` toolchain to V8 artifacts, using the installed Microsoft SDK. Bundle Chromium libc++ and compiler-rt builtins into the resulting `.lib`. - Adapt V8 dependencies, assembly, snapshot generation, and platform feature settings for MSVC, and derive test metadata from the selected engine features. - Document the native build workflow. Existing MSVC consumers continue using prebuilt artifacts; generated Rust bindings and publishing integration remain separate. GitOrigin-RevId: abd5049245aece90a116fc3bfeac2b158a76f6af
27 lines
889 B
Python
27 lines
889 B
Python
"""Select the installed SDK-capable toolchain for native Windows libc++."""
|
|
|
|
load("@llvm//toolchain/runtimes:cc_runtime_library.bzl", "cc_runtime_stage0_library")
|
|
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
|
|
def libcxx_library(name, **kwargs):
|
|
cc_runtime_stage0_library(
|
|
name = name + "_stage0",
|
|
**kwargs
|
|
)
|
|
cc_library(
|
|
name = name + "_native_windows",
|
|
linkstatic = True,
|
|
target_compatible_with = select({
|
|
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": [],
|
|
"//conditions:default": ["@platforms//:incompatible"],
|
|
}),
|
|
**kwargs
|
|
)
|
|
native.alias(
|
|
name = name,
|
|
actual = select({
|
|
"@//third_party/v8:use_rusty_v8_custom_libcxx_native_windows": ":" + name + "_native_windows",
|
|
"//conditions:default": ":" + name + "_stage0",
|
|
}),
|
|
)
|