[clang] [Driver] Don't alias -mstrict-align to -mno-unaligned-access (PR #85350)

YunQiang Su via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 14 21:50:07 PDT 2024


================
@@ -321,9 +321,11 @@ void aarch64::getAArch64TargetFeatures(const Driver &D,
     }
   }
 
-  if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access,
-                               options::OPT_munaligned_access)) {
-    if (A->getOption().matches(options::OPT_mno_unaligned_access))
+  if (Arg *A = Args.getLastArg(
+          options::OPT_mstrict_align, options::OPT_mno_strict_align,
+          options::OPT_mno_unaligned_access, options::OPT_munaligned_access)) {
+    if (A->getOption().matches(options::OPT_mstrict_align) ||
+        A->getOption().matches(options::OPT_mno_unaligned_access))
----------------
wzssyqa wrote:

LGTM.

I will add `strict_align` for MIPSr6 to GCC, and rebase my PR to LLVM.

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


More information about the cfe-commits mailing list