<div dir="ltr">David and all, a couple more questions. I stumbled upon <a href="http://llvm.org/docs/Packaging.html">http://llvm.org/docs/Packaging.html</a> and see a few other options. For a typical clang build where I am not hacking on clang, but I do want good error messages for debugging my programs, which options are recommended [1]? It seems like I should use --disable-assertions, but I'm not sure about enable-debug-symbols and enable-optimized (which seem at odds with each other?). I'm basically just looking for the same options that would come with a packaged build, but I do want to build from source.<div><br></div><div>Finally, when I'm done, how do I verify that the settings are correct? clang --version doesn't tell me much about if I built it correctly. [2]<br><div><br></div><div>Thank you,</div><div>Jim</div><div><br></div><div><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><tt class="" style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em"><span class="">[1] </span></tt></dt><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><tt class="" style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em"><span class="">--disable-assertions</span></tt></dt><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><span style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em">--enable-debug-symbols</span></dt><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><tt class="" style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em"><span class="">--enable-optimized</span></tt></dt><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><tt class="" style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em"><span class=""><br></span></tt></dt><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><tt class="" style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em"><span class="">[2]</span></tt></dt><dt style="color:rgb(0,0,0);font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;font-size:14px;line-height:21px"><tt class="" style="font-family:Consolas,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace;font-size:0.95em"><span class="">
<p class=""><span class="">$ clang --version</span></p>
<p class=""><span class="">clang version 3.9.0 (trunk 263648)</span></p>
<p class=""><span class="">Target: x86_64-apple-darwin15.0.0</span></p>
<p class=""><span class="">Thread model: posix</span></p>
<p class=""><span class="">InstalledDir: /Users/jim/toolchains/llvm/bin</span></p></span></tt></dt></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 2:05 PM, <a href="mailto:jpsota@gmail.com">jpsota@gmail.com</a> <span dir="ltr"><<a href="mailto:jpsota@gmail.com" target="_blank">jpsota@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Got it -- thanks!<div class="HOEnZb"><div class="h5"><span></span><br><br>On Wednesday, March 16, 2016, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 7:25 AM, <a>jpsota@gmail.com</a> via cfe-users <span dir="ltr"><<a>cfe-users@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, I recently installed "Release" clang (svn r263305) from source on my OSX machine, and it's compiling a 20 file C++ program about 50% slower than the natively installed clang 3.7 (that came with xcode, I believe, although I don't use xcode). I currently have both sets of tools installed and am able to switch back and forth and verify using time that clang 3.7 takes about 30 seconds and clang 3.9 takes about 45 seconds, on average (all flags, settings, etc. are the same for both). I did build with "Release" as the build type, although I also did set DLLVM_ENABLE_ASSERTIONS=ON (could this be the problem?). </div></div></blockquote><div><br></div><div>Yes, the build system should print a warning telling you that an assertions enabled build can be up to ten times slower. Performance comparisons/measurements of an assertions enabled compiler aren't something we really do/tune for.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>More details below. Please let me know if you have any ideas about why this newer clang would be noticable slower.</div><div><br></div><div>Generally, I'm just trying to use clang as a user, not a clang developer, so if you have general recommendations for how to configure this, please let me know.</div><div><br></div><div>Thank you,</div><div>Jim</div><div><br></div><div>How I configured and installed:</div><div><br></div><div>cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON ../llvm </div><div>make</div><div>cmake -DCMAKE_INSTALL_PREFIX=$CLANG_PREFIX -P cmake_install.cmake</div><div><br></div><div><br></div><div>Here are some specifics:</div><div><br></div><div>$ uname -a</div><div>Darwin localhost 15.0.0 Darwin Kernel Version 15.0.0: Wed Aug 26 16:57:32 PDT 2015; root:xnu-3247.1.106~1/RELEASE_X86_64 x86_64</div><div><br></div><div>$ clang --version</div><div>clang version 3.9.0 (trunk 263305)</div><div>Target: x86_64-apple-darwin15.0.0</div><div>Thread model: posix</div><div>InstalledDir: /Users/jim/toolchains/llvm/bin</div></div>
<br>_______________________________________________<br>
cfe-users mailing list<br>
<a>cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
<br></blockquote></div><br></div></div>
</blockquote>
</div></div></blockquote></div><br></div>