diff options
| author | Paul Buetow <paul@buetow.org> | 2024-02-10 20:13:40 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-02-10 20:13:40 +0200 |
| commit | 8ec79e38f30738701c1ca48f5cfa724b41f866f6 (patch) | |
| tree | 1b2a910c73cad82e3813b623fecdd7bdfc15569c /build.sh | |
| parent | 0a5b56cec0be16a6a8627ec8548b9e80a243af96 (diff) | |
add opids
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -5,6 +5,10 @@ set -xeuf -o pipefail declare -r LIBBPFGO="$(pwd)/../libbpfgo" bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h +echo 'package main' > opids.go +echo >> opids.go +sed -E 's/#define (.*) ([0-9]+)/const \1 = \2/' opids.h >> opids.go + 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 |
