-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the -target flag to tell bpf2go which arch we are targeting. This cuts down on compiling useless targets (big endian x86 anyone?) bpf2go will automatically pass the appropriate __TARGET_ARCH_xxx. Also use $GOARCH from as set by go generate to reduce the necessary boilerplate.
- Loading branch information
Showing
3 changed files
with
11 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: GPL-2.0-only | ||
// Copyright (C) 2021 Authors of Cilium */ | ||
|
||
//go:generate sh -c "echo Generating for $GOARCH" | ||
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH -cc clang KProbePWRU ./bpf/kprobe_pwru.c -- -DOUTPUT_SKB -I./bpf/headers -Wno-address-of-packed-member | ||
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH -cc clang KProbeMultiPWRU ./bpf/kprobe_pwru.c -- -DOUTPUT_SKB -DHAS_KPROBE_MULTI -I./bpf/headers -Wno-address-of-packed-member | ||
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH -cc clang KProbePWRUWithoutOutputSKB ./bpf/kprobe_pwru.c -- -I./bpf/headers -Wno-address-of-packed-member | ||
//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target $GOARCH -cc clang KProbeMultiPWRUWithoutOutputSKB ./bpf/kprobe_pwru.c -- -D HAS_KPROBE_MULTI -I./bpf/headers -Wno-address-of-packed-member | ||
//go:generate go run ./tools/getgetter.go -struct ^(KProbePWRU|KProbeMultiPWRU|KProbePWRUWithoutOutputSKB|KProbeMultiPWRUWithoutOutputSKB)(Programs|Maps)$ | ||
|
||
package main |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.