Index: lib/Driver/ToolChain.cpp =================================================================== --- lib/Driver/ToolChain.cpp +++ lib/Driver/ToolChain.cpp @@ -493,8 +493,10 @@ 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 Index: test/Driver/windows-thumb.s =================================================================== --- /dev/null +++ test/Driver/windows-thumb.s @@ -0,0 +1,2 @@ +; RUN: %clang -target armv7-windows -c -### %s 2>&1 | FileCheck %s +; CHECK: "-triple" "thumbv7-