[LLVM17] Adapt to ExplicitEmulatedTLS
removal.
This commit is contained in:
parent
f65615f02d
commit
047ed32148
1 changed files with 5 additions and 0 deletions
|
@ -410,10 +410,15 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine(
|
|||
}
|
||||
Options.RelaxELFRelocations = RelaxELFRelocations;
|
||||
Options.UseInitArray = UseInitArray;
|
||||
|
||||
#if LLVM_VERSION_LT(17, 0)
|
||||
if (ForceEmulatedTls) {
|
||||
Options.ExplicitEmulatedTLS = true;
|
||||
Options.EmulatedTLS = true;
|
||||
}
|
||||
#else
|
||||
Options.EmulatedTLS = ForceEmulatedTls || Trip.hasDefaultEmulatedTLS();
|
||||
#endif
|
||||
|
||||
if (TrapUnreachable) {
|
||||
// Tell LLVM to codegen `unreachable` into an explicit trap instruction.
|
||||
|
|
Loading…
Add table
Reference in a new issue