<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 4, 2014 at 11:31 AM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="rtl"><div dir="ltr">Hi Gaby,</div><div dir="ltr">
<br></div><div dir="ltr">The solution file has all the configurations, you need to tell msbuild which configuration to build, like this:</div><div dir="ltr"><br></div>

<div dir="ltr">  msbuild llvm.sln /target:ALL_BUILD /property:Configuration=RelWithDebInfo<br></div><div dir="ltr"><br></div><div dir="ltr">Yaron</div></div></blockquote><div><br></div><div>That did it!</div><div><br></div>
<div>The problem was that I expected after running cmake with -DCMAKE_BUILD_TYPE=Release to have the project files generated only for a Release build type.  It turns out CMake does not do that.  After your suggestion, I found this entertaining discussion of this behavior:</div>
<div><br></div><div>   <a href="http://stackoverflow.com/questions/19024259/how-to-change-the-build-type-to-release-mode-in-cmake">http://stackoverflow.com/questions/19024259/how-to-change-the-build-type-to-release-mode-in-cmake</a></div>
<div><br></div><div>It would be useful to add a documentation entry to </div><div><br></div><div>    <a href="http://clang.llvm.org/get_started.html">http://clang.llvm.org/get_started.html</a></div><div><br></div><div>for "building Clang from the command line (using PowerShell)", not just building from VS IDE.</div>
<div>At the very least, a note saying that  CMAKE_BUILD_TYPE is meaningful only for non-Windows target would be useful :-)</div><div><br></div><div>Thanks,</div><div><br></div><div>-- Gaby</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="rtl"><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

<div dir="ltr">2014-06-04 21:12 GMT+03:00 Gabriel Dos Reis <span dir="ltr"><<a href="mailto:gdr@integrable-solutions.net" target="_blank">gdr@integrable-solutions.net</a>></span>:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="h5">

<div dir="ltr"><div>On Wed, Jun 4, 2014 at 8:30 AM, Richard <span dir="ltr"><<a href="mailto:legalize@xmission.com" target="_blank">legalize@xmission.com</a>></span> wrote:<br></div><div class="gmail_extra">

<div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In article <<a href="mailto:CANa4zJryi4eyWDXYwxWViHC6SLOZxKF2pucrdHDFFLnmxKExjg@mail.gmail.com" target="_blank">CANa4zJryi4eyWDXYwxWViHC6SLOZxKF2pucrdHDFFLnmxKExjg@mail.gmail.com</a>>,<br>




<div>    Yaron Keren <<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>> writes:<br>
<br>
> FWIW, I found that clang compiled with Visual C++ in Debug mode too slow,<br>
> for two reasons.<br>
> The first reason was that optimizations are turned off. The second one is<br>
</div>> trickier, if the libraries are Debug, Visual C++ defines _DEBUG [...]<br>
<br>
Ah yes, I remember.  Using the release built clang libraries the headers<br>
end up doing different things because _DEBUG is defined in your<br>
project and not defined when the libraries were compiled.<br>
<br>
So this is another wrinkle that is specific to clang and not the CRT.</blockquote><div><br></div></div><div>Some feedback on Debug vs. non-Debug build.</div><div><br></div><div>I tried a build setup that I haven't seen documented anywhere on Clang's website (or on The Internet):  </div>



<div>    (1) use PowerShell as working shell --  <a href="http://en.wikipedia.org/wiki/Windows_PowerShell" target="_blank">http://en.wikipedia.org/wiki/Windows_PowerShell</a></div><div>    (2) use cmake to generate project files</div>


<div>
    (3) use msbuild to launch and drive the build</div><div><br></div><div>Things seem to progress smoothly except that for some reasons specifying -DCMAKE_BUILD_TYPE=Release on the command line appears to have no effect at tall, so cmake seems to end up generating projects for Debug build.  Which fails at the very last step of linking, with the linker complaining that one should not use Debug CRT build (/MD).</div>



<div><br></div><div>The ability to build from PowerShell means automation from a very nice and increasingly popular shell to work with on Windows platforms :-)</div><div><br></div><div>-- Gaby</div><div>      </div></div>



</div></div>
<br></div></div><div class="">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></div></blockquote></div><br></div>
</blockquote></div><br></div></div>