From 5e4c957df49fd28623659a335474b25947f9980a Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Thu, 26 Aug 2021 05:20:25 +0100 Subject: [PATCH] Workaround rust issue 50007 --- Cargo.toml | 5 +++++ cdylib/src/lib.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 751382e..ed68c1c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,5 +18,10 @@ fde-phdr = ["libc"] fde-registry = ["alloc"] default = ["fde-phdr"] +[profile.dev] +# Must be turned on due to Rust bug https://github.com/rust-lang/rust/issues/50007 +lto = true + [profile.release] +lto = true debug = true diff --git a/cdylib/src/lib.rs b/cdylib/src/lib.rs index fc457f2..6675f81 100644 --- a/cdylib/src/lib.rs +++ b/cdylib/src/lib.rs @@ -12,7 +12,7 @@ use core::alloc::{GlobalAlloc, Layout}; use core::panic::PanicInfo; use core::{cmp, mem, ptr}; use libc::c_int; -use unwind::*; +pub use unwind::*; pub struct System;