ci: cross-compile Windows Bazel tests

This commit is contained in:
Michael Bolin
2026-05-01 11:09:35 -07:00
parent 5744b85b9a
commit bdbe9b64a4
13 changed files with 330 additions and 82 deletions
+12 -12
View File
@@ -174,18 +174,18 @@ genrule(
name = "binding_cc",
srcs = ["@v8_crate_146_4_0//:binding_cc"],
outs = ["binding.cc"],
# Keep this as a literal shell snippet. The string-concatenated form looked
# cleaner in Starlark but produced a broken `sed` invocation in CI.
cmd = """
sed \
-e '/#include "v8\\/src\\/flags\\/flags.h"/d' \
-e 's|"v8/src/libplatform/default-platform.h"|"src/libplatform/default-platform.h"|' \
-e 's| namespace i = v8::internal;| (void)usage;|' \
-e '/using HelpOptions = i::FlagList::HelpOptions;/d' \
-e '/HelpOptions help_options = HelpOptions(HelpOptions::kExit, usage);/d' \
-e 's| i::FlagList::SetFlagsFromCommandLine(argc, argv, true, help_options);| v8::V8::SetFlagsFromCommandLine(argc, argv, true);|' \
$(location @v8_crate_146_4_0//:binding_cc) > "$@"
""",
cmd = " ".join([
"sed",
"-e '/#include \"v8\\/src\\/flags\\/flags.h\"/d'",
"-e 's|\"v8/src/libplatform/default-platform.h\"|\"src/libplatform/default-platform.h\"|'",
"-e 's| namespace i = v8::internal;| (void)usage;|'",
"-e '/using HelpOptions = i::FlagList::HelpOptions;/d'",
"-e '/HelpOptions help_options = HelpOptions(HelpOptions::kExit, usage);/d'",
"-e 's| i::FlagList::SetFlagsFromCommandLine(argc, argv, true, help_options);| v8::V8::SetFlagsFromCommandLine(argc, argv, true);|'",
"$(location @v8_crate_146_4_0//:binding_cc)",
">",
'"$@"',
]),
)
copy_file(