about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIan Chamberlain <ian.h.chamberlain@gmail.com>2022-03-23 21:00:38 -0400
committerMark Drobnak <mark.drobnak@gmail.com>2022-06-13 20:45:24 -0700
commitbc63d5a26a65752fb105957d3235cc9c8cb0767f (patch)
treec50d5b1f289f3af0fc33dd95ad1042ba9a555143
parent82e8cd4834fa5d5b9ca7de216d07d89f9c7addc2 (diff)
downloadrust-bc63d5a26a65752fb105957d3235cc9c8cb0767f.tar.gz
rust-bc63d5a26a65752fb105957d3235cc9c8cb0767f.zip
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
-rw-r--r--library/std/src/sys/unix/thread_local_dtor.rs2
1 files changed, 1 insertions, 1 deletions
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);