diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs
index 0a5e654cf0d03..bf1b089f657b4 100644
--- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs
+++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs
@@ -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
diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs
index a64f3a4f0493e..16da245336773 100644
--- a/compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs
+++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_ohos.rs
@@ -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()
         },
     }