<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-2022-JP">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font size="-1">Hello Eric,</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">Not having much experience with LLVM to speak of
here ...</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">It may be useful to compile with a recent version
of clang from your distribution. On Xubuntu that would be</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">apt install clang</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">I am also using the llvm lld linker that does not
use as much memory.<br>
</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">apt install lld</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">The clang build command here is</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang"
-DLLVM_USE_LINKER=lld -DCMAKE_BUILD_TYPE="Release"
-DLLVM_ENABLE_ASSERTIONS=On ../llvm &> cmake.log</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">The default CMAKE_BUILD_TYPE is "Debug" that uses
more memory and much more disk space than "Release".</font></p>
<p><font size="-1"><br>
</font> </p>
<p><font size="-1">"LLVM_ENABLE_ASSERTIONS=On" is noted on the
Testing Guide page. <a class="moz-txt-link-freetext" href="http://llvm.org/docs/TestingGuide.html">http://llvm.org/docs/TestingGuide.html</a></font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">Putting all the terminal output in cmake.log
allows easy review of any issues.</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">Also add the following two lines to
/etc/environment to default to compiling with clang. Log out and
back in to get these to take. echo $CC to confirm.<br>
</font></p>
<p><font size="-1">export CC=clang<br>
export CXX=clang++</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">The idea of using clang instead of gcc is that
any issues should be reduced (the context scale is reduced) and
that remaining issues will be directly related to the user
environment on this list.</font></p>
<p><font size="-1"><br>
</font></p>
<p><font size="-1">Regards, Neil Nelson<br>
</font></p>
<p><font size="-1"><br>
</font></p>
<div class="moz-cite-prefix"><font size="-1">On 7/18/19 6:00 AM,
Erik Hogeman via llvm-dev wrote:</font><br>
</div>
<blockquote type="cite"
cite="mid:DBBPR08MB482353AE16EF60991D46B60C97C90@DBBPR08MB4823.eurprd08.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-2022-JP">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<span></span>
<div><br>
</div>
Building LLVM with a newer GCC version seems to generate several
compiler warnings, some of which look like false positives. For
example, the '-Winit-list-lifetime' warning added in GCC9
triggers for one of the constructors for ArrayRef, the one
taking an initializer_list.<br>
<div><br>
</div>
<div>How are false positive warnings dealt with in LLVM in
general? It's of course possible to just ignore them or use
compiler flags to disable them, but with that I think you
would risk missing other actual meaningful warnings.</div>
<div>Would it make sense to add explicit diagnostic pragmas in
the code for such cases, to only silence the warning where
they are known to be false positives, or would such a patch be
likely to face pushback during review?</div>
<div><br>
</div>
<div>I apologize if this question is already answered somewhere
in the documentation, I tried looking there first but I could
not find anything.<br>
</div>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;
font-size:12pt; color:rgb(0,0,0)">
<div>Cheers,</div>
<div>Erik<br>
</div>
<span></span></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap=""><font size="-1">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></font>
</pre>
</blockquote>
</body>
</html>