Open andrewrk opened 2 years ago
Perhaps we should do both? If a feature conflicts with a default feature, then we know to disable the default feature. If two explicitly-provided features are passed, then we throw an error, since we can't know which feature the user actually intends.
Extracted from #12220.
As pointed out in https://github.com/llvm/llvm-project/issues/56351#issuecomment-1173063759,
+x87
and+soft_float
is a pair of contradictory options. However, Zig currently has no way to denote such contradictions, meaning that a user might easily run into that problem above, and not realize that they could do this:This issue is to introduce a field to
std.Target.Cpu.Feature
for storing conflicts with other features, and then do one of two things:+soft_float
is encountered, zig would infer to automatically do-x87
-sse
-sse2
.