Author: rengolin Date: Wed Jul 27 09:12:20 2016 New Revision: 276869 URL: http://llvm.org/viewvc/llvm-project?rev=276869&view=rev Log: [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ö. Added: cfe/trunk/test/Driver/windows-thumb.s Modified: cfe/trunk/lib/Driver/ToolChain.cpp Modified: cfe/trunk/lib/Driver/ToolChain.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=276869&r1=276868&r2=276869&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChain.cpp (original) +++ cfe/trunk/lib/Driver/ToolChain.cpp Wed Jul 27 09:12:20 2016 @@ -493,8 +493,10 @@ std::string ToolChain::ComputeLLVMTriple 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 Added: cfe/trunk/test/Driver/windows-thumb.s URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/windows-thumb.s?rev=276869&view=auto ============================================================================== --- cfe/trunk/test/Driver/windows-thumb.s (added) +++ cfe/trunk/test/Driver/windows-thumb.s Wed Jul 27 09:12:20 2016 @@ -0,0 +1,2 @@ +; RUN: %clang -target armv7-windows -c -### %s 2>&1 | FileCheck %s +; CHECK: "-triple" "thumbv7- _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits