Skip to content

Commit 1821fdf

Browse files
authored
Merge pull request #15 from go-clang/116-allow-static-linking
Allow static linking of go-clang using the "static" build tag
2 parents 4c963f8 + 3dae86a commit 1821fdf

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

clang/cgoflags.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
package clang
22

3-
// #cgo LDFLAGS: -lclang
4-
// #cgo CFLAGS: -I.
3+
// #cgo CFLAGS: -I${SRCDIR}
54
import "C"

clang/cgoflags_dynamic.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// +build !static
2+
3+
package clang
4+
5+
// #cgo LDFLAGS: -lclang
6+
import "C"

clang/cgoflags_static.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// +build static
2+
3+
package clang
4+
5+
import "C"

0 commit comments

Comments
 (0)