r365724 - clang-cl: Remove -O0 option

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 18:18:05 PDT 2019


Author: nico
Date: Wed Jul 10 18:18:05 2019
New Revision: 365724

URL: http://llvm.org/viewvc/llvm-project?rev=365724&view=rev
Log:
clang-cl: Remove -O0 option

cl.exe doesn't understand it; there's /Od instead. See also the review
thread for r229575.

Update lots of compiler-rt tests to use -Od instead of -O0.
Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'`

Differential Revision: https://reviews.llvm.org/D64506

Modified:
    cfe/trunk/include/clang/Driver/CLCompatOptions.td

Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=365724&r1=365723&r2=365724&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Wed Jul 10 18:18:05 2019
@@ -120,8 +120,6 @@ def _SLASH_J : CLFlag<"J">, HelpText<"Ma
 def _SLASH_O : CLJoined<"O">,
   HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
   MetaVarName<"<flags>">;
-// FIXME: Not sure why we have -O0 here; MSVC doesn't support that.
-def : CLFlag<"O0">, Alias<O0>, HelpText<"Disable optimization">;
 def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
   HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;
 def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,




More information about the cfe-commits mailing list