aya-gen: use aya_bpf::cty instead of aya_bpf_cty

This avoids having to add an explicit extra dep on aya-bpf-cty in ebpf
programs
pull/56/head
Alessandro Decina 3 years ago
parent d7ef47686b
commit ca14306860

@ -13,7 +13,7 @@ pub fn user_builder() -> Builder {
pub fn bpf_builder() -> Builder {
bindgen::builder()
.use_core()
.ctypes_prefix("::aya_bpf_cty")
.ctypes_prefix("::aya_bpf::cty")
.layout_tests(false)
.generate_comments(false)
.clang_arg("-Wno-unknown-attributes")

@ -21,6 +21,9 @@ pub fn codegen(opts: &Options) -> Result<(), anyhow::Error> {
let builder = || {
let mut bindgen = bindgen::bpf_builder()
.header(&*dir.join("include/bindings.h").to_string_lossy())
// aya-gen uses aya_bpf::cty. We can't use that here since aya-bpf
// depends on aya-bpf-bindings so it would create a circular dep.
.ctypes_prefix("::aya_bpf_cty")
.clang_args(&[
"-I",
&*opts.libbpf_dir.join("include/uapi").to_string_lossy(),

Loading…
Cancel
Save