<div dir="ltr">I recommend ninja.exe if you will not use IDE.<div><a href="https://ninja-build.org/">https://ninja-build.org/</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 9, 2017 at 7:32 AM Nikodemus Siivola <<a href="mailto:nikodemus@random-state.net">nikodemus@random-state.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you for assistance!<div><br></div><div>I can confirm that</div><div><br></div><div> cmake --build . --config Release</div><div><br></div><div>works. :)</div><div><br>Both Release and RelWithDebInfo builds work at reasonable speeds, even with assertions enabled, so I'm a happy camper.<div><br></div><div>Cheers,</div><div><br></div><div> -- nikodemus</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 8, 2017 at 11:07 AM, Nikodemus Siivola <span dir="ltr"><<a href="mailto:nikodemus@random-state.net" target="_blank">nikodemus@random-state.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">cmake --build</div><div class="m_-7903755293516102313HOEnZb"><div class="m_-7903755293516102313h5"><div class="gmail_extra"><br><div class="gmail_quote">On 8 Jun 2017 11.05, "NAKAMURA Takumi" <<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Which tool are you using? msbuild.exe, devenv.exe, or cmake.exe --build ?<div><br></div><div>With cmake.exe, "cmake --config Release" would be available. (I haven't tried)</div><div><br></div><div>See also; <a href="http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc19-DA/builds/2179/steps/build_llvm_tblgen/logs/stdio" target="_blank">http://bb.pgr.jp/builders/msbuild-llvmclang-x64-msc19-DA/builds/2179/steps/build_llvm_tblgen/logs/stdio</a></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 8, 2017 at 4:56 PM Nikodemus Siivola <<a href="mailto:nikodemus@random-state.net" target="_blank">nikodemus@random-state.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I've been building from the command line, the IDE is a foreign land to me, but I'll give it a try. :)<div dir="auto"><br></div><div dir="auto">Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 Jun 2017 10.53, "NAKAMURA Takumi" <<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Assuming you are using Visual Studio IDE, choose build configuration in toolbar and build again. Debug by default.<div>CMAKE_BUILD_TYPE should not be set for Visual Studio Generator.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 8, 2017 at 4:50 PM Nikodemus Siivola <<a href="mailto:nikodemus@random-state.net" target="_blank">nikodemus@random-state.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="ltr">Aha! Release/bin has just llvm-lit.py in it, whereas Debug/bin has everything. So not a release build after all.<br><br><div>$ grep CMAKE_BUILD_TYPE CMakeCache.txt</div><div>CMAKE_BUILD_TYPE:UNINITIALIZED=Release</div><div><br></div><div>...which seems odd both for claiming to be uninitialized and not matching the binaries.<br><br>So I should delete that line and rebuild with<br><br></div><div dir="auto">cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo</div><div dir="auto"><br></div><div dir="auto">?</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto"> -- nikodemus</div><div dir="auto"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 8, 2017 at 8:36 AM, NAKAMURA Takumi <span dir="ltr"><<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</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">I wonder you specified -DCMAKE_BUILD_TYPE=Release to Visual Studio Generator.<div><br></div><div>Make sure;</div><div>- Delete CMAKE_BUILD_TYPE</div><div>- clang-cl.exe is generated as Release\bin\clang-cl.exe in your build tree.</div><div> Visual Studio (and msbuild.exe) has multiple configurations.<div><div class="m_-7903755293516102313m_-6160667136938068367m_1208109226636198403m_-3458810737524671295m_-7621063816988547819m_-1779489019215591057m_-1112841679934854644m_-3742298540307368030h5"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 8, 2017 at 1:57 AM Nikodemus Siivola via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">One core out of eight sounds plausible indeed! Never thought of that, more used to *nix style usage numbers where 1.0 = one core. :) <div><br></div><div><div>Did a release build:</div><div><br> cmake -G "Visual Studio 14 2015" \</div><div> -DCMAKE_INSTALL_PREFIX=C:\LLVM \</div><div> -DCMAKE_BUILD_TYPE=Release \</div><div> -DLLVM_TARGETS_TO_BUILD=X86 \</div><div> -DLLVM_ENABLE_CXX1Y=On \</div><div> ../<br><br></div><div>That clang still takes >10s to build a hello-world.<br><br>Any suggestions?<br><br>Cheers,</div></div><div><br></div><div> -- nikodemus</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 1, 2017 at 6:11 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</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"><br><br><div class="gmail_quote"><span><div dir="ltr">On Thu, Jun 1, 2017 at 12:48 AM Hahnfeld, Jonas via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7903755293516102313m_-6160667136938068367m_1208109226636198403m_-3458810737524671295m_-7621063816988547819m_-1779489019215591057m_-1112841679934854644m_-3742298540307368030m_6117740289349486060m_-6684843500675357546m_-6997330470417083920m_1826797291629334283WordSection1"><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">> </span><span lang="EN-US">cmake -G "MinGW Makefiles" \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> -DCMAKE_INSTALL_PREFIX=C:\LLVM \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> -DCMAKE_BUILD_TYPE=Debug \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> -DLLVM_ENABLE_ASSERTIONS=On \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> -DLLVM_TARGETS_TO_BUILD=X86 \<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> </span>-DLLVM_ENABLE_CXX1Y=On \<u></u><u></u></p><p class="MsoNormal"> ../<u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p></div></div><div lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7903755293516102313m_-6160667136938068367m_1208109226636198403m_-3458810737524671295m_-7621063816988547819m_-1779489019215591057m_-1112841679934854644m_-3742298540307368030m_6117740289349486060m_-6684843500675357546m_-6997330470417083920m_1826797291629334283WordSection1"><p class="MsoNormal"><span lang="EN-US">CMAKE_BUILD_TYPE=Debug will result in a non-optimized compiler. Although I don’t have numbers at hand, you might want to set CMAKE_BUILD_TYPE=Release.</span></p></div></div></blockquote></span><div><br>Also <span style="color:rgb(33,33,33);font-size:13px">-DLLVM_ENABLE_ASSERTIONS=On<br></span><br>The build system at some point had a warning informing users that this might produce an order of magnitude (or more) slower compiler.<br><br>I'd suggest you keep an optimized and unoptimized compiler around. Though even then, Hello World doesn't take me 10 seconds to compile... so maybe there's other things going on. Sounds like you'd want one set of LLVM stuff with all the debugging knobs turned on (exactly as you've built) & use that with your frontend, and another, release build, for running clang, etc for practical porpoises.<br><br><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-7903755293516102313m_-6160667136938068367m_1208109226636198403m_-3458810737524671295m_-7621063816988547819m_-1779489019215591057m_-1112841679934854644m_-3742298540307368030m_6117740289349486060m_-6684843500675357546h5"><div lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7903755293516102313m_-6160667136938068367m_1208109226636198403m_-3458810737524671295m_-7621063816988547819m_-1779489019215591057m_-1112841679934854644m_-3742298540307368030m_6117740289349486060m_-6684843500675357546m_-6997330470417083920m_1826797291629334283WordSection1"><p class="MsoNormal"><span lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Regards,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Jonas</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> cfe-dev [mailto:<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.llvm.org</a>] <b>On Behalf Of </b>Nikodemus Siivola via cfe-dev<br><b>Sent:</b> Thursday, June 1, 2017 9:43 AM<br><b>To:</b> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br><b>Subject:</b> [cfe-dev] clang-cl.exe (32bit) dog slow, capping at ~16.5% CPU<u></u><u></u></span></p></div></div><div lang="DE" link="#0563C1" vlink="#954F72"><div class="m_-7903755293516102313m_-6160667136938068367m_1208109226636198403m_-3458810737524671295m_-7621063816988547819m_-1779489019215591057m_-1112841679934854644m_-3742298540307368030m_6117740289349486060m_-6684843500675357546m_-6997330470417083920m_1826797291629334283WordSection1"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">I was wondering why compiles were so slow and noticed that clang-cl.exe is never consuming more than ~16.5% CPU on my laptop. This is an i7-7700HQ, 32GB memory, running Windows 10 Pro.<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Memory and disk use appear trivial as well, and the computer was otherwise mostly idle at the time. <u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Compiling a trivial hello-world takes 11 seconds:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">$ clang --version</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">clang version 4.0.1</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">Target: i686-pc-windows-msvc</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">Thread model: posix</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">InstalledDir: C:\LLVM\bin</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">$ cat foo.cpp</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">#include <iostream></span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">int main()</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">{</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New""> std::cout << "Yo" << std::endl;</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New""> return 0;</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">}</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">$ time clang-cl foo.cpp</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">real 0m11.886s</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">user 0m0.015s</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-family:"Courier New"">sys 0m0.015s</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Compiling the same program under the Linux subsystem and clang-3.5 takes 0.16seconds. The Visual Studio commandline compiler is likewise almost instant.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">This is release_40 from one of the git mirrors, build built as part of the LLVM tree using Visual Studio 2015 command prompt, with (I think, not 100% sure, don't know cmake well enough to figure out after the fact) the following cmake invovations:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">cmake -G "MinGW Makefiles" \<u></u><u></u></p></div><div><p class="MsoNormal"> -DCMAKE_INSTALL_PREFIX=C:\LLVM \<u></u><u></u></p></div><div><p class="MsoNormal"> -DCMAKE_BUILD_TYPE=Debug \<u></u><u></u></p></div><div><p class="MsoNormal"> -DLLVM_ENABLE_ASSERTIONS=On \<u></u><u></u></p></div><div><p class="MsoNormal"> -DLLVM_TARGETS_TO_BUILD=X86 \<u></u><u></u></p></div><div><p class="MsoNormal"> -DLLVM_ENABLE_CXX1Y=On \<u></u><u></u></p></div><div><p class="MsoNormal"> ../<u></u><u></u></p></div></div><div><p class="MsoNormal">cmake --build .<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Did I pick spectacularly stupid build options or something?<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>Any suggestions for figuring out what is going on? (Windows is not my regular platform so I'm a bit out of depth here.)<u></u><u></u></p><div><p class="MsoNormal">Cheers,<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"> -- nikodemus<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>
</blockquote></div><br></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div></div></div></div>
</blockquote></div><br></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div></div>
</div></div></blockquote></div><br></div>
</blockquote></div>