diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a6d5e27 --- /dev/null +++ b/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -xeuf -o pipefail + +clang -g -O2 -Wall -fpie -I../libbpfgo/selftest/common -target bpf -D__TARGET_ARCH_amd64 -I../libbpfgo/output -I../libbpfgo/selftest/common -c main.bpf.c -o main.bpf.o + +export CC=clang +export CGO_CFLAGS="-I/home/paul/git/libbpfgo/output -I/home/paul/git/libbpfgo/selftest/common" +export CGO_LDFLAGS="-lelf -lzstd /home/paul/git/libbpfgo/output/libbpf.a" +export GOOS=linux +export GOARCH=amd64 + +go build -tags netgo -ldflags '-w -extldflags "-static"' -o ioriotng ./main.go |
