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

@ -368,7 +368,8 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
bool EmitStackSizeSection,
bool RelaxELFRelocations,
bool UseInitArray,
const char *SplitDwarfFile) {
const char *SplitDwarfFile,
bool ForceEmulatedTls) {
auto OptLevel = fromRust(RustOptLevel);
auto RM = fromRust(RustReloc);
@ -400,6 +401,10 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
}
Options.RelaxELFRelocations = RelaxELFRelocations;
Options.UseInitArray = UseInitArray;
if (ForceEmulatedTls) {
Options.ExplicitEmulatedTLS = true;
Options.EmulatedTLS = true;
}
if (TrapUnreachable) {
// Tell LLVM to codegen `unreachable` into an explicit trap instruction.