forked from OSchip/llvm-project
[driver] -mkernel implies -mstrict-align; don't add the redundant option.
rdar://12771737 llvm-svn: 168841
This commit is contained in:
parent
8c3f2764fb
commit
9ae53f8e3a
|
@ -2508,7 +2508,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
StringRef alignment = Args.getLastArgValue(options::OPT_mstack_alignment);
|
||||
CmdArgs.push_back(Args.MakeArgString("-mstack-alignment=" + alignment));
|
||||
}
|
||||
if (Args.hasArg(options::OPT_mstrict_align)) {
|
||||
// -mkernel implies -mstrict-align; don't add the redundant option.
|
||||
if (Args.hasArg(options::OPT_mstrict_align) && !KernelOrKext) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-arm-strict-align");
|
||||
}
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
// CHECK-X86: "-fno-common"
|
||||
|
||||
// RUN: %clang -target x86_64-apple-darwin10 \
|
||||
// RUN: -arch armv7 -mkernel -### -fsyntax-only %s 2> %t
|
||||
// RUN: -arch armv7 -mkernel -mstrict-align -### -fsyntax-only %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-ARM < %t %s
|
||||
|
||||
// CHECK-ARM: "-backend-option" "-arm-long-calls"
|
||||
// CHECK-ARM: "-backend-option" "-arm-strict-align"
|
||||
// CHECK-ARM-NOT: "-backend-option" "-arm-strict-align"
|
||||
// CHECK-ARM: "-fno-builtin"
|
||||
// CHECK-ARM: "-fno-rtti"
|
||||
// CHECK-ARM: "-fno-common"
|
||||
|
|
Loading…
Reference in New Issue