CmdArgs.push_back("-target-abi");
CmdArgs.push_back(ABIName);
- if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access,
- options::OPT_munaligned_access)) {
- CmdArgs.push_back("-backend-option");
- if (A->getOption().matches(options::OPT_mno_unaligned_access))
- CmdArgs.push_back("-aarch64-strict-align");
- else
- CmdArgs.push_back("-aarch64-no-strict-align");
- }
-
if (Arg *A = Args.getLastArg(options::OPT_mfix_cortex_a53_835769,
options::OPT_mno_fix_cortex_a53_835769)) {
CmdArgs.push_back("-backend-option");
Features.push_back("-crc");
}
+ if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access,
+ options::OPT_munaligned_access))
+ if (A->getOption().matches(options::OPT_mno_unaligned_access))
+ Features.push_back("+strict-align");
+
if (Args.hasArg(options::OPT_ffixed_x18) || Triple.isOSDarwin())
Features.push_back("+reserve-x18");
}
// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-AARCH64 < %t %s
// CHECK-UNALIGNED-ARM-NOT: "-target-feature" "+strict-align"
-// CHECK-UNALIGNED-AARCH64: "-backend-option" "-aarch64-no-strict-align"
+// CHECK-UNALIGNED-AARCH64-NOT: "-target-feature" "+strict-align"
// RUN: %clang -target arm-none-gnueabi -mno-unaligned-access -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-ALIGNED-AARCH64 < %t %s
// CHECK-ALIGNED-ARM: "-target-feature" "+strict-align"
-// CHECK-ALIGNED-AARCH64: "-backend-option" "-aarch64-strict-align"
+// CHECK-ALIGNED-AARCH64: "-target-feature" "+strict-align"
// Make sure that v6M cores always trigger the unsupported aligned accesses error
// for all supported architecture triples.