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 for linux/armhf architecture #1

Open
wants to merge 1 commit into
base: feat/arm64
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/v8build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
arch: [arm64, x64]
arch: [arm, arm64, x64]
exclude:
- platform: macos-latest
arch: arm
- platform: macos-latest
arch: arm64
runs-on: ${{ matrix.platform }}
Expand All @@ -22,6 +24,9 @@ jobs:
- name: Install g++ (arm64)
if: matrix.arch == 'arm64'
run: sudo apt-get update && sudo apt-get install -y g++-aarch64-linux-gnu
- name: Install g++ (arm)
if: matrix.arch == 'arm'
run: sudo apt-get update && sudo apt-get install -y g++-arm-linux-gnueabihf
- name: Build V8 linux/${{ matrix.arch }}
if: matrix.platform == 'ubuntu-latest'
run: cd deps && ./build.py --no-clang --arch=${{ matrix.arch }}
Expand Down
2 changes: 2 additions & 0 deletions cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package v8go
// #cgo windows LDFLAGS: -lv8_libplatform
// #cgo darwin LDFLAGS: -L${SRCDIR}/deps/darwin_x64
// #cgo linux,amd64 LDFLAGS: -L${SRCDIR}/deps/linux_x64
// #cgo linux,arm LDFLAGS: -L${SRCDIR}/deps/linux_arm
// #cgo linux,arm64 LDFLAGS: -L${SRCDIR}/deps/linux_arm64
import "C"

Expand All @@ -23,6 +24,7 @@ import (
_ "rogchap.com/v8go/deps/include"
_ "rogchap.com/v8go/deps/include/cppgc"
_ "rogchap.com/v8go/deps/include/libplatform"
_ "rogchap.com/v8go/deps/linux_arm"
_ "rogchap.com/v8go/deps/linux_arm64"
_ "rogchap.com/v8go/deps/linux_x64"
)
3 changes: 3 additions & 0 deletions deps/linux_arm/vendor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package linux_arm is required to provide support for vendoring modules
// DO NOT REMOVE
package linux_arm