deps: rebuild V8 without sandbox (enables zero-copy ArrayBuffer)#7
Open
yneves wants to merge 5 commits into
Open
deps: rebuild V8 without sandbox (enables zero-copy ArrayBuffer)#7yneves wants to merge 5 commits into
yneves wants to merge 5 commits into
Conversation
Rebuilt from V8 commit 5297e56d91816747d539abca52b578e5832135f0
with v8_enable_sandbox=false for all 4 platforms:
- linux/amd64 (CI)
- linux/arm64 (CI cross-compile with sysroot + custom libcxx)
- darwin/arm64 (CI)
- darwin/amd64 (local cross-compile from arm64)
Removes -DV8_ENABLE_SANDBOX from cgo.go so NewArrayBufferExternal
uses the true zero-copy path (no memcpy fallback).
Adds local dep modules under deps/{os}_{arch}/ with replace
directives in go.mod.
GNU ld on Ubuntu rejects llvm-ar's 64-bit symbol table format
when using -L/-l flags ('skipping incompatible'). Pass archives
as direct paths instead, which forces the linker to read them
regardless of symbol table format.
V8's clang enables ThinLTO by default in release builds, producing LLVM bitcode objects that GNU ld cannot link. Add use_thin_lto=false to both the CI workflow and local build script.
llvm-ar produces archives in a format GNU ld cannot read
('unknown architecture'). Use system ar for Linux targets
which produces compatible GNU-format archives.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v8_enable_sandbox=false-DV8_ENABLE_SANDBOXfromcgo.godeps/{os}_{arch}/with replace directivesSandboxEnabled()now returnsfalseNewArrayBufferExternaluses true zero-copy (no memcpy fallback)Build sources
Test plan
go test ./...)TestNewArrayBufferExternal_SharedMemoryno longer skippedTestNewArrayBufferExternal_JSWritesGoMemoryno longer skipped