From bc63d5a26a65752fb105957d3235cc9c8cb0767f Mon Sep 17 00:00:00 2001 From: Ian Chamberlain Date: Wed, 23 Mar 2022 21:00:38 -0400 Subject: Enable thread_local_dtor on horizon OS Always use fallback thread_local destructor, since __cxa_thread_atexit_impl is never defined on the target. See https://github.com/AzureMarker/rust-horizon/pull/2 --- library/std/src/sys/unix/thread_local_dtor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/thread_local_dtor.rs b/library/std/src/sys/unix/thread_local_dtor.rs index c3f410353b9..6e8be2a91de 100644 --- a/library/std/src/sys/unix/thread_local_dtor.rs +++ b/library/std/src/sys/unix/thread_local_dtor.rs @@ -93,7 +93,7 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) { } } -#[cfg(target_os = "vxworks")] +#[cfg(any(target_os = "vxworks", target_os = "horizon"))] pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) { use crate::sys_common::thread_local_dtor::register_dtor_fallback; register_dtor_fallback(t, dtor); -- cgit 1.4.1-3-g733a5