зеркало из https://github.com/microsoft/clang-1.git
[driver] -mkernel implies -mstrict-align; don't add the redundant option.
rdar://12771737 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168841 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
52b501cd72
Коммит
586a061ad9
|
@ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче