Add OpenHarmony targets

- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
This commit is contained in:
Amanieu d'Antras 2022-11-10 10:06:34 +00:00
parent dd19135b04
commit e3968be331
15 changed files with 238 additions and 7 deletions

View file

@ -214,6 +214,8 @@ pub fn target_machine_factory(
let path_mapping = sess.source_map().path_mapping().clone();
let force_emulated_tls = sess.target.force_emulated_tls;
Arc::new(move |config: TargetMachineFactoryConfig| {
let split_dwarf_file =
path_mapping.map_prefix(config.split_dwarf_file.unwrap_or_default()).0;
@ -239,6 +241,7 @@ pub fn target_machine_factory(
relax_elf_relocations,
use_init_array,
split_dwarf_file.as_ptr(),
force_emulated_tls,
)
};

View file

@ -2257,6 +2257,7 @@ extern "C" {
RelaxELFRelocations: bool,
UseInitArray: bool,
SplitDwarfFile: *const c_char,
ForceEmulatedTls: bool,
) -> Option<&'static mut TargetMachine>;
pub fn LLVMRustDisposeTargetMachine(T: &'static mut TargetMachine);
pub fn LLVMRustAddLibraryInfo<'a>(