Rollup merge of #109922 - Amanieu:ohos-no_thread_local, r=wesleywiser

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:
Yuki Okushi 2023-04-06 07:18:30 +09:00 committed by GitHub
commit 836504ec34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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()
},
}