]> granicus.if.org Git - clang/commit
clang-cl: fix passing optimization level to cl.exe in /fallback mode
authorHans Wennborg <hans@hanshq.net>
Tue, 24 Sep 2013 18:17:21 +0000 (18:17 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 24 Sep 2013 18:17:21 +0000 (18:17 +0000)
commita8ffc16dc1c5b21c3fdb2b53a9c0eb5af5d3babb
treeb9e6897fba5a5a4e57addde4e18b0b221992e100
parent1413d629953d24647afaea7f0e0d16078d95ab7c
clang-cl: fix passing optimization level to cl.exe in /fallback mode

We were previously mostly passing it through, but -O0 and -O3 are not valid
options to cl.exe.

We should translate -O0 to /Od and -O3 to /Ox. -O{1,2,s} get passed through.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191323 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/Tools.cpp
test/Driver/cl-fallback.c