Skip to content

Commit

Permalink
Merge pull request #250 from vadorovsky/aya-gen-disable-debug
Browse files Browse the repository at this point in the history
aya-gen: Disable Debug derive for BTF types
  • Loading branch information
dave-tucker committed May 4, 2022
2 parents 69cc844 + bd336ac commit e2ebd85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aya-gen/src/bindgen.rs
Expand Up @@ -19,4 +19,11 @@ pub fn bpf_builder() -> Builder {
.clang_arg("-Wno-unknown-attributes")
.default_enum_style(EnumVariation::ModuleConsts)
.prepend_enum_name(false)
// NOTE(vadorovsky): It's a workaround for the upstream bindgen issue:
// https://github.com/rust-lang/rust-bindgen/issues/2083
// tl;dr: Rust nightly complains about #[repr(packed)] structs deriving
// Debug without Copy.
// It needs to be fixed properly upstream, but for now we have to
// disable Debug derive here.
.derive_debug(false)
}

0 comments on commit e2ebd85

Please sign in to comment.