Open matthiaskrgr opened 2 years ago
Once upon a time I looked into this and there isn’t a good way to do this (without changes to LLVM, anyway.) We will produce a warning for each LLVM context created, which is going to be 1 informational + 1 for each codegen unit. To the best of my knowledge there isn’t a way to either suppress nor to get LLVM to fail when this happens.
We could create an informational target and then check for the missing feature, but that would still show at least one warning.
We could also have our own allow-lists for the values here, just like we have for -Ctarget-feature
.
rustc helloworld.rs -C target-cpu=lol
will print a ton of identical/similar warnings: