Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/bpf2go: allow to specify native target #526

Merged
merged 1 commit into from
Dec 15, 2021

Commits on Dec 15, 2021

  1. cmd/bpf2go: allow to specify native target

    This allows to invoke `bpf2go` to build for the native architecture and
    have `__TARGET_ARCH_xxx` defined based on `GOARCH` without having to
    derive the  architecture e.g. as part of the build system.
    
    For example this would be useful in github.com/cilium/pwru:
    
        //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -cc clang -target native KProbePWRU ./bpf/kprobe_pwru.c -- -DOUTPUT_SKB -I./bpf/headers
    
    Signed-off-by: Tobias Klauser <tobias@cilium.io>
    tklauser committed Dec 15, 2021
    Configuration menu
    Copy the full SHA
    ab5dbf0 View commit details
    Browse the repository at this point in the history