forked from OSchip/llvm-project
[clang][driver] Don't pass -Wunaligned-access to cc1as
This is to fix some failing assembler tests.
This commit is contained in:
parent
359b4e6cdb
commit
11c67e5a4e
|
@ -467,10 +467,12 @@ fp16_fml_fallthrough:
|
|||
options::OPT_munaligned_access)) {
|
||||
if (A->getOption().matches(options::OPT_mno_unaligned_access)) {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
}
|
||||
} else if (Triple.isOSOpenBSD()) {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
}
|
||||
|
||||
|
|
|
@ -771,6 +771,7 @@ fp16_fml_fallthrough:
|
|||
// Kernel code has more strict alignment requirements.
|
||||
if (KernelOrKext) {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
} else if (Arg *A = Args.getLastArg(options::OPT_mno_unaligned_access,
|
||||
options::OPT_munaligned_access)) {
|
||||
|
@ -784,6 +785,7 @@ fp16_fml_fallthrough:
|
|||
D.Diag(diag::err_target_unsupported_unaligned) << "v8m.base";
|
||||
} else {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
}
|
||||
} else {
|
||||
|
@ -806,16 +808,19 @@ fp16_fml_fallthrough:
|
|||
if (VersionNum < 6 ||
|
||||
Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m) {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
}
|
||||
} else if (Triple.isOSLinux() || Triple.isOSNaCl() ||
|
||||
Triple.isOSWindows()) {
|
||||
if (VersionNum < 7) {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
}
|
||||
} else {
|
||||
Features.push_back("+strict-align");
|
||||
if (!ForAS)
|
||||
CmdArgs.push_back("-Wunaligned-access");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue