aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-07-06 22:19:08 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-07-07 07:23:24 +0200
commitb5cc658ab4113b4db4f709dbec258910696990bd (patch)
tree7864e25eda40d6850582da4109e988b72df5bd2d /src/codegen
parentc96c913bab00bcae42991244381ddcc8b2377552 (diff)
downloadzig-b5cc658ab4113b4db4f709dbec258910696990bd.tar.gz
zig-b5cc658ab4113b4db4f709dbec258910696990bd.zip
llvm: Use emulated TLS when appropriate for the target
Closes #24236.
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig1
-rw-r--r--src/codegen/llvm/bindings.zig1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 27092a1de8..db628eab5d 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -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();
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index 5d2d4c2a99..7fa2a7da43 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -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;