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: clarify -target usage with bpf_tracing.h #773

Merged
merged 1 commit into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/bpf2go/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func compile(args compileArgs) error {
"-fdebug-compilation-dir", ".",
// We always want BTF to be generated, so enforce debug symbols
"-g",
fmt.Sprintf("-D__BPF_TARGET_MISSING=%q", "GCC error \"The eBPF is using target specific macros, please provide -target\""),
fmt.Sprintf("-D__BPF_TARGET_MISSING=%q", "GCC error \"The eBPF is using target specific macros, please provide -target that is not bpf, bpfel or bpfeb\""),
)
cmd.Dir = args.dir

Expand Down
2 changes: 1 addition & 1 deletion cmd/bpf2go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func run(stdout io.Writer, pkg, outputDir string, args []string) (err error) {
fs.BoolVar(&b2g.disableStripping, "no-strip", false, "disable stripping of DWARF")
flagCFlags := fs.String("cflags", "", "flags passed to the compiler, may contain quoted arguments")
fs.StringVar(&b2g.tags, "tags", "", "list of Go build tags to include in generated files")
flagTarget := fs.String("target", "bpfel,bpfeb", "clang target to compile for")
flagTarget := fs.String("target", "bpfel,bpfeb", "clang target(s) to compile for (comma separated)")
fs.StringVar(&b2g.makeBase, "makebase", "", "write make compatible depinfo files relative to `directory`")
fs.Var(&b2g.cTypes, "type", "`Name` of a type to generate a Go declaration for, may be repeated")
fs.BoolVar(&b2g.skipGlobalTypes, "no-global-types", false, "Skip generating types for map keys and values, etc.")
Expand Down