mirror of https://github.com/rust-lang/rust.git
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:
commit
836504ec34
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue