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
This commit is contained in:
Ian Chamberlain 2022-03-23 21:00:38 -04:00 committed by Mark Drobnak
parent 82e8cd4834
commit bc63d5a26a
No known key found for this signature in database
GPG Key ID: 47A133F3BF9D03D3

View File

@ -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);