-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
The logic that computes cfg(target_feature)
takes into account target feature implications when handling something like -sse
: it will also remove avx
from the list of enabled target features in that case. However, the logic that computes which flags we set for codegen (which, unfortunately, is completely separate), does not do the same: it will add -sse
to LLVM's target feature list, but does not do anything about Rust-level target feature implications.
This can't be correct -- either negative target features also imply that their "reverse dependencies" get disabled, or they do not. We shouldn't do one thing in codegen and a different thing for cfg
. Or is there some good reason for this?
The logic for this was added in #128221.
Metadata
Metadata
Assignees
Labels
A-target-featureArea: Enabling/disabling target features like AVX, Neon, etc.Area: Enabling/disabling target features like AVX, Neon, etc.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.