mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
build(v8): update rusty_v8 to 149.2.0 (#26464)
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
# Scope: Bazel BUILD/defs/BUILD.icu integration only, including dependency
|
||||
# wiring, generated sources, and visibility; no standalone V8 source patching.
|
||||
|
||||
diff --git a/orig/v8-14.6.202.11/bazel/defs.bzl b/mod/v8-14.6.202.11/bazel/defs.bzl
|
||||
index 9648e4a..88efd41 100644
|
||||
--- a/orig/v8-14.6.202.11/bazel/defs.bzl
|
||||
+++ b/mod/v8-14.6.202.11/bazel/defs.bzl
|
||||
@@ -33,9 +33,21 @@
|
||||
diff --git a/orig/v8-14.9.207.2/bazel/defs.bzl b/mod/v8-14.9.207.2/bazel/defs.bzl
|
||||
index bbe1495..6673518 100644
|
||||
--- a/orig/v8-14.9.207.2/bazel/defs.bzl
|
||||
+++ b/mod/v8-14.9.207.2/bazel/defs.bzl
|
||||
@@ -33,9 +33,21 @@ _create_option_int = rule(
|
||||
)
|
||||
|
||||
def v8_flag(name, default = False):
|
||||
@@ -32,7 +32,7 @@ index 9648e4a..88efd41 100644
|
||||
|
||||
def v8_string(name, default = ""):
|
||||
_create_option_string(name = name, build_setting_default = default)
|
||||
@@ -97,7 +109,13 @@
|
||||
@@ -97,7 +109,13 @@ v8_config = rule(
|
||||
|
||||
def _default_args():
|
||||
return struct(
|
||||
@@ -47,7 +47,7 @@ index 9648e4a..88efd41 100644
|
||||
defines = select({
|
||||
"@v8//bazel/config:is_windows": [
|
||||
"UNICODE",
|
||||
@@ -127,12 +145,15 @@
|
||||
@@ -127,12 +145,15 @@ def _default_args():
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}) + select({
|
||||
@@ -56,20 +56,19 @@ index 9648e4a..88efd41 100644
|
||||
- "-Wno-deprecated-this-capture",
|
||||
- "-Wno-deprecated-declarations",
|
||||
- "-std=c++20",
|
||||
- ],
|
||||
+ "@v8//:is_v8_use_rusty_v8_custom_libcxx": [
|
||||
+ "-nostdinc++",
|
||||
+ "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
|
||||
+ "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
|
||||
+ "-D_LIBCPP_INSTRUMENTED_WITH_ASAN=0",
|
||||
+ "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
|
||||
+ ],
|
||||
],
|
||||
+ "//conditions:default": [],
|
||||
+ }) + select({
|
||||
"@v8//bazel/config:is_gcc": [
|
||||
"-Wno-extra",
|
||||
"-Wno-array-bounds",
|
||||
@@ -152,9 +173,17 @@
|
||||
@@ -152,9 +173,17 @@ def _default_args():
|
||||
"-std=gnu++2a",
|
||||
],
|
||||
"@v8//bazel/config:is_windows": [
|
||||
@@ -78,18 +77,18 @@ index 9648e4a..88efd41 100644
|
||||
+ "-Wno-deprecated-this-capture",
|
||||
+ "-Wno-deprecated-declarations",
|
||||
+ "-std=c++20",
|
||||
],
|
||||
- "//conditions:default": [],
|
||||
+ ],
|
||||
+ "//conditions:default": [
|
||||
+ "-Wno-invalid-offsetof",
|
||||
+ "-Wno-deprecated-this-capture",
|
||||
+ "-Wno-deprecated-declarations",
|
||||
+ "-std=c++20",
|
||||
+ ],
|
||||
],
|
||||
- "//conditions:default": [],
|
||||
}) + select({
|
||||
"@v8//bazel/config:is_gcc_fastbuild": [
|
||||
# Non-debug builds without optimizations fail because
|
||||
@@ -178,12 +207,12 @@
|
||||
@@ -178,12 +207,12 @@ def _default_args():
|
||||
includes = ["include"],
|
||||
linkopts = select({
|
||||
"@v8//bazel/config:is_windows": [
|
||||
@@ -118,7 +117,7 @@ index 9648e4a..88efd41 100644
|
||||
outs = [
|
||||
ctx.actions.declare_file(prefix + "/snapshot" + suffix + ".cc"),
|
||||
ctx.actions.declare_file(prefix + "/embedded" + suffix + ".S"),
|
||||
@@ -476,7 +510,7 @@
|
||||
@@ -477,6 +511,6 @@
|
||||
outs[1].path,
|
||||
] + ctx.attr.args,
|
||||
- executable = ctx.executable.tool,
|
||||
@@ -155,10 +154,10 @@ index 9648e4a..88efd41 100644
|
||||
suffix = suffix,
|
||||
target_os = select({
|
||||
"@v8//bazel/config:is_macos": "mac",
|
||||
diff --git a/orig/v8-14.6.202.11/BUILD.bazel b/mod/v8-14.6.202.11/BUILD.bazel
|
||||
index 421ebcd..52283ea 100644
|
||||
--- a/orig/v8-14.6.202.11/BUILD.bazel
|
||||
+++ b/mod/v8-14.6.202.11/BUILD.bazel
|
||||
diff --git a/orig/v8-14.9.207.2/BUILD.bazel b/mod/v8-14.9.207.2/BUILD.bazel
|
||||
index b432f86..28c567b 100644
|
||||
--- a/orig/v8-14.9.207.2/BUILD.bazel
|
||||
+++ b/mod/v8-14.9.207.2/BUILD.bazel
|
||||
@@ -148,6 +148,10 @@ v8_flag(name = "v8_enable_trace_maps")
|
||||
|
||||
v8_flag(name = "v8_enable_v8_checks")
|
||||
@@ -187,7 +186,7 @@ index 421ebcd..52283ea 100644
|
||||
"v8_enable_trace_maps": "V8_TRACE_MAPS",
|
||||
"v8_enable_turbofan": "V8_ENABLE_TURBOFAN",
|
||||
"v8_enable_v8_checks": "V8_ENABLE_CHECKS",
|
||||
@@ -4098,28 +4103,14 @@ filegroup(
|
||||
@@ -4125,28 +4130,14 @@ filegroup(
|
||||
}),
|
||||
)
|
||||
|
||||
@@ -222,7 +221,7 @@ index 421ebcd..52283ea 100644
|
||||
)
|
||||
|
||||
filegroup(
|
||||
@@ -4422,6 +4413,20 @@ genrule(
|
||||
@@ -4441,6 +4432,20 @@ genrule(
|
||||
srcs = [
|
||||
"include/js_protocol.pdl",
|
||||
"src/inspector/inspector_protocol_config.json",
|
||||
@@ -243,7 +242,7 @@ index 421ebcd..52283ea 100644
|
||||
],
|
||||
outs = [
|
||||
"include/inspector/Debugger.h",
|
||||
@@ -4443,15 +4448,19 @@ genrule(
|
||||
@@ -4462,15 +4467,19 @@ genrule(
|
||||
"src/inspector/protocol/Schema.cpp",
|
||||
"src/inspector/protocol/Schema.h",
|
||||
],
|
||||
@@ -267,7 +266,7 @@ index 421ebcd..52283ea 100644
|
||||
],
|
||||
)
|
||||
|
||||
@@ -4465,6 +4474,35 @@ filegroup(
|
||||
@@ -4484,6 +4493,35 @@ filegroup(
|
||||
],
|
||||
)
|
||||
|
||||
@@ -303,7 +302,7 @@ index 421ebcd..52283ea 100644
|
||||
filegroup(
|
||||
name = "d8_files",
|
||||
srcs = [
|
||||
@@ -4584,16 +4602,9 @@ cc_library(
|
||||
@@ -4603,16 +4641,9 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
@@ -323,7 +322,7 @@ index 421ebcd..52283ea 100644
|
||||
)
|
||||
|
||||
v8_library(
|
||||
@@ -4610,7 +4621,7 @@ v8_library(
|
||||
@@ -4629,7 +4660,7 @@ v8_library(
|
||||
copts = ["-Wno-implicit-fallthrough"],
|
||||
icu_deps = [
|
||||
":icu/generated_torque_definitions_headers",
|
||||
@@ -332,7 +331,7 @@ index 421ebcd..52283ea 100644
|
||||
],
|
||||
icu_srcs = [
|
||||
":generated_regexp_special_case",
|
||||
@@ -4625,7 +4636,7 @@ v8_library(
|
||||
@@ -4644,7 +4675,7 @@ v8_library(
|
||||
],
|
||||
deps = [
|
||||
":lib_dragonbox",
|
||||
@@ -341,7 +340,7 @@ index 421ebcd..52283ea 100644
|
||||
":lib_fp16",
|
||||
":simdutf",
|
||||
":v8_libbase",
|
||||
@@ -4681,6 +4692,7 @@ alias(
|
||||
@@ -4700,6 +4731,7 @@ alias(
|
||||
alias(
|
||||
name = "core_lib_icu",
|
||||
actual = "icu/v8",
|
||||
@@ -349,7 +348,7 @@ index 421ebcd..52283ea 100644
|
||||
)
|
||||
|
||||
v8_library(
|
||||
@@ -4732,7 +4744,7 @@ v8_binary(
|
||||
@@ -4751,7 +4783,7 @@ v8_binary(
|
||||
],
|
||||
deps = [
|
||||
":v8_libbase",
|
||||
@@ -358,7 +357,7 @@ index 421ebcd..52283ea 100644
|
||||
],
|
||||
)
|
||||
|
||||
@@ -4772,9 +4784,20 @@ v8_binary(
|
||||
@@ -4791,9 +4823,20 @@ v8_binary(
|
||||
":icu/generated_torque_initializers",
|
||||
":icu/v8_initializers_files",
|
||||
],
|
||||
@@ -380,10 +379,10 @@ index 421ebcd..52283ea 100644
|
||||
}),
|
||||
noicu_deps = [":v8_libshared_noicu"],
|
||||
noicu_srcs = [
|
||||
diff --git a/orig/v8-14.6.202.11/bazel/BUILD.icu b/mod/v8-14.6.202.11/bazel/BUILD.icu
|
||||
index 5fda2f4..9729451 100644
|
||||
--- a/orig/v8-14.6.202.11/bazel/BUILD.icu
|
||||
+++ b/mod/v8-14.6.202.11/bazel/BUILD.icu
|
||||
diff --git a/orig/v8-14.9.207.2/bazel/BUILD.icu b/mod/v8-14.9.207.2/bazel/BUILD.icu
|
||||
index 5fda2f4..8c3c372 100644
|
||||
--- a/orig/v8-14.9.207.2/bazel/BUILD.icu
|
||||
+++ b/mod/v8-14.9.207.2/bazel/BUILD.icu
|
||||
@@ -1,3 +1,24 @@
|
||||
+load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
+
|
||||
@@ -409,7 +408,7 @@ index 5fda2f4..9729451 100644
|
||||
# Copyright 2021 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
@@ -16,15 +37,12 @@
|
||||
@@ -16,15 +37,12 @@ cc_library(
|
||||
]),
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
@@ -427,7 +426,7 @@ index 5fda2f4..9729451 100644
|
||||
data = [":icudata"],
|
||||
defines = [
|
||||
"HAVE_DLOPEN=0",
|
||||
@@ -54,6 +72,7 @@
|
||||
@@ -54,6 +72,7 @@ cc_library(
|
||||
"U_ICUDATAENTRY_IN_COMMON",
|
||||
],
|
||||
tags = ["requires-rtti"],
|
||||
@@ -435,7 +434,7 @@ index 5fda2f4..9729451 100644
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
@@ -65,19 +84,16 @@
|
||||
@@ -65,19 +84,16 @@ cc_library(
|
||||
]),
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
@@ -458,7 +457,7 @@ index 5fda2f4..9729451 100644
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
@@ -93,13 +109,10 @@
|
||||
@@ -93,13 +109,10 @@ cc_library(
|
||||
]),
|
||||
copts = select({
|
||||
"@platforms//os:windows": [
|
||||
@@ -474,7 +473,7 @@ index 5fda2f4..9729451 100644
|
||||
include_prefix = "third_party/icu",
|
||||
local_defines = [
|
||||
"U_COMMON_IMPLEMENTATION",
|
||||
@@ -108,6 +121,6 @@
|
||||
@@ -108,6 +121,6 @@ cc_library(
|
||||
deps = [
|
||||
":icui18n",
|
||||
":icuuc",
|
||||
|
||||
@@ -3,14 +3,25 @@
|
||||
# Scope: upstream MODULE.bazel only; affects external repo resolution and Bazel
|
||||
# module wiring, not V8 source files.
|
||||
|
||||
diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
--- a/orig/v8-14.6.202.11/MODULE.bazel
|
||||
+++ b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
@@ -8,7 +8,65 @@
|
||||
diff --git a/orig/v8-14.9.207.2/MODULE.bazel b/mod/v8-14.9.207.2/MODULE.bazel
|
||||
index b8bf8bd..573f463 100644
|
||||
--- a/orig/v8-14.9.207.2/MODULE.bazel
|
||||
+++ b/mod/v8-14.9.207.2/MODULE.bazel
|
||||
@@ -8,193 +8,67 @@ bazel_dep(name = "rules_cc", version = "0.2.0")
|
||||
bazel_dep(name = "rules_python", version = "1.0.0")
|
||||
bazel_dep(name = "platforms", version = "1.0.0")
|
||||
bazel_dep(name = "abseil-cpp", version = "20250814.0")
|
||||
-bazel_dep(name = "highway", version = "1.2.0")
|
||||
-
|
||||
-pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
||||
-pip.parse(
|
||||
- hub_name = "v8_python_deps",
|
||||
- python_version = "3.11",
|
||||
- requirements_lock = "//:bazel/requirements.txt",
|
||||
- extra_pip_args = [
|
||||
- "--require-hashes",
|
||||
- "--index-url=https://pypi.org/simple",
|
||||
- ],
|
||||
+bazel_dep(name = "rules_license", version = "0.0.4")
|
||||
+
|
||||
+git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
@@ -23,53 +34,9 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
+ sha256 = "7e0be78b8318e8bdbf6fa545d2ecb4c90f947df03f7aadc42c1967f019e63343",
|
||||
+ strip_prefix = "highway-1.2.0",
|
||||
+ urls = ["https://github.com/google/highway/archive/refs/tags/1.2.0.tar.gz"],
|
||||
+)
|
||||
+
|
||||
+git_repository(
|
||||
+ name = "icu",
|
||||
+ build_file = "@v8//:bazel/BUILD.icu",
|
||||
+ commit = "a86a32e67b8d1384b33f8fa48c83a6079b86f8cd",
|
||||
+ patch_cmds = ["find source -name BUILD.bazel | xargs rm"],
|
||||
+ patch_cmds_win = ["Get-ChildItem -Path source -File -Include BUILD.bazel -Recurse | Remove-Item"],
|
||||
+ remote = "https://chromium.googlesource.com/chromium/deps/icu.git",
|
||||
+)
|
||||
+
|
||||
+http_archive(
|
||||
+ name = "fast_float",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "fast_float",\n hdrs = glob(["include/fast_float/*.h"]),\n include_prefix = "third_party/fast_float/src/include",\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ sha256 = "e14a33089712b681d74d94e2a11362643bd7d769ae8f7e7caefe955f57f7eacd",
|
||||
+ strip_prefix = "fast_float-8.0.2",
|
||||
+ urls = ["https://github.com/fastfloat/fast_float/archive/refs/tags/v8.0.2.tar.gz"],
|
||||
+)
|
||||
+
|
||||
+http_archive(
|
||||
+ name = "simdutf",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "simdutf",\n srcs = ["src/simdutf.cpp"],\n hdrs = glob(["include/**/*.h"]),\n textual_hdrs = glob(["src/**/*.h", "src/**/*.cpp"], exclude = ["src/simdutf.cpp"]),\n copts = ["-std=c++20"],\n include_prefix = "third_party/simdutf",\n includes = ["include", "src"],\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ sha256 = "0180de81a1dd48a87b8c0442ffa81734f3db91a7350914107a449935124e3c6f",
|
||||
+ strip_prefix = "simdutf-7.7.0",
|
||||
+ urls = ["https://github.com/simdutf/simdutf/archive/refs/tags/v7.7.0.tar.gz"],
|
||||
+)
|
||||
+
|
||||
+git_repository(
|
||||
+ name = "dragonbox",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "dragonbox",\n hdrs = ["include/dragonbox/dragonbox.h"],\n include_prefix = "third_party/dragonbox/src/include",\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ commit = "beeeef91cf6fef89a4d4ba5e95d47ca64ccb3a44",
|
||||
+ remote = "https://chromium.googlesource.com/external/github.com/jk-jeon/dragonbox.git",
|
||||
+)
|
||||
+
|
||||
+git_repository(
|
||||
+ name = "fp16",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "fp16",\n hdrs = glob(["include/**/*.h"]),\n include_prefix = "third_party/fp16/src/include",\n includes = ["include"],\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ commit = "3d2de1816307bac63c16a297e8c4dc501b4076df",
|
||||
+ remote = "https://chromium.googlesource.com/external/github.com/Maratyszcza/FP16.git",
|
||||
+)
|
||||
|
||||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
||||
pip.parse(
|
||||
@@ -22,171 +80,3 @@
|
||||
)
|
||||
use_repo(pip, "v8_python_deps")
|
||||
|
||||
-use_repo(pip, "v8_python_deps")
|
||||
-
|
||||
-# Define the local LLVM toolchain repository
|
||||
-llvm_toolchain_repository = use_repo_rule("//bazel/toolchain:llvm_repository.bzl", "llvm_toolchain_repository")
|
||||
-
|
||||
@@ -77,8 +44,9 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
- name = "llvm_toolchain",
|
||||
- path = "third_party/llvm-build/Release+Asserts",
|
||||
- config_file_content = """
|
||||
-load("@rules_cc//cc:defs.bzl", "CcToolchainConfigInfo", "cc_common")
|
||||
-load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool_path")
|
||||
-
|
||||
|
||||
-def _impl(ctx):
|
||||
- tool_paths = [
|
||||
- tool_path(name = "gcc", path = "bin/clang"),
|
||||
@@ -157,6 +125,7 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
-
|
||||
- return cc_common.create_cc_toolchain_config_info(
|
||||
- ctx = ctx,
|
||||
- toolchain_identifier = "local_clang",
|
||||
- features = features,
|
||||
- cxx_builtin_include_directories = [
|
||||
- "{WORKSPACE_ROOT}/buildtools/third_party/libc++",
|
||||
@@ -169,7 +138,6 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
- "{WORKSPACE_ROOT}/build/linux/debian_bullseye_amd64-sysroot/usr/include",
|
||||
- "{WORKSPACE_ROOT}/build/linux/debian_bullseye_amd64-sysroot/usr/local/include",
|
||||
- ],
|
||||
- toolchain_identifier = "local_clang",
|
||||
- host_system_name = "local",
|
||||
- target_system_name = "local",
|
||||
- target_cpu = "k8",
|
||||
@@ -184,18 +152,32 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
- implementation = _impl,
|
||||
- attrs = {},
|
||||
- provides = [CcToolchainConfigInfo],
|
||||
-)
|
||||
+git_repository(
|
||||
+ name = "icu",
|
||||
+ build_file = "@v8//:bazel/BUILD.icu",
|
||||
+ commit = "a86a32e67b8d1384b33f8fa48c83a6079b86f8cd",
|
||||
+ patch_cmds = ["find source -name BUILD.bazel | xargs rm"],
|
||||
+ patch_cmds_win = ["Get-ChildItem -Path source -File -Include BUILD.bazel -Recurse | Remove-Item"],
|
||||
+ remote = "https://chromium.googlesource.com/chromium/deps/icu.git",
|
||||
)
|
||||
-""",
|
||||
- build_file_content = """
|
||||
-load("@rules_cc//cc:defs.bzl", "cc_toolchain")
|
||||
-load(":cc_toolchain_config.bzl", "cc_toolchain_config")
|
||||
-
|
||||
-package(default_visibility = ["//visibility:public"])
|
||||
-
|
||||
|
||||
-filegroup(
|
||||
- name = "all_files",
|
||||
- srcs = glob(["**/*"]),
|
||||
-)
|
||||
-
|
||||
+http_archive(
|
||||
+ name = "fast_float",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "fast_float",\n hdrs = glob(["include/fast_float/*.h"]),\n include_prefix = "third_party/fast_float/src/include",\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ sha256 = "e14a33089712b681d74d94e2a11362643bd7d769ae8f7e7caefe955f57f7eacd",
|
||||
+ strip_prefix = "fast_float-8.0.2",
|
||||
+ urls = ["https://github.com/fastfloat/fast_float/archive/refs/tags/v8.0.2.tar.gz"],
|
||||
)
|
||||
|
||||
-filegroup(name = "empty")
|
||||
-
|
||||
-cc_toolchain_config(name = "k8_toolchain_config")
|
||||
@@ -212,8 +194,14 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
- supports_param_files = 0,
|
||||
- toolchain_config = ":k8_toolchain_config",
|
||||
- toolchain_identifier = "local_clang",
|
||||
-)
|
||||
-
|
||||
+http_archive(
|
||||
+ name = "simdutf",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "simdutf",\n srcs = ["src/simdutf.cpp"],\n hdrs = glob(["include/**/*.h"]),\n textual_hdrs = glob(["src/**/*.h", "src/**/*.cpp"], exclude = ["src/simdutf.cpp"]),\n copts = ["-std=c++20"],\n include_prefix = "third_party/simdutf",\n includes = ["include", "src"],\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ sha256 = "0180de81a1dd48a87b8c0442ffa81734f3db91a7350914107a449935124e3c6f",
|
||||
+ strip_prefix = "simdutf-7.7.0",
|
||||
+ urls = ["https://github.com/simdutf/simdutf/archive/refs/tags/v7.7.0.tar.gz"],
|
||||
)
|
||||
|
||||
-toolchain(
|
||||
- name = "cc_toolchain_k8",
|
||||
- exec_compatible_with = [
|
||||
@@ -228,8 +216,13 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
- toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
|
||||
-)
|
||||
-""",
|
||||
-)
|
||||
-
|
||||
+git_repository(
|
||||
+ name = "dragonbox",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "dragonbox",\n hdrs = ["include/dragonbox/dragonbox.h"],\n include_prefix = "third_party/dragonbox/src/include",\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ commit = "beeeef91cf6fef89a4d4ba5e95d47ca64ccb3a44",
|
||||
+ remote = "https://chromium.googlesource.com/external/github.com/jk-jeon/dragonbox.git",
|
||||
)
|
||||
|
||||
-register_toolchains("@llvm_toolchain//:cc_toolchain_k8")
|
||||
-
|
||||
-# Define local repository for libc++ from third_party sources
|
||||
@@ -237,11 +230,33 @@ diff --git a/orig/v8-14.6.202.11/MODULE.bazel b/mod/v8-14.6.202.11/MODULE.bazel
|
||||
-
|
||||
-libcxx_repository(
|
||||
- name = "libcxx",
|
||||
-)
|
||||
diff --git a/orig/v8-14.6.202.11/bazel/highway.patch b/mod/v8-14.6.202.11/bazel/highway.patch
|
||||
+git_repository(
|
||||
+ name = "fp16",
|
||||
+ build_file_content = 'load("@rules_cc//cc:defs.bzl", "cc_library")\n\ncc_library(\n name = "fp16",\n hdrs = glob(["include/**/*.h"]),\n include_prefix = "third_party/fp16/src/include",\n includes = ["include"],\n strip_include_prefix = "include",\n visibility = ["//visibility:public"],\n)\n',
|
||||
+ commit = "3d2de1816307bac63c16a297e8c4dc501b4076df",
|
||||
+ remote = "https://chromium.googlesource.com/external/github.com/Maratyszcza/FP16.git",
|
||||
)
|
||||
|
||||
-single_version_override(
|
||||
- module_name = "highway",
|
||||
- patches = ["//bazel/patches:highway_rules_cc.patch"],
|
||||
- patch_strip = 1,
|
||||
+pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
||||
+pip.parse(
|
||||
+ hub_name = "v8_python_deps",
|
||||
+ python_version = "3.11",
|
||||
+ requirements_lock = "//:bazel/requirements.txt",
|
||||
+ extra_pip_args = [
|
||||
+ "--require-hashes",
|
||||
+ "--index-url=https://pypi.org/simple",
|
||||
+ ],
|
||||
)
|
||||
+use_repo(pip, "v8_python_deps")
|
||||
diff --git a/mod/v8-14.9.207.2/bazel/highway.patch b/mod/v8-14.9.207.2/bazel/highway.patch
|
||||
new file mode 100644
|
||||
index 0000000..5a13dd0
|
||||
--- /dev/null
|
||||
+++ b/mod/v8-14.6.202.11/bazel/highway.patch
|
||||
+++ b/mod/v8-14.9.207.2/bazel/highway.patch
|
||||
@@ -0,0 +1,25 @@
|
||||
+diff --git a/BUILD b/BUILD
|
||||
+--- a/BUILD
|
||||
@@ -249,22 +264,22 @@ new file mode 100644
|
||||
+@@ -2,7 +2,7 @@
|
||||
+ load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
+ load("@rules_license//rules:license.bzl", "license")
|
||||
+
|
||||
+
|
||||
+-load("@rules_cc//cc:defs.bzl", "cc_test")
|
||||
++load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
||||
+ # Placeholder#2 for Guitar, do not remove
|
||||
+
|
||||
+
|
||||
+ package(
|
||||
+@@ -134,11 +134,7 @@ COPTS = select({
|
||||
+ ],
|
||||
+ })
|
||||
+
|
||||
+
|
||||
+-DEFINES = select({
|
||||
+- ":compiler_msvc": ["HWY_SHARED_DEFINE"],
|
||||
+- ":compiler_clangcl": ["HWY_SHARED_DEFINE"],
|
||||
+- "//conditions:default": [],
|
||||
+-})
|
||||
++DEFINES = []
|
||||
+
|
||||
+
|
||||
+ # Unused on Bazel builds, where this is not defined/known; Copybara replaces
|
||||
+ # usages with an empty list.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
# Scope: minimal source-level portability fixes only, such as libexecinfo guards,
|
||||
# weak glibc symbol handling, and warning annotations; no dependency
|
||||
# include-path rewrites or intentional V8 feature changes.
|
||||
diff --git a/orig/v8-14.6.202.11/src/base/bits.h b/mod/v8-14.6.202.11/src/base/bits.h
|
||||
diff --git a/orig/v8-14.9.207.2/src/base/bits.h b/mod/v8-14.9.207.2/src/base/bits.h
|
||||
index 179a10f..4791e96 100644
|
||||
--- a/orig/v8-14.6.202.11/src/base/bits.h
|
||||
+++ b/mod/v8-14.6.202.11/src/base/bits.h
|
||||
--- a/orig/v8-14.9.207.2/src/base/bits.h
|
||||
+++ b/mod/v8-14.9.207.2/src/base/bits.h
|
||||
@@ -270,11 +270,17 @@ inline constexpr uint32_t RoundDownToPowerOfTwo32(uint32_t value) {
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ index 179a10f..4791e96 100644
|
||||
inline constexpr uint32_t RotateLeft32(uint32_t value, uint32_t shift) {
|
||||
return (value << shift) | (value >> ((32 - shift) & 31));
|
||||
}
|
||||
diff --git a/orig/v8-14.6.202.11/src/base/debug/stack_trace_posix.cc b/mod/v8-14.6.202.11/src/base/debug/stack_trace_posix.cc
|
||||
diff --git a/orig/v8-14.9.207.2/src/base/debug/stack_trace_posix.cc b/mod/v8-14.9.207.2/src/base/debug/stack_trace_posix.cc
|
||||
index 6176ed4..a02043d 100644
|
||||
--- a/orig/v8-14.6.202.11/src/base/debug/stack_trace_posix.cc
|
||||
+++ b/mod/v8-14.6.202.11/src/base/debug/stack_trace_posix.cc
|
||||
--- a/orig/v8-14.9.207.2/src/base/debug/stack_trace_posix.cc
|
||||
+++ b/mod/v8-14.9.207.2/src/base/debug/stack_trace_posix.cc
|
||||
@@ -64,6 +64,7 @@ namespace {
|
||||
volatile sig_atomic_t in_signal_handler = 0;
|
||||
bool dump_stack_in_signal_handler = true;
|
||||
@@ -44,10 +44,10 @@ index 6176ed4..a02043d 100644
|
||||
// Demangles C++ symbols in the given text. Example:
|
||||
//
|
||||
// "out/Debug/base_unittests(_ZN10StackTraceC1Ev+0x20) [0x817778c]"
|
||||
diff --git a/orig/v8-14.6.202.11/src/base/export-template.h b/mod/v8-14.6.202.11/src/base/export-template.h
|
||||
diff --git a/orig/v8-14.9.207.2/src/base/export-template.h b/mod/v8-14.9.207.2/src/base/export-template.h
|
||||
index 861cfe4..1e73954 100644
|
||||
--- a/orig/v8-14.6.202.11/src/base/export-template.h
|
||||
+++ b/mod/v8-14.6.202.11/src/base/export-template.h
|
||||
--- a/orig/v8-14.9.207.2/src/base/export-template.h
|
||||
+++ b/mod/v8-14.9.207.2/src/base/export-template.h
|
||||
@@ -153,8 +153,10 @@
|
||||
|
||||
EXPORT_TEMPLATE_TEST(DEFAULT, );
|
||||
@@ -59,10 +59,10 @@ index 861cfe4..1e73954 100644
|
||||
|
||||
#undef EXPORT_TEMPLATE_TEST
|
||||
#undef EXPORT_TEMPLATE_TEST_DEFAULT_DEFAULT
|
||||
diff --git a/orig/v8-14.6.202.11/src/base/platform/platform-posix.cc b/mod/v8-14.6.202.11/src/base/platform/platform-posix.cc
|
||||
index 420df0b..6f47969 100644
|
||||
--- a/orig/v8-14.6.202.11/src/base/platform/platform-posix.cc
|
||||
+++ b/mod/v8-14.6.202.11/src/base/platform/platform-posix.cc
|
||||
diff --git a/orig/v8-14.9.207.2/src/base/platform/platform-posix.cc b/mod/v8-14.9.207.2/src/base/platform/platform-posix.cc
|
||||
index dfb30b6..6ce12a5 100644
|
||||
--- a/orig/v8-14.9.207.2/src/base/platform/platform-posix.cc
|
||||
+++ b/mod/v8-14.9.207.2/src/base/platform/platform-posix.cc
|
||||
@@ -95,7 +95,7 @@ extern int madvise(caddr_t, size_t, int);
|
||||
#endif
|
||||
|
||||
@@ -82,10 +82,10 @@ index 420df0b..6f47969 100644
|
||||
DCHECK(MainThreadIsCurrentThread());
|
||||
return __libc_stack_end;
|
||||
}
|
||||
diff --git a/orig/v8-14.6.202.11/src/base/platform/platform-win32.cc b/mod/v8-14.6.202.11/src/base/platform/platform-win32.cc
|
||||
index f5d9ddc..1c08b0f 100644
|
||||
--- a/orig/v8-14.6.202.11/src/base/platform/platform-win32.cc
|
||||
+++ b/mod/v8-14.6.202.11/src/base/platform/platform-win32.cc
|
||||
diff --git a/orig/v8-14.9.207.2/src/base/platform/platform-win32.cc b/mod/v8-14.9.207.2/src/base/platform/platform-win32.cc
|
||||
index 11f9772..854a682 100644
|
||||
--- a/orig/v8-14.9.207.2/src/base/platform/platform-win32.cc
|
||||
+++ b/mod/v8-14.9.207.2/src/base/platform/platform-win32.cc
|
||||
@@ -20,7 +20,11 @@
|
||||
#include <windows.h>
|
||||
|
||||
@@ -98,7 +98,7 @@ index f5d9ddc..1c08b0f 100644
|
||||
#include <dbghelp.h> // For SymLoadModule64 and al.
|
||||
#include <malloc.h> // For _msize()
|
||||
#include <mmsystem.h> // For timeGetTime().
|
||||
@@ -69,9 +69,7 @@ static_assert(offsetof(V8_CRITICAL_SECTION, SpinCount) ==
|
||||
@@ -69,9 +73,7 @@ static_assert(offsetof(V8_CRITICAL_SECTION, SpinCount) ==
|
||||
// Extra functions for MinGW. Most of these are the _s functions which are in
|
||||
// the Microsoft Visual Studio C++ CRT.
|
||||
#ifdef __MINGW32__
|
||||
@@ -109,7 +109,7 @@ index f5d9ddc..1c08b0f 100644
|
||||
|
||||
#define _TRUNCATE 0
|
||||
#define STRUNCATE 80
|
||||
@@ -81,9 +79,6 @@ inline void MemoryFence() {
|
||||
@@ -81,9 +83,6 @@ inline void MemoryFence() {
|
||||
__asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ index f5d9ddc..1c08b0f 100644
|
||||
int localtime_s(tm* out_tm, const time_t* time) {
|
||||
tm* posix_local_time_struct = localtime_r(time, out_tm);
|
||||
if (posix_local_time_struct == nullptr) return 1;
|
||||
@@ -134,6 +129,8 @@ int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {
|
||||
@@ -134,6 +133,8 @@ int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index f5d9ddc..1c08b0f 100644
|
||||
#endif // __MINGW32__
|
||||
|
||||
namespace v8 {
|
||||
@@ -743,8 +740,10 @@ void OS::StrNCpy(char* dest, int length, const char* src, size_t n) {
|
||||
@@ -743,8 +744,10 @@ void OS::StrNCpy(char* dest, int length, const char* src, size_t n) {
|
||||
}
|
||||
|
||||
|
||||
@@ -139,15 +139,15 @@ index f5d9ddc..1c08b0f 100644
|
||||
|
||||
DEFINE_LAZY_LEAKY_OBJECT_GETTER(RandomNumberGenerator,
|
||||
GetPlatformRandomNumberGenerator)
|
||||
@@ -1894,3 +1893,4 @@ Stack::StackSlot Stack::GetCurrentStackPosition() {
|
||||
@@ -1943,3 +1946,4 @@ Stack::StackSlot Stack::GetCurrentStackPosition() {
|
||||
|
||||
} // namespace base
|
||||
} // namespace v8
|
||||
+
|
||||
diff --git a/orig/v8-14.6.202.11/src/base/platform/time.cc b/mod/v8-14.6.202.11/src/base/platform/time.cc
|
||||
index 8390288..cba6cd5 100644
|
||||
--- a/orig/v8-14.6.202.11/src/base/platform/time.cc
|
||||
+++ b/mod/v8-14.6.202.11/src/base/platform/time.cc
|
||||
diff --git a/orig/v8-14.9.207.2/src/base/platform/time.cc b/mod/v8-14.9.207.2/src/base/platform/time.cc
|
||||
index 8c824e3..f8144d0 100644
|
||||
--- a/orig/v8-14.9.207.2/src/base/platform/time.cc
|
||||
+++ b/mod/v8-14.9.207.2/src/base/platform/time.cc
|
||||
@@ -782,12 +782,12 @@ bool ThreadTicks::IsSupported() {
|
||||
#elif defined(__PASE__)
|
||||
// Thread CPU time accounting is unavailable in PASE
|
||||
@@ -179,10 +179,10 @@ index 8390288..cba6cd5 100644
|
||||
#else
|
||||
UNREACHABLE();
|
||||
#endif
|
||||
diff --git a/orig/v8-14.6.202.11/src/heap/base/asm/x64/push_registers_masm.asm b/mod/v8-14.6.202.11/src/heap/base/asm/x64/push_registers_masm.asm
|
||||
index d0d0563..72e230b 100644
|
||||
--- a/orig/v8-14.6.202.11/src/heap/base/asm/x64/push_registers_masm.asm
|
||||
+++ b/mod/v8-14.6.202.11/src/heap/base/asm/x64/push_registers_masm.asm
|
||||
diff --git a/orig/v8-14.9.207.2/src/heap/base/asm/x64/push_registers_masm.asm b/mod/v8-14.9.207.2/src/heap/base/asm/x64/push_registers_masm.asm
|
||||
index d0d0563..f3f5952 100644
|
||||
--- a/orig/v8-14.9.207.2/src/heap/base/asm/x64/push_registers_masm.asm
|
||||
+++ b/mod/v8-14.9.207.2/src/heap/base/asm/x64/push_registers_masm.asm
|
||||
@@ -1,70 +1,47 @@
|
||||
-;; Copyright 2020 the V8 project authors. All rights reserved.
|
||||
-;; Use of this source code is governed by a BSD-style license that can be
|
||||
@@ -301,10 +301,10 @@ index d0d0563..72e230b 100644
|
||||
+ pop %rbp
|
||||
+ ret
|
||||
+.seh_endproc
|
||||
diff --git a/orig/v8-14.6.202.11/src/libplatform/default-thread-isolated-allocator.cc b/mod/v8-14.6.202.11/src/libplatform/default-thread-isolated-allocator.cc
|
||||
diff --git a/orig/v8-14.9.207.2/src/libplatform/default-thread-isolated-allocator.cc b/mod/v8-14.9.207.2/src/libplatform/default-thread-isolated-allocator.cc
|
||||
index bda0e43..b44f1d9 100644
|
||||
--- a/orig/v8-14.6.202.11/src/libplatform/default-thread-isolated-allocator.cc
|
||||
+++ b/mod/v8-14.6.202.11/src/libplatform/default-thread-isolated-allocator.cc
|
||||
--- a/orig/v8-14.9.207.2/src/libplatform/default-thread-isolated-allocator.cc
|
||||
+++ b/mod/v8-14.9.207.2/src/libplatform/default-thread-isolated-allocator.cc
|
||||
@@ -23,7 +23,7 @@ extern int pkey_free(int pkey) V8_WEAK;
|
||||
|
||||
namespace {
|
||||
@@ -314,11 +314,11 @@ index bda0e43..b44f1d9 100644
|
||||
// PKU was broken on Linux kernels before 5.13 (see
|
||||
// https://lore.kernel.org/all/20210623121456.399107624@linutronix.de/).
|
||||
// A fix is also included in the 5.4.182 and 5.10.103 versions ("x86/fpu:
|
||||
diff --git a/orig/v8-14.6.202.11/src/profiler/heap-snapshot-generator.cc b/mod/v8-14.6.202.11/src/profiler/heap-snapshot-generator.cc
|
||||
index 27e748f..cbf886c 100644
|
||||
--- a/orig/v8-14.6.202.11/src/profiler/heap-snapshot-generator.cc
|
||||
+++ b/mod/v8-14.6.202.11/src/profiler/heap-snapshot-generator.cc
|
||||
@@ -429,11 +429,11 @@ HeapSnapshot::HeapSnapshot(HeapProfiler* profiler,
|
||||
diff --git a/orig/v8-14.9.207.2/src/profiler/heap-snapshot-generator.cc b/mod/v8-14.9.207.2/src/profiler/heap-snapshot-generator.cc
|
||||
index 8edad48..d4b2721 100644
|
||||
--- a/orig/v8-14.9.207.2/src/profiler/heap-snapshot-generator.cc
|
||||
+++ b/mod/v8-14.9.207.2/src/profiler/heap-snapshot-generator.cc
|
||||
@@ -478,11 +478,11 @@ HeapSnapshot::HeapSnapshot(HeapProfiler* profiler,
|
||||
static_assert(kSystemPointerSize != 4 || sizeof(HeapGraphEdge) == 12);
|
||||
static_assert(kSystemPointerSize != 8 || sizeof(HeapGraphEdge) == 24);
|
||||
static_assert(kSystemPointerSize != 4 || sizeof(HeapEntry) == 32);
|
||||
@@ -332,7 +332,7 @@ index 27e748f..cbf886c 100644
|
||||
memset(&gc_subroot_entries_, 0, sizeof(gc_subroot_entries_));
|
||||
}
|
||||
|
||||
@@ -3878,3 +3878,4 @@ void HeapSnapshotJSONSerializer::SerializeLocations() {
|
||||
@@ -4015,3 +4015,4 @@ void HeapSnapshotJSONSerializer::SerializeLocations() {
|
||||
}
|
||||
|
||||
} // namespace v8::internal
|
||||
|
||||
Reference in New Issue
Block a user