mirror of
https://github.com/ziglang/zig.git
synced 2025-12-09 15:53:08 +00:00
llvm: stop generating FPU code if there is no FPU
Fixes https://github.com/ziglang/zig/issues/14465 For aarch64, LLVM was crashing because Zig commands it to generate FPU code even when there is no FPU present. This commit implements the necessary checks to avoid this undesired situation and aarch64 can be compiled again with no FPU.
This commit is contained in:
parent
9ee0a706da
commit
c16d4ab9e4
@ -11165,6 +11165,7 @@ fn backendSupportsF16(target: std.Target) bool {
|
||||
.mips64,
|
||||
.mips64el,
|
||||
=> false,
|
||||
.aarch64 => std.Target.aarch64.featureSetHas(target.cpu.features, .fp_armv8),
|
||||
else => true,
|
||||
};
|
||||
}
|
||||
@ -11175,6 +11176,7 @@ fn backendSupportsF16(target: std.Target) bool {
|
||||
fn backendSupportsF128(target: std.Target) bool {
|
||||
return switch (target.cpu.arch) {
|
||||
.amdgcn => false,
|
||||
.aarch64 => std.Target.aarch64.featureSetHas(target.cpu.features, .fp_armv8),
|
||||
else => true,
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user