Skip to content

chore: update V8 to 13.8.258.26 #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,33 @@ build:gcc --action_env=BAZEL_COMPILER=gcc
build:gcc --action_env=CC=gcc
build:gcc --action_env=CXX=g++

# Use Zig C/C++ compiler.
build:zig-cc --incompatible_enable_cc_toolchain_resolution
build:zig-cc --extra_toolchains @zig_sdk//:aarch64-linux-gnu.2.28_toolchain
build:zig-cc --extra_toolchains @zig_sdk//:x86_64-linux-gnu.2.28_toolchain
build:zig-cc --host_copt=-fno-sanitize=undefined

# Use Zig C/C++ compiler (cross-compile to Linux/aarch64).
build:zig-cc-linux-aarch64 --config=zig-cc
build:zig-cc-linux-aarch64 --platforms @zig_sdk//:linux_aarch64_platform
build:zig-cc-linux-aarch64 --run_under=qemu-aarch64-static
build:zig-cc-linux-aarch64 --test_env=QEMU_LD_PREFIX=/usr/aarch64-linux-gnu/
build:hermetic --incompatible_enable_cc_toolchain_resolution
build:hermetic --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build:hermetic --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm

# Use vendored LLVM C/C++ compiler.
build:hermetic-llvm --config=hermetic
build:hermetic-llvm --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-linux

build:hermetic-llvm-macos-x86_64 --config=hermetic
build:hermetic-llvm-macos-x86_64 --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-darwin
# Below flags mitigate https://github.com/bazel-contrib/toolchains_llvm/pull/229.
build:hermetic-llvm-macos-x86_64 --features=-libtool

build:hermetic-llvm --incompatible_enable_cc_toolchain_resolution
build:hermetic-llvm --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build:hermetic-llvm --extra_toolchains @llvm_toolchain//:cc-toolchain-x86_64-linux
build:hermetic-llvm --extra_toolchains @llvm_aarch64//:cc-toolchain-aarch64-linux
build:hermetic-llvm --extra_toolchains @emsdk//emscripten_toolchain:cc-toolchain-wasm

# Use vendored LLVM C/C++ compiler (cross-compile to Linux/aarch64).
build:linux-aarch64-cross --config=hermetic-llvm
build:linux-aarch64-cross --extra_toolchains @llvm_aarch64//:cc-toolchain-aarch64-linux
build:linux-aarch64-cross --platforms @toolchains_llvm//platforms:linux-aarch64
build:linux-aarch64-cross --cxxopt --gcc-install-dir=external/sysroot_linux_arm64/usr/lib/gcc/aarch64-linux-gnu/13/
# Below 2 flags allow tests to be run after cross-compiling.
build:linux-aarch64-cross --test_env=QEMU_LD_PREFIX=/usr/aarch64-linux-gnu/
build:linux-aarch64-cross --run_under=qemu-aarch64-static

build --enable_platform_specific_config

Expand All @@ -86,6 +102,7 @@ build:linux --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
build:macos --cxxopt=-std=c++20 --host_cxxopt=-std=c++20
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"


# Enable symlinks and runfiles on Windows (enabled by default on other platforms).
startup --windows_enable_symlinks
build:windows --enable_runfiles
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
arch: aarch64
action: test
targets: -//test/fuzz/...
flags: --config=zig-cc-linux-aarch64 --@v8//bazel/config:v8_target_cpu=arm64
flags: --config=linux-aarch64-cross --@v8//bazel/config:v8_target_cpu=arm64
deps: qemu-user-static libc6-arm64-cross
cache: true
- name: 'V8 on macOS/x86_64'
Expand All @@ -181,6 +181,7 @@ jobs:
os: macos-13
arch: x86_64
action: test
flags: --config=hermetic-llvm-macos-x86_64
cache: true
- name: 'WAMR interp on Linux/x86_64'
engine: 'wamr-interp'
Expand Down Expand Up @@ -244,7 +245,7 @@ jobs:
os: ubuntu-24.04
arch: aarch64
action: build
flags: --config=zig-cc-linux-aarch64
flags: --config=linux-aarch64-cross
deps: qemu-user-static libc6-arm64-cross
- name: 'Wasmtime on Linux/s390x'
engine: 'wasmtime'
Expand Down
45 changes: 36 additions & 9 deletions bazel/dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel-zig-cc//toolchain:defs.bzl", zig_register_toolchains = "register_toolchains")
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@envoy_toolshed//sysroot:sysroot.bzl", "setup_sysroots")
load("@proxy_wasm_cpp_host//bazel/cargo/wasmsign/remote:crates.bzl", wasmsign_crate_repositories = "crate_repositories")
load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime/remote:crates.bzl", wasmtime_crate_repositories = "crate_repositories")
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
load("@rules_rust//rust:repositories.bzl", "rust_repositories", "rust_repository_set")
load("@toolchains_llvm//toolchain:deps.bzl", "bazel_toolchain_dependencies")
load("@toolchains_llvm//toolchain:rules.bzl", "llvm_toolchain")

