diff --git a/contrib/src/rav1e/rules.mak b/contrib/src/rav1e/rules.mak index 755078be911e..51735454decb 100644 --- a/contrib/src/rav1e/rules.mak +++ b/contrib/src/rav1e/rules.mak @@ -25,6 +25,9 @@ RAV1E_FEATURES=--features=asm rav1e: rav1e-$(RAV1E_VERSION).tar.gz .sum-rav1e .rav1e-vendor $(UNPACK) +ifdef HAVE_WIN32 + $(APPLY) $(SRC)/rav1e/unwind-resume-stub.patch +endif $(CARGO_VENDOR_SETUP) $(MOVE) diff --git a/contrib/src/rav1e/unwind-resume-stub.patch b/contrib/src/rav1e/unwind-resume-stub.patch new file mode 100644 index 000000000000..ba1adc88ce62 --- /dev/null +++ b/contrib/src/rav1e/unwind-resume-stub.patch @@ -0,0 +1,27 @@ +From 30b9e63817bf60c3cab0bc6cebb073ee2344ac34 Mon Sep 17 00:00:00 2001 +From: Tristan Matthews +Date: Fri, 25 Feb 2022 12:30:01 -0500 +Subject: [PATCH 1/1] lib: workaround for + https://github.com/rust-lang/rust/issues/79609 + +This avoids to broken linking on some mingw32 versions. The function +will never be called since we set `-C panic=abort`. +--- + src/lib.rs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/lib.rs b/src/lib.rs +index 63afa2d5..412bb0e0 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -389,3 +389,7 @@ pub mod bench { + + #[cfg(fuzzing)] + pub mod fuzzing; ++ ++#[no_mangle] ++#[allow(non_snake_case)] ++fn _Unwind_Resume() {} +-- +2.32.0 +