mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 01:06:06 +00:00
[ARM] Pass thumb as architecture to the underlying tools, when targeting windows
This makes sure that the thumb section flag gets set by the assembler. Patch by Martin Storsjö. llvm-svn: 276869
This commit is contained in:
parent
0b113671c5
commit
6b5596aaec
@ -493,8 +493,10 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args,
|
||||
ArchName = "arm";
|
||||
|
||||
// Assembly files should start in ARM mode, unless arch is M-profile.
|
||||
// Windows is always thumb.
|
||||
if ((InputType != types::TY_PP_Asm && Args.hasFlag(options::OPT_mthumb,
|
||||
options::OPT_mno_thumb, ThumbDefault)) || IsMProfile) {
|
||||
options::OPT_mno_thumb, ThumbDefault)) || IsMProfile ||
|
||||
getTriple().isOSWindows()) {
|
||||
if (IsBigEndian)
|
||||
ArchName = "thumbeb";
|
||||
else
|
||||
|
2
clang/test/Driver/windows-thumb.s
Normal file
2
clang/test/Driver/windows-thumb.s
Normal file
@ -0,0 +1,2 @@
|
||||
; RUN: %clang -target armv7-windows -c -### %s 2>&1 | FileCheck %s
|
||||
; CHECK: "-triple" "thumbv7-
|
Loading…
x
Reference in New Issue
Block a user