Skip to content

Commit

Permalink
xvs bump to handle libbpf paths better
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcoles committed Mar 17, 2024
1 parent fbe1053 commit db6b08c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
20 changes: 12 additions & 8 deletions cmd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
# specify the path like so:
# CGO_CFLAGS=-I/path/to/libbpf CGO_LDFLAGS=-L/path/to/libbpf go build

BPFVER = v1.3.0
LIBBPF = $(PWD)/libbpf/src

export CGO_CFLAGS = -I$(LIBBPF)
export CGO_LDFLAGS = -L$(LIBBPF)
BPFVER ?= v1.3.0
LIBBPF ?= $(PWD)/libbpf

default: vc5 config.json

race:
$(MAKE) default FLAGS=-race

vc5: libbpf/src/libbpf.a *.go static/*
go build -race -o $@
CGO_CFLAGS="-I$(LIBBPF)" CGO_LDFLAGS="-L$(LIBBPF)/bpf" go build $(FLAGS) -o $@


# avoid clobbering an existing config file when make is run with -B
config.yaml:
Expand All @@ -29,9 +30,12 @@ distclean: clean
libbpf:
git clone -b $(BPFVER) https://github.com/libbpf/libbpf

libbpf/src/libbpf.a: libbpf
libbpf/bpf:
cd libbpf && ln -s src bpf

libbpf/src/libbpf.a: libbpf libbpf/bpf
cd libbpf/src && $(MAKE)

# need to pass a hook to git
# need to pass as a hook to git
pre-commit:
if grep '^replace' go.mod; then false; fi
2 changes: 1 addition & 1 deletion cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/davidcoles/cue v0.0.4
github.com/davidcoles/xvs v0.1.8
github.com/davidcoles/xvs v0.1.9
github.com/elastic/go-elasticsearch/v7 v7.17.10
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/davidcoles/cue v0.0.4 h1:DnDmr5PuKCypMk7e7pY+Nd0upxCz/Jjixp07/g7ulpg=
github.com/davidcoles/cue v0.0.4/go.mod h1:uUTkCvlkD+nqbmP9XyA63BGMW3g3JJRYC0q8vJKSXMc=
github.com/davidcoles/xvs v0.1.8 h1:gnkO3kZHANYvKYKIlkRJJPkeSaT9VUq9e7TE6Vjqjz0=
github.com/davidcoles/xvs v0.1.8/go.mod h1:xSFQ+/pDWhsMyH0DuAJr92ujAdPnRMcqqBbY+BRkRoE=
github.com/davidcoles/xvs v0.1.9 h1:fWDumZAuT7oikBJ2KVBEbWHiFPJQFtGf9ry+6Osl0Z8=
github.com/davidcoles/xvs v0.1.9/go.mod h1:xSFQ+/pDWhsMyH0DuAJr92ujAdPnRMcqqBbY+BRkRoE=
github.com/elastic/go-elasticsearch/v7 v7.17.10 h1:TCQ8i4PmIJuBunvBS6bwT2ybzVFxxUhhltAs3Gyu1yo=
github.com/elastic/go-elasticsearch/v7 v7.17.10/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4=

0 comments on commit db6b08c

Please sign in to comment.