<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 12, 2021 at 9:42 AM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</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">On Tue, Jan 12, 2021 at 12:37 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On Tue, Jan 12, 2021 at 9:34 AM Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> wrote:<br>
>><br>
>> On Tue, Jan 12, 2021 at 12:17 PM David Blaikie via llvm-dev<br>
>> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> ><br>
>> > If they prove to be good cleanup/improvements to the code in general - but we don't try too hard to be -Werror clean on every compiler, mostly just self-hosted clang.<br>
>><br>
>> This doesn't match my understanding -- we have a documented CMake<br>
>> option that controls -Werror and I think we've always tried to be<br>
>> -Werror clean with Clang, GCC, and MSVC builds before to support that<br>
>> build configuration.<br>
><br>
><br>
> Certainly I don't think we've ever outright rejected any path forward for avoiding a warning from any supported compiler (either by changing the code or suppressing the warning in the LLVM build in general) - though I don't think practically speaking we try very hard to keep all the supported compiler versions (not just brands, but the full supported version range of each) -Werror clean - about the cleanest would be a selfhost build, there are many buildbots/etc that check that is -Werror clean.<br>
<br>
My recollection is that we only require the selfhost build to be<br>
-Werror clean (with a bot configured to test that) but that we strive<br>
to be -Werror clean when it won't introduce unwanted changes to the<br>
code (in which case, we're happier to disable the warning within<br>
CMake). So I think we may be saying the same things with different<br>
words, but maybe we have a different definition of "try very hard"<br>
here. :-)</blockquote><div><br>Yep yep. Sounds roughly similar<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">o sometimes it's necessary to do some warning cleanup even for undesirable warnings)<br>
>><br>
>> I agree that we don't want large amounts of code churn for warnings<br>
>> that are typically off by default in our default cmake configuration<br>
>> (or could be made off by default if they're sufficiently low quality),<br>
>> but I think this situation is different. I think these new warnings<br>
>> were recently introduced and are ones we would typically fix with an<br>
>> NFC patch.<br>
>><br>
>> ~Aaron<br>
>><br>
>> ><br>
>> > On Tue, Jan 12, 2021 at 9:14 AM Paul C. Anagnostopoulos via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> >><br>
>> >> When I build on Windows 7 with Visual Studio, I get various warnings that were ignored until I recently set<br>
>> >><br>
>> >> LLVM_ENABLE_WERROR:BOOL=ON<br>
>> >><br>
>> >> One example is shown below. Should I take the time to hunt these down and fix them?<br>
>> >><br>
>> >><br>
>> >> **********************************************************************<br>
>> >> ** Visual Studio 2019 Developer Command Prompt v16.8.1<br>
>> >> ** Copyright (c) 2020 Microsoft Corporation<br>
>> >> **********************************************************************<br>
>> >><br>
>> >> D:\LLVM\build>build-targets.bat<br>
>> >> 1 file(s) copied.<br>
>> >> [363/1578] Building CXX object lib\CodeGen\...LLVMGlobalISel.dir\MachineIRBuilder.cpp.obj<br>
>> >> FAILED: lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/MachineIRBuilder.cpp.obj<br>
>> >> C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx86\x86\cl.exe /nolog<br>
>> >> o /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS<br>
>> >> -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_HAS_EXCEPTI<br>
>> >> ONS=0 -D_LARGEFILE_SOURCE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE<br>
>> >> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\CodeGen\Global<br>
>> >> ISel -IC:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel -Iinclude -IC:\LLVM\llvm-project\l<br>
>> >> lvm\include /DWIN32 /D_WINDOWS /WX /Zc:inline /Zc:__cplusplus /Zc:strictStrings /Oi /Zc:<br>
>> >> rvalueCast /bigobj /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd<br>
>> >> 4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd47<br>
>> >> 02 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091<br>
>> >> -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /MDd /Zi /Ob0 /Od /RTC1 /EHs-c- /GR- -st<br>
>> >> d:c++14 /showIncludes /Folib\CodeGen\GlobalISel\CMakeFiles\LLVMGlobalISel.dir\MachineIRBui<br>
>> >> lder.cpp.obj /Fdlib\CodeGen\GlobalISel\CMakeFiles\LLVMGlobalISel.dir\LLVMGlobalISel.pdb /F<br>
>> >> S -c C:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel\MachineIRBuilder.cpp<br>
>> >> C:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel\MachineIRBuilder.cpp(657): error C2220: t<br>
>> >> he following warning is treated as an error<br>
>> >> C:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel\MachineIRBuilder.cpp(657): warning C4018:<br>
>> >> '>=': signed/unsigned mismatch<br>
>> >> [366/1578] Building CXX object lib\CodeGen\...CMakeFiles\LLVMGlobalISel.dir\Utils.cpp.obj<br>
>> >> ninja: build stopped: subcommand failed.<br>
>> >><br>
>> >> _______________________________________________<br>
>> >> LLVM Developers mailing list<br>
>> >> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> >> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
>> ><br>
>> > _______________________________________________<br>
>> > LLVM Developers mailing list<br>
>> > <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>