Disable has_thread_local on OpenHarmony

OpenHarmony uses emulated TLS, which doesn't link properly when using
thread-local variables across crate boundaries with `-C prefer-dynamic`.
This PR makes thread_local! use pthreads directly instead.
This commit is contained in:
Amanieu d'Antras 2023-04-04 02:40:31 +01:00
parent 932c173ca1
commit 69e3f7a30d
2 changed files with 2 additions and 0 deletions

View file

@ -18,6 +18,7 @@ pub fn target() -> Target {
features: "+reserve-x18".into(),
mcount: "\u{1}_mcount".into(),
force_emulated_tls: true,
has_thread_local: false,
supported_sanitizers: SanitizerSet::ADDRESS
| SanitizerSet::CFI
| SanitizerSet::LEAK

View file

@ -21,6 +21,7 @@ pub fn target() -> Target {
crt_static_default: false,
mcount: "\u{1}mcount".into(),
force_emulated_tls: true,
has_thread_local: false,
..super::linux_musl_base::opts()
},
}