From 92517fbd625b1f6d6162ce2875ef167701b99733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 25 Aug 2024 00:45:38 +0200 Subject: [PATCH] llvm: Set float ABI based on std.Target.floatAbi(). --- src/codegen/llvm.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index a46d875b342b087267571a02d8311b9184fd17a7..59df12df610d4c797577d9b33f05b87d1fcfdce2 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -1284,8 +1284,7 @@ pub const Object = struct { .large => .Large, }; - // TODO handle float ABI better- it should depend on the ABI portion of std.Target - const float_abi: llvm.ABIType = .Default; + const float_abi: llvm.ABIType = if (comp.root_mod.resolved_target.result.floatAbi() == .hard) .Hard else .Soft; var target_machine = llvm.TargetMachine.create( target, -- 2.54.0