[clang] [llvm] [AArch64][Driver] Fix behavior of +nofeat modifier on -mcpu (PR #203458)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 18:58:07 PDT 2026


================
@@ -340,14 +340,22 @@ void AArch64::ExtensionSet::disable(ArchExtKind E) {
       disable(Dep.Later);
 }
 
+static void setEnableIfMandatory(AArch64::ExtensionSet &Exts,
----------------
yamash-fj wrote:

Using ``ExtensionSet::addArchDefaults`` results in emitting redundant ``+<feat>`` for the feature that is implied by only the base-architecture. To keep the cc1 command line concise, I chose to use Enabled.set() instead. I'm not sure which behavior is preferable. Do you think an implementation based on ExtensionSet::addArchDefaults() would be the better approach?


https://github.com/llvm/llvm-project/pull/203458


More information about the cfe-commits mailing list