Files
codex/third_party/v8/simdutf.BUILD.bazel
T
Sean Huang 0818b91867 Add native Windows MSVC V8 source archive builds (#57269)
## 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
2026-10-26 21:30:41 +00:00

36 lines
1.2 KiB
Plaintext

# Codex overlay for upstream simdutf source, not copied from V8's BUILD.
# V8 builds Chromium's single-header vendored form; match its Version field
# and review vendor changes on each upgrade (README.md#updating-source-dependencies).
load("@@//third_party/v8:dependency_config.bzl", "RUSTY_V8_DEPENDENCY_COPTS", "RUSTY_V8_DEPENDENCY_DEPS")
load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "simdutf",
srcs = ["src/simdutf.cpp"],
hdrs = glob(["include/**/*.h"]),
# Match V8's C++20 feature macros, including atomic_ref for the base64 API.
copts = select({
"@@//third_party/v8:platform_windows_msvc": [
"/std:c++20",
"/Zc:__cplusplus",
],
"//conditions:default": ["-std=c++20"],
}) + RUSTY_V8_DEPENDENCY_COPTS,
features = ["-module_maps"],
include_prefix = "third_party/simdutf",
includes = [
"include",
"src",
],
strip_include_prefix = "include",
textual_hdrs = glob(
[
"src/**/*.h",
"src/**/*.cpp",
],
exclude = ["src/simdutf.cpp"],
),
visibility = ["//visibility:public"],
deps = RUSTY_V8_DEPENDENCY_DEPS,
)