-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Statically Linking in Go (#2067)
* unset -L and -rpath from CGO_LDFLAGS Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com> * allow go statically linking Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com> * fix setup.py --------- Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com> Co-authored-by: mio <mio@lazym.io>
- Loading branch information
1 parent
7737e7b
commit 2899088
Showing
7 changed files
with
34 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package unicorn | ||
|
||
// #cgo CFLAGS: -I../../../include -O3 -Wall -Werror | ||
import "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//go:build !static | ||
|
||
package unicorn | ||
|
||
// #cgo LDFLAGS: -lunicorn | ||
import "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//go:build static | ||
|
||
package unicorn | ||
|
||
// #cgo !darwin LDFLAGS: -lunicorn -lpthread -lm -latomic | ||
// #cgo darwin LDFLAGS: -lunicorn.o | ||
import "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters