<div dir="ltr">This seems to have caused a libfuzzer test to fail here:<div><a href="http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48261" target="_blank">http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48261</a> </div><div><br></div><div>It's not easy to fix because -O0 is passed to clang-cl on Windows and clang elsewhere, so /Od won't do the trick without a substitution. This was kind of why I added -O0 in the first place. clang-cl more or less accepts all options unless they conflict, so I applied that logic to O0 as well.</div><div><br></div><div>I think the right thing to do is to make %cpp_compiler not expand to clang-cl if possible. I'll mark UNSUPPORTED for now and try to do that next.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 6:17 PM Nico Weber via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: nico<br>
Date: Wed Jul 10 18:18:05 2019<br>
New Revision: 365724<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=365724&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=365724&view=rev</a><br>
Log:<br>
clang-cl: Remove -O0 option<br>
<br>
cl.exe doesn't understand it; there's /Od instead. See also the review<br>
thread for r229575.<br>
<br>
Update lots of compiler-rt tests to use -Od instead of -O0.<br>
Ran `rg -l 'clang_cl.*O0' compiler-rt/test/ | xargs sed -i -c 's/-O0/-Od/'`<br>
<br>
Differential Revision: <a href="https://reviews.llvm.org/D64506" rel="noreferrer" target="_blank">https://reviews.llvm.org/D64506</a><br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Driver/CLCompatOptions.td<br>
<br>
Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=365724&r1=365723&r2=365724&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=365724&r1=365723&r2=365724&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)<br>
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Wed Jul 10 18:18:05 2019<br>
@@ -120,8 +120,6 @@ def _SLASH_J : CLFlag<"J">, HelpText<"Ma<br>
 def _SLASH_O : CLJoined<"O">,<br>
   HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,<br>
   MetaVarName<"<flags>">;<br>
-// FIXME: Not sure why we have -O0 here; MSVC doesn't support that.<br>
-def : CLFlag<"O0">, Alias<O0>, HelpText<"Disable optimization">;<br>
 def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,<br>
   HelpText<"Optimize for size  (like /Og     /Os /Oy /Ob2 /GF /Gy)">;<br>
 def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>