From f956966fda5c89494dd1e35d86de9fa789e03f68 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Tue, 20 Sep 2022 10:29:28 +0200 Subject: [PATCH] build(core/rust): workaround failing build_unix_debug [no changelog] --- core/embed/rust/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/embed/rust/src/lib.rs b/core/embed/rust/src/lib.rs index 396e09fa41..f66b33fa9f 100644 --- a/core/embed/rust/src/lib.rs +++ b/core/embed/rust/src/lib.rs @@ -3,6 +3,7 @@ #![allow(clippy::new_without_default)] #![deny(unsafe_op_in_unsafe_fn)] #![allow(dead_code)] +#![feature(lang_items)] #[macro_use] extern crate num_derive; @@ -55,3 +56,10 @@ fn panic(_info: &core::panic::PanicInfo) -> ! { // Otherwise, use `unwrap!` macro from trezorhal. trezorhal::common::__fatal_error("", "rs", "", 0, ""); } + +#[cfg(not(target_arch = "arm"))] +#[cfg(not(test))] +#[cfg(any(not(feature = "test"), feature = "clippy"))] +#[lang = "eh_personality"] +/// Needed by full debuginfo `opt-level = 0` builds for some reason. +extern "C" fn eh_personality() {}