Skip to content

Commit

Permalink
Add static build when tag "static_build" is used
Browse files Browse the repository at this point in the history
  • Loading branch information
yaslama committed Jun 11, 2019
1 parent b212e98 commit c66da3c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion wasmer/bridge.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package wasmer

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lwasmer_runtime_c_api
// #include "./wasmer.h"
//
import "C"
Expand Down
Binary file added wasmer/libwasmer_runtime_c_api.a
Binary file not shown.
6 changes: 6 additions & 0 deletions wasmer/wasmer_link_dynamic.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// +build !static_build

package wasmer

// #cgo LDFLAGS: -Wl,-rpath,${SRCDIR} -L${SRCDIR} -lwasmer_runtime_c_api
import "C"
6 changes: 6 additions & 0 deletions wasmer/wasmer_link_static.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// +build static_build

package wasmer

// #cgo LDFLAGS: -lm -ldl -lrt -L${SRCDIR} -lwasmer_runtime_c_api
import "C"

0 comments on commit c66da3c

Please sign in to comment.