From 97a0d35a8c21b8aeed474a5fa856e89c1feeb5fb Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 6 Jul 2023 16:54:50 +0200 Subject: [PATCH 1/2] Add support for "returns_twice" function attribute --- src/attributes.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/attributes.rs b/src/attributes.rs index fbafc981f6643..0fda9e7ae50b9 100644 --- a/src/attributes.rs +++ b/src/attributes.rs @@ -118,6 +118,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>( if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::COLD) { func.add_attribute(FnAttribute::Cold); } + if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) { + func.add_attribute(FnAttribute::ReturnsTwice); + } } let function_features = From a6d1aa28101ca14c07aaf367b41cc4a13aaad82e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 12 Jul 2023 16:46:16 +0200 Subject: [PATCH 2/2] Update gccjit dependency --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2800dc6ccd14c..3062b191f35a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -77,7 +77,7 @@ dependencies = [ [[package]] name = "gccjit" version = "1.0.0" -source = "git+https://github.com/antoyo/gccjit.rs#79c8bb49ff09b7f40a04055203a5f3894a266210" +source = "git+https://github.com/antoyo/gccjit.rs#78ed1a380eb276e7443645a41b0e87222f291e82" dependencies = [ "gccjit_sys", ] @@ -85,7 +85,7 @@ dependencies = [ [[package]] name = "gccjit_sys" version = "0.0.1" -source = "git+https://github.com/antoyo/gccjit.rs#79c8bb49ff09b7f40a04055203a5f3894a266210" +source = "git+https://github.com/antoyo/gccjit.rs#78ed1a380eb276e7443645a41b0e87222f291e82" dependencies = [ "libc", ]