aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-08-27 02:46:54 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-09-10 08:53:30 +0200
commit65d36be4a80c45897b344e10cc7e63daafcab9fb (patch)
treeb114194c7eeed34bd1040370d8f76b5af9fc09ef /lib/std
parentf9455511faba40ad719fa0e6897ea09ac5fb9d23 (diff)
downloadzig-65d36be4a80c45897b344e10cc7e63daafcab9fb.tar.gz
zig-65d36be4a80c45897b344e10cc7e63daafcab9fb.zip
std.zig.system: Work around llvm/llvm-project#105978 by disabling vfp2.
https://github.com/llvm/llvm-project/issues/105978
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/zig/system.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig
index 4de1e20656..046bd3854e 100644
--- a/lib/std/zig/system.zig
+++ b/lib/std/zig/system.zig
@@ -384,6 +384,12 @@ pub fn resolveTargetQuery(query: Target.Query) DetectError!Target {
query.cpu_features_add,
query.cpu_features_sub,
);
+
+ // https://github.com/llvm/llvm-project/issues/105978
+ if (result.cpu.arch.isArmOrThumb() and result.floatAbi() == .soft) {
+ result.cpu.features.removeFeature(@intFromEnum(Target.arm.Feature.vfp2));
+ }
+
return result;
}