def proxy_wasm_cpp_host_dependencies():
# Bazel extensions.
Expand Down Expand Up @@ -52,14 +54,39 @@ def proxy_wasm_cpp_host_dependencies():
)
crate_universe_dependencies(bootstrap = True)

zig_register_toolchains(
version = "0.9.1",
url_format = "https://ziglang.org/download/{version}/zig-{host_platform}-{version}.tar.xz",
host_platform_sha256 = {
"linux-aarch64": "5d99a39cded1870a3fa95d4de4ce68ac2610cca440336cfd252ffdddc2b90e66",
"linux-x86_64": "be8da632c1d3273f766b69244d80669fe4f5e27798654681d77c992f17c237d7",
"macos-aarch64": "8c473082b4f0f819f1da05de2dbd0c1e891dff7d85d2c12b6ee876887d438287",
"macos-x86_64": "2d94984972d67292b55c1eb1c00de46580e9916575d083003546e9a01166754c",
setup_sysroots()
bazel_toolchain_dependencies()
llvm_toolchain(
name = "llvm_toolchain",
llvm_version = "19.1.0",
sha256 = {
"linux-x86_64": "cee77d641690466a193d9b88c89705de1c02bbad46bde6a3b126793c0a0f2923",
"linux-aarch64": "7bb54afd330fe1a1c2d4c593fa1e2dbe2abd9bf34fb3597994ff41e443cf144b",
"darwin-aarch64": "9da86f64a99f5ce9b679caf54e938736ca269c5e069d0c94ad08b995c5f25c16",
"darwin-x86_64": "264f2f1e8b67f066749349ae8b4943d346cd44e099464164ef21b42a57663540",
},
strip_prefix = {
"linux-x86_64": "LLVM-19.1.0-Linux-X64",
"linux-aarch64": "clang+llvm-19.1.0-aarch64-linux-gnu",
"darwin-aarch64": "LLVM-19.1.0-macOS-ARM64",
"darwin-x86_64": "LLVM-19.1.0-macOS-X64",
},
urls = {
"linux-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-Linux-X64.tar.xz"],
"linux-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/clang+llvm-19.1.0-aarch64-linux-gnu.tar.xz"],
"darwin-aarch64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-macOS-ARM64.tar.xz"],
"darwin-x86_64": ["https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.0/LLVM-19.1.0-macOS-X64.tar.xz"],
},
)

llvm_toolchain(
name = "llvm_aarch64",
llvm_version = "19.1.0",
toolchain_roots = {
"": "@llvm_toolchain_llvm//",
},
sysroot = {
"linux-aarch64": "@sysroot_linux_arm64//:sysroot",
},
)

Expand Down
3 changes: 3 additions & 0 deletions bazel/dependencies_import.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@
# limitations under the License.

load("@fuzzing_py_deps//:requirements.bzl", pip_fuzzing_dependencies = "install_deps")
load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains")
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
load("@rules_fuzzing//fuzzing:repositories.bzl", "rules_fuzzing_dependencies")
load("@v8_python_deps//:requirements.bzl", pip_v8_dependencies = "install_deps")

def proxy_wasm_cpp_host_dependencies_import():
llvm_register_toolchains()

rules_foreign_cc_dependencies()
rules_fuzzing_dependencies()

Expand Down
12 changes: 12 additions & 0 deletions bazel/external/dragonbox.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

licenses(["notice"]) # Apache 2

package(default_visibility = ["//visibility:public"])

cc_library(
name = "dragonbox",
srcs = [],
hdrs = ["include/dragonbox/dragonbox.h"],
includes = ["include/"],
)
15 changes: 15 additions & 0 deletions bazel/external/fp16.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

licenses(["notice"]) # MIT

package(default_visibility = ["//visibility:public"])

cc_library(
name = "FP16",
hdrs = [
"include/fp16.h",
"include/fp16/bitcasts.h",
"include/fp16/fp16.h",
],
includes = ["include/"],
)
11 changes: 11 additions & 0 deletions bazel/external/simdutf.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

licenses(["notice"]) # Apache 2

package(default_visibility = ["//visibility:public"])

cc_library(
name = "simdutf",
srcs = ["simdutf.cpp"],
hdrs = ["simdutf.h"],
)
Loading
Loading