Skip to content

Commit 81719c7

Browse files
Amanieuyetist
authored andcommitted
Add OpenHarmony targets
- `aarch64-unknown-linux-ohos` - `armv7-unknown-linux-ohos`
1 parent ee0956c commit 81719c7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
421421
}
422422
Options.RelaxELFRelocations = RelaxELFRelocations;
423423
Options.UseInitArray = UseInitArray;
424+
if (ForceEmulatedTls) {
425+
Options.ExplicitEmulatedTLS = true;
426+
Options.EmulatedTLS = true;
427+
}
424428

425429
#if LLVM_VERSION_LT(17, 0)
426430
if (ForceEmulatedTls) {

src/bootstrap/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
153153
// Needed to avoid the need to copy windows.lib into the sysroot.
154154
(Some(Mode::Rustc), "windows_raw_dylib", None),
155155
(Some(Mode::ToolRustc), "windows_raw_dylib", None),
156+
// #[cfg(bootstrap)] ohos
157+
(Some(Mode::Std), "target_env", Some(&["ohos"])),
156158
];
157159

158160
/// A structure representing a Rust compiler.

0 commit comments

Comments
 (0)