Re: r365724 - clang-cl: Remove -O0 option
Looks like you didn't add UNSUPPORTED and went for the right fix immediately in https://reviews.llvm.org/D64587. Thanks for taking care of this! On Thu, Jul 11, 2019 at 4:04 PM Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This seems to have caused a libfuzzer test to fail here: > http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48261 > > 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. > > 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. > > On Wed, Jul 10, 2019 at 6:17 PM Nico Weber via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: nico >> Date: Wed Jul 10 18:18:05 2019 >> New Revision: 365724 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=365724=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=365723=365724=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<"">; >> -// FIXME: Not sure why we have -O0 here; MSVC doesn't support that. >> -def : CLFlag<"O0">, Alias, 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"]>, >> >> >> ___ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r365724 - clang-cl: Remove -O0 option
This seems to have caused a libfuzzer test to fail here: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/48261 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. 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. On Wed, Jul 10, 2019 at 6:17 PM Nico Weber via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: nico > Date: Wed Jul 10 18:18:05 2019 > New Revision: 365724 > > URL: http://llvm.org/viewvc/llvm-project?rev=365724=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=365723=365724=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<"">; > -// FIXME: Not sure why we have -O0 here; MSVC doesn't support that. > -def : CLFlag<"O0">, Alias, 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"]>, > > > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r365724 - clang-cl: Remove -O0 option
Author: nico Date: Wed Jul 10 18:18:05 2019 New Revision: 365724 URL: http://llvm.org/viewvc/llvm-project?rev=365724=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=365723=365724=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<"">; -// FIXME: Not sure why we have -O0 here; MSVC doesn't support that. -def : CLFlag<"O0">, Alias, 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"]>, ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits