-
-
Notifications
You must be signed in to change notification settings - Fork 221
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 Apple Silicon #202
Changes from 10 commits
8394753
de01fba
e59012b
960dec5
89d7ee9
0e4fe11
567e50b
e063528
f3289dd
bfcd56f
f4c24fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,10 +12,13 @@ jobs: | |
name: Tests on ${{ matrix.go-version }} ${{ matrix.platform }} | ||
strategy: | ||
matrix: | ||
go-version: [1.12.17, 1.16.4] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
go-version: [1.16.8, 1.17.1] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Github is showing "Some checks haven’t completed yet", but then lists the status for Go versions that were updated here to no longer run:
This is blocking me from merging. @rogchap you could do the merge to workaround this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, it looks like the github branch protection rules for the repo need to be updated, since the name of these CI jobs has changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can fix this. |
||
# We use macos-11 over macos-latest because macos-latest defaults to Catalina(10.15) and not Big Sur(11.0) | ||
# We can switch to macos-latest whenever Big Sur becomes the default | ||
# See https://github.com/actions/virtual-environments#available-environments | ||
platform: [ubuntu-latest, macos-11, windows-latest] | ||
epk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ package v8go | |
|
||
// #cgo CXXFLAGS: -fno-rtti -fpic -std=c++14 -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -I${SRCDIR}/deps/include | ||
// #cgo LDFLAGS: -pthread -lv8 | ||
// #cgo darwin LDFLAGS: -L${SRCDIR}/deps/darwin_x86_64 | ||
// #cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/deps/darwin_x86_64 | ||
// #cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/deps/darwin_arm64 | ||
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
// #cgo linux LDFLAGS: -L${SRCDIR}/deps/linux_x86_64 | ||
// #cgo windows LDFLAGS: -L${SRCDIR}/deps/windows_x86_64 -static -ldbghelp -lssp -lwinmm -lz | ||
import "C" | ||
|
@@ -17,6 +18,7 @@ import "C" | |
// contain V8 libraries and headers which otherwise would be ignored. | ||
// DO NOT REMOVE | ||
import ( | ||
_ "rogchap.com/v8go/deps/darwin_arm64" | ||
_ "rogchap.com/v8go/deps/darwin_x86_64" | ||
_ "rogchap.com/v8go/deps/include" | ||
_ "rogchap.com/v8go/deps/linux_x86_64" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Package darwin_arm64 is required to provide support for vendoring modules | ||
// DO NOT REMOVE | ||
package darwin_arm64 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module rogchap.com/v8go | ||
|
||
go 1.12 | ||
go 1.16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Likely a good idea to update to minimum of 1.16; but just making sure this will be ok for others? @dylanahsmith There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are on 1.17. I think we should support what Go itself supports, so 👍 to this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we missing the
arch
values for this pipeline?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't test against
darwin/arm64
without access to a M1 action runner