From a8a15884a4d5c3082036eb148e046ba5b15f46a4 Mon Sep 17 00:00:00 2001 From: chrysn Date: Thu, 23 Mar 2023 14:16:29 +0100 Subject: [PATCH 1/2] bindgen: Use 0.64 This fixes issues when compiling with LLVM 16. New features (in particular the static function wrappers) are yet unused. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 27e446a..417dd59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ riot-build = { version = "< 0.2.0", optional = true } riot-rs-core = { version = "< 0.2.0", optional = true } [build-dependencies] -bindgen = "^0.60.1" +bindgen = "^0.64" shlex = "^1" serde_json = "1" serde = { version = "1", features = [ "derive" ] } From 07d75665b7d846711062fccab78ca4d7c557708b Mon Sep 17 00:00:00 2001 From: chrysn Date: Thu, 23 Mar 2023 14:23:55 +0100 Subject: [PATCH 2/2] bindgen: Keep building with --no-size_t-is-usize as it was done before bindgen-0.64 --- build.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.rs b/build.rs index 30eb390..9689936 100644 --- a/build.rs +++ b/build.rs @@ -180,6 +180,10 @@ fn main() { .clang_args(&cflags) .use_core() .ctypes_prefix("libc") + // We've traditionally used size_t explicitly and cast it in riot-wrappers; changing this + // now (going from bindgen 0.60 to 0.64) would break where it's used (although we still + // might instate a type alias for size_t later instead). + .size_t_is_usize(false) .impl_debug(true) // Structs listed here are Packed and thus need impl_debug, but also contain non-Copy // members.