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

Support for go mod vendor #60

Merged
merged 4 commits into from
Dec 24, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support for go mod vendor
  • Loading branch information
rogchap committed Dec 23, 2020
commit 41970afb4022ce3fc5dfc4b5d673eeb20833a493
15 changes: 13 additions & 2 deletions cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ package v8go
// #cgo darwin linux CXXFLAGS: -I${SRCDIR}/deps/include
// #cgo LDFLAGS: -pthread -lv8
// #cgo windows LDFLAGS: -lv8_libplatform
// #cgo darwin LDFLAGS: -L${SRCDIR}/deps/darwin-x86_64
// #cgo linux LDFLAGS: -L${SRCDIR}/deps/linux-x86_64
// #cgo darwin LDFLAGS: -L${SRCDIR}/deps/darwin_x86_64
// #cgo linux LDFLAGS: -L${SRCDIR}/deps/linux_x86_64
import "C"

// These imports forces `go mod vendor` to pull in all the folders that
// contain V8 libraries and headers which otherwise would be ignored.
// DO NOT REMOVE
import (
_ "rogchap.com/v8go/deps/darwin_x86_64"
_ "rogchap.com/v8go/deps/include"
_ "rogchap.com/v8go/deps/include/cppgc"
_ "rogchap.com/v8go/deps/include/libplatform"
_ "rogchap.com/v8go/deps/linux_x86_64"
)
File renamed without changes.
3 changes: 3 additions & 0 deletions deps/darwin_x86_64/vendor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package darwin_x86_64 is required to provide support for vendoring modules
// DO NOT REMOVE
package darwin_x86_64
3 changes: 3 additions & 0 deletions deps/include/cppgc/vendor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package cppgc is required to provide support for vendoring modules
// DO NOT REMOVE
package cppgc
3 changes: 3 additions & 0 deletions deps/include/libplatform/vendor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package libplatform is required to provide support for vendoring modules
// DO NOT REMOVE
package libplatform
3 changes: 3 additions & 0 deletions deps/include/vendor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package include is required to provide support for vendoring modules
// DO NOT REMOVE
package include
File renamed without changes.
3 changes: 3 additions & 0 deletions deps/linux_x86_64/vendor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Package linux_x86_64 is required to provide support for vendoring modules
// DO NOT REMOVE
package linux_x86_64
Empty file added go.sum
Empty file.