]> git.lizzy.rs Git - rust.git/commitdiff
libunwind: readd link attrs to _Unwind_Backtrace
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Wed, 26 Jan 2022 20:59:14 +0000 (12:59 -0800)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Wed, 26 Jan 2022 22:19:29 +0000 (14:19 -0800)
It seems the removal of these in
1c07096a45a15de64216f12ec726333870e372b1 was unintended; readding them
fixes the build.

fixes rust-lang/rust#93349

library/unwind/src/libunwind.rs

index 5e15fe75a2463632f14850d7433168c16936eed8..fe98e860ace785e3d09e4057a2c037c7cf77c88b 100644 (file)
@@ -246,6 +246,10 @@ pub unsafe fn _Unwind_FindEnclosingFunction(pc: *mut c_void) -> *mut c_void {
     extern "C-unwind" {
         pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code;
     }
+    #[cfg_attr(
+        all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")),
+        link(name = "unwind", kind = "static", modifiers = "-bundle")
+    )]
     extern "C" {
         pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn,
                                  trace_argument: *mut c_void)