Skip to content

Commit

Permalink
Add OpenHarmony targets
Browse files Browse the repository at this point in the history
- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
  • Loading branch information
Amanieu authored and yetist committed Jul 13, 2024
1 parent ee0956c commit 81719c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
}
Options.RelaxELFRelocations = RelaxELFRelocations;
Options.UseInitArray = UseInitArray;
if (ForceEmulatedTls) {
Options.ExplicitEmulatedTLS = true;
Options.EmulatedTLS = true;
}

#if LLVM_VERSION_LT(17, 0)
if (ForceEmulatedTls) {
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ const EXTRA_CHECK_CFGS: &[(Option<Mode>, &'static str, Option<&[&'static str]>)]
// Needed to avoid the need to copy windows.lib into the sysroot.
(Some(Mode::Rustc), "windows_raw_dylib", None),
(Some(Mode::ToolRustc), "windows_raw_dylib", None),
// #[cfg(bootstrap)] ohos
(Some(Mode::Std), "target_env", Some(&["ohos"])),
];

/// A structure representing a Rust compiler.
Expand Down

0 comments on commit 81719c7

Please sign in to comment.