Skip to content
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

Build v8 for linux_arm64 #223

Merged
merged 3 commits into from Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/v8build.yml
Expand Up @@ -16,9 +16,6 @@ jobs:
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
platform: [ubuntu-18.04, macos-11]
arch: [x86_64, arm64]
exclude:
- platform: ubuntu-18.04
arch: arm64
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
Expand All @@ -29,6 +26,9 @@ jobs:
- name: Update depot_tools fetch config
run: cd deps/depot_tools && git config --unset-all remote.origin.fetch; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
shell: bash
- name: Install g++-aarch64-linux-gnu
if: matrix.platform == 'ubuntu-18.04' && matrix.arch == 'arm64'
run: sudo apt update && sudo apt install g++-aarch64-linux-gnu -y
- name: Build V8 linux
if: matrix.platform == 'ubuntu-18.04'
run: cd deps && ./build.py --no-clang --arch ${{ matrix.arch }}
Expand Down
4 changes: 3 additions & 1 deletion cgo.go
Expand Up @@ -10,7 +10,8 @@ package v8go
// #cgo LDFLAGS: -pthread -lv8
// #cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/deps/darwin_x86_64
// #cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/deps/darwin_arm64
// #cgo linux LDFLAGS: -L${SRCDIR}/deps/linux_x86_64 -ldl
// #cgo linux,amd64 LDFLAGS: -L${SRCDIR}/deps/linux_x86_64 -ldl
// #cgo linux,arm64 LDFLAGS: -L${SRCDIR}/deps/linux_arm64 -ldl
import "C"

// These imports forces `go mod vendor` to pull in all the folders that
Expand All @@ -20,5 +21,6 @@ import (
_ "rogchap.com/v8go/deps/darwin_arm64"
_ "rogchap.com/v8go/deps/darwin_x86_64"
_ "rogchap.com/v8go/deps/include"
_ "rogchap.com/v8go/deps/linux_arm64"
_ "rogchap.com/v8go/deps/linux_x86_64"
)
2 changes: 1 addition & 1 deletion deps/depot_tools
Submodule depot_tools updated from 85d7fe to db41ee
Binary file added deps/linux_arm64/libv8.a
Binary file not shown.
3 changes: 3 additions & 0 deletions deps/linux_arm64/vendor.go
@@ -0,0 +1,3 @@
// Package linux_arm64 is required to provide support for vendoring modules
// DO NOT REMOVE
package linux_arm64