Skip to content

Commit 02e1763

Browse files
authored
Upgrade V8 binaries for 10.9.194.9 version **working** (#363)
* Upgrade V8 binaries for 10.9.194.9 version * Fixes to support newest stable v8. - Update github workflow to use go 18 & 19 - Update github workflow to use macos-latest - Update github build workflow to use ubuntu 22.04 - Add gitignore for jetbrains and .gclient_previous files - Switch cgo build to C++17 and enable sandbox at build time - Update test with update to date error message - Remove no longer supported build flag. - Move initialization to v8go.go and include flag set to avoid flag freezing - Reorder initialization so allocator is initialized after v8 (required by latest v8) * Update V8 static library for macos-11 x86_64 * Update V8 static library for ubuntu-22.04 x86_64 * Update V8 static library for macos-11 arm64 * Update V8 static library for ubuntu-22.04 arm64 * Update changelog and remove no-longer valid comment --------- Co-authored-by: jacques-n <[email protected]>
1 parent 7d843f1 commit 02e1763

File tree

101 files changed

+3954
-1813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+3954
-1813
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ jobs:
1212
name: Tests on ${{ matrix.go-version }} ${{ matrix.platform }}
1313
strategy:
1414
matrix:
15-
go-version: [1.16.8, 1.17.1]
16-
# We use macos-11 over macos-latest because macos-latest defaults to Catalina(10.15) and not Big Sur(11.0)
17-
# We can switch to macos-latest whenever Big Sur becomes the default
18-
# See https://github.com/actions/virtual-environments#available-environments
19-
platform: [ubuntu-latest, macos-11]
15+
go-version: [1.18.10, 1.19.5]
16+
platform: [ubuntu-latest, macos-latest]
2017
runs-on: ${{ matrix.platform }}
2118

2219
steps:

.github/workflows/v8build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
#
1515
# We need xcode 12.4 or newer to cross compile between arm64/amd64
1616
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
17-
platform: [ubuntu-18.04, macos-11]
17+
platform: [ubuntu-22.04, macos-11]
1818
arch: [x86_64, arm64]
1919
runs-on: ${{ matrix.platform }}
2020
steps:
@@ -27,10 +27,10 @@ jobs:
2727
run: cd deps/depot_tools && git config --unset-all remote.origin.fetch; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
2828
shell: bash
2929
- name: Install g++-aarch64-linux-gnu
30-
if: matrix.platform == 'ubuntu-18.04' && matrix.arch == 'arm64'
30+
if: matrix.platform == 'ubuntu-22.04' && matrix.arch == 'arm64'
3131
run: sudo apt update && sudo apt install g++-aarch64-linux-gnu -y
3232
- name: Build V8 linux
33-
if: matrix.platform == 'ubuntu-18.04'
33+
if: matrix.platform == 'ubuntu-22.04'
3434
run: cd deps && ./build.py --no-clang --arch ${{ matrix.arch }}
3535
- name: Build V8 macOS
3636
if: matrix.platform == 'macos-11'

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.gclient_entries
77

88
deps/darwin-x86_64/libv8_debug.a
9-
9+
deps/.gclient_previous*
1010
c.out
11-
11+
.idea/*
1212
/v8go.test

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Fixed
1313
- Use string length to ensure null character-containing strings in Go/JS are not terminated early.
1414
- Object.Set with an empty key string is now supported
15+
- Upgrade to V8 10.9.194.9
16+
- Upgrade V8 build OS to Ubuntu 22.04
1517

1618
## [v0.7.0] - 2021-12-09
1719

cgo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package v8go
66

77
//go:generate clang-format -i --verbose -style=Chromium v8go.h v8go.cc
88

9-
// #cgo CXXFLAGS: -fno-rtti -fPIC -std=c++14 -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -I${SRCDIR}/deps/include -Wall
9+
// #cgo CXXFLAGS: -fno-rtti -fPIC -std=c++17 -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -I${SRCDIR}/deps/include -Wall -DV8_ENABLE_SANDBOX
1010
// #cgo LDFLAGS: -pthread -lv8
1111
// #cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/deps/darwin_x86_64
1212
// #cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/deps/darwin_arm64

0 commit comments

Comments
 (0)