forked from OSchip/llvm-project
Driver: force restricted IT blocks for Windows on ARM
Windows on ARM expects ARMv8 (restricted IT) conditional instructions only. Force enable the restricted IT mode via the backend option when targeting WoA. llvm-svn: 209086
This commit is contained in:
parent
a521845381
commit
6deb816c1c
|
@ -3451,6 +3451,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-arm-no-restrict-it");
|
||||
}
|
||||
} else if (TT.isOSWindows() && (TT.getArch() == llvm::Triple::arm ||
|
||||
TT.getArch() == llvm::Triple::thumb)) {
|
||||
// Windows on ARM expects restricted IT blocks
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-arm-restrict-it");
|
||||
}
|
||||
|
||||
// Forward -f options with positive and negative forms; we translate
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// RUN: %clang -target armv7-windows -### %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: "-backend-option" "-arm-restrict-it"
|
||||
|
Loading…
Reference in New Issue