libvlc-sys: drop the generated layout assertions
We are trying to get the bindings build with a single committed source file compiled on every target. Assertions are per-host and would break on different architecture than the commiter's one. Layout checks notably break the 32bit targets.master
parent
9713c5ac7e
commit
19bed7f818
File diff suppressed because it is too large
Load Diff
|
|
@ -43,16 +43,20 @@ fn generate_bindings() {
|
||||||
.ctypes_prefix("libc")
|
.ctypes_prefix("libc")
|
||||||
// Allowlist every (lib)vlc symbol.
|
// Allowlist every (lib)vlc symbol.
|
||||||
.allowlist_item("(lib|LIB)?(vlc|VLC)_.*")
|
.allowlist_item("(lib|LIB)?(vlc|VLC)_.*")
|
||||||
// libvlc only uses FILE behind a pointer. Map it
|
// Avoid leaking unecessary glibc/platform specifics.
|
||||||
// to libc's opaque, per-platform FILE rather than emitting glibc's
|
|
||||||
// plain _IO_FILE, whose baked-in layout breaks non-Linux builds.
|
|
||||||
.blocklist_type("_IO_.*")
|
.blocklist_type("_IO_.*")
|
||||||
|
.blocklist_type("_iobuf")
|
||||||
.blocklist_type("FILE")
|
.blocklist_type("FILE")
|
||||||
|
.blocklist_type("__off.*")
|
||||||
|
.blocklist_type("__uint64_t")
|
||||||
.raw_line("pub use libc::FILE;")
|
.raw_line("pub use libc::FILE;")
|
||||||
// Block the whole va_list family and rewrite the parameters bindings to our own `VaList`,
|
// Block the whole va_list family and rewrite the parameters bindings to our own `VaList`,
|
||||||
// which is ABI-correct on every target.
|
// which is ABI-correct on every target.
|
||||||
.blocklist_type(".*va_list.*")
|
.blocklist_type(".*va_list.*")
|
||||||
.raw_line("pub use crate::valist::VaList;")
|
.raw_line("pub use crate::valist::VaList;")
|
||||||
|
// These bindings are committed once and compiled everywhere, so the layout assertions would
|
||||||
|
// only ever encode the machine that ran bindgen.
|
||||||
|
.layout_tests(false)
|
||||||
// Emit a single extern block rather than one per function.
|
// Emit a single extern block rather than one per function.
|
||||||
.merge_extern_blocks(true);
|
.merge_extern_blocks(true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue