diff options
Diffstat (limited to 'bindgen/codegen/mod.rs')
-rw-r--r-- | bindgen/codegen/mod.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bindgen/codegen/mod.rs b/bindgen/codegen/mod.rs index 4e90102d..d0c19136 100644 --- a/bindgen/codegen/mod.rs +++ b/bindgen/codegen/mod.rs @@ -2483,6 +2483,9 @@ impl MethodCodegen for Method { ClangAbi::Known(Abi::Vectorcall) => { ctx.options().rust_features().vectorcall_abi } + ClangAbi::Known(Abi::CUnwind) => { + ctx.options().rust_features().c_unwind_abi + } _ => true, }; @@ -4009,6 +4012,12 @@ impl TryToRustTy for FunctionSig { warn!("Skipping function with vectorcall ABI that isn't supported by the configured Rust target"); Ok(proc_macro2::TokenStream::new()) } + ClangAbi::Known(Abi::CUnwind) + if !ctx.options().rust_features().c_unwind_abi => + { + warn!("Skipping function with C-unwind ABI that isn't supported by the configured Rust target"); + Ok(proc_macro2::TokenStream::new()) + } _ => Ok(quote! { unsafe extern #abi fn ( #( #arguments ),* ) #ret }), @@ -4120,6 +4129,12 @@ impl CodeGenerator for Function { warn!("Skipping function with vectorcall ABI that isn't supported by the configured Rust target"); return None; } + ClangAbi::Known(Abi::CUnwind) + if !ctx.options().rust_features().c_unwind_abi => + { + warn!("Skipping function with C-unwind ABI that isn't supported by the configured Rust target"); + return None; + } ClangAbi::Known(Abi::Win64) if signature.is_variadic() => { warn!("Skipping variadic function with Win64 ABI that isn't supported"); return None; |