mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
wip: experiment with windows bazel v8 build
This commit is contained in:
Vendored
+33
-14
@@ -64,12 +64,15 @@ alias(
|
||||
|
||||
alias(
|
||||
name = "v8_146_4_0_aarch64_pc_windows_gnullvm",
|
||||
actual = ":v8_146_4_0_aarch64_pc_windows_msvc",
|
||||
# `rusty_v8` only ships prebuilt Windows archives for MSVC. Build the
|
||||
# GNU-flavored archive in-tree so windows-gnullvm consumers can link
|
||||
# against a matching ABI instead of trying to reuse the MSVC release.
|
||||
actual = ":v8_146_4_0_aarch64_pc_windows_gnullvm_bazel",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "v8_146_4_0_x86_64_pc_windows_gnullvm",
|
||||
actual = ":v8_146_4_0_x86_64_pc_windows_msvc",
|
||||
actual = ":v8_146_4_0_x86_64_pc_windows_gnullvm_bazel",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
@@ -114,12 +117,16 @@ filegroup(
|
||||
|
||||
alias(
|
||||
name = "src_binding_release_x86_64_pc_windows_gnullvm",
|
||||
actual = ":src_binding_release_x86_64_pc_windows_msvc",
|
||||
# `rusty_v8` does not publish a Windows GNU binding file. The generated
|
||||
# binding only describes this V8 release's C++ API surface, so reuse the
|
||||
# Linux release binding while the windows-gnullvm archive build is still
|
||||
# experimental.
|
||||
actual = ":src_binding_release_x86_64_unknown_linux_gnu",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "src_binding_release_aarch64_pc_windows_gnullvm",
|
||||
actual = ":src_binding_release_aarch64_pc_windows_msvc",
|
||||
actual = ":src_binding_release_aarch64_unknown_linux_gnu",
|
||||
)
|
||||
|
||||
alias(
|
||||
@@ -167,16 +174,16 @@ genrule(
|
||||
name = "binding_cc",
|
||||
srcs = ["@v8_crate_146_4_0//:binding_cc"],
|
||||
outs = ["binding.cc"],
|
||||
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 = (
|
||||
"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(
|
||||
@@ -208,12 +215,24 @@ cc_static_library(
|
||||
features = V8_STATIC_LIBRARY_FEATURES,
|
||||
)
|
||||
|
||||
cc_static_library(
|
||||
name = "v8_146_4_0_aarch64_pc_windows_gnullvm_bazel",
|
||||
deps = [":v8_146_4_0_binding"],
|
||||
features = V8_STATIC_LIBRARY_FEATURES,
|
||||
)
|
||||
|
||||
cc_static_library(
|
||||
name = "v8_146_4_0_x86_64_apple_darwin_bazel",
|
||||
deps = [":v8_146_4_0_binding"],
|
||||
features = V8_STATIC_LIBRARY_FEATURES,
|
||||
)
|
||||
|
||||
cc_static_library(
|
||||
name = "v8_146_4_0_x86_64_pc_windows_gnullvm_bazel",
|
||||
deps = [":v8_146_4_0_binding"],
|
||||
features = V8_STATIC_LIBRARY_FEATURES,
|
||||
)
|
||||
|
||||
cc_static_library(
|
||||
name = "v8_146_4_0_x86_64_unknown_linux_gnu_bazel",
|
||||
deps = [":v8_146_4_0_binding"],
|
||||
|
||||
Reference in New Issue
Block a user