================
@@ -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))
----------------
MaskRay wrote:
Thanks for the AArch64 notes. 
This HelpText (`AArch32 only`) change is to discourage `-munaligned-access` for 
AArch64, since GCC doesn't support `-munaligned-access`.

Personally I assume that most modern architectures should switch to 
`-mstrict-align`.

(Related, I have been trying to make more code compliant under 
`-fsanitize=alignment`, which might makes memory access operations with 
hardware check easier. 
)

https://github.com/llvm/llvm-project/pull/85350
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to