================ @@ -230,6 +230,17 @@ static void getAArch64MultilibFlags(const Driver &D, Result.push_back(BranchProtectionArg->getAsString(Args)); } + const Arg *StrictAlignArg = Args.getLastArgNoClaim( + options::OPT_mstrict_align, options::OPT_mno_unaligned_access); + if (StrictAlignArg) { ---------------- pratlucas wrote:
I think the presence of `-munaligned-access` or `-mno-strict-align` also needs to be considered here. Looking at `clang/lib/Driver/Toolchains/Arch/AArch64.cpp`, it looks like the last of these options is the one which takes effect: ``` 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)) Features.push_back("+strict-align"); ``` I'd recommend using the same logic here. https://github.com/llvm/llvm-project/pull/114782 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits