llvm: Use emulated TLS when appropriate for the target

Closes #24236.
This commit is contained in:
Alex Rønne Petersen
2025-07-06 22:19:08 +02:00
parent c96c913bab
commit b5cc658ab4
6 changed files with 22 additions and 3 deletions

View File

@@ -1047,6 +1047,7 @@ pub const Object = struct {
comp.data_sections,
float_abi,
if (target_util.llvmMachineAbi(&comp.root_mod.resolved_target.result)) |s| s.ptr else null,
target_util.useEmulatedTls(&comp.root_mod.resolved_target.result),
);
errdefer target_machine.dispose();

View File

@@ -79,6 +79,7 @@ pub const TargetMachine = opaque {
data_sections: bool,
float_abi: FloatABI,
abi_name: ?[*:0]const u8,
emulated_tls: bool,
) *TargetMachine;
pub const dispose = LLVMDisposeTargetMachine;