xtask: codegen: use uapi kernel headers from libbpf

libbpf periodically syncs uapi headers from the kernel. Use those to
generate bindings so that we don't have to rely on distro packages
when we cut releases.
pull/1/head
Alessandro Decina 4 years ago
parent 9595bd4571
commit c44393d59b

@ -14,6 +14,14 @@ fn codegen_internal_btf_bindings(opts: &Options) -> Result<(), anyhow::Error> {
let dir = PathBuf::from("aya");
let generated = dir.join("src/generated");
let mut bindgen = bindgen::user_builder()
.clang_arg(format!(
"-I{}",
opts.libbpf_dir
.join("include/uapi")
.canonicalize()
.unwrap()
.to_string_lossy()
))
.header(
opts.libbpf_dir
.join("src/libbpf_internal.h")

Loading…
Cancel
Save