[cfe-dev] Clang 3.5 Release Pre-Pre-Pre-Announcement

Gabriel Dos Reis gdr at integrable-solutions.net
Thu Jun 5 03:19:22 PDT 2014


On Wed, Jun 4, 2014 at 11:31 AM, Yaron Keren <yaron.keren at gmail.com> wrote:

> Hi Gaby,
>
> The solution file has all the configurations, you need to tell msbuild
> which configuration to build, like this:
>
>   msbuild llvm.sln /target:ALL_BUILD /property:Configuration=RelWithDebInfo
>
> Yaron
>

That did it!

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:


http://stackoverflow.com/questions/19024259/how-to-change-the-build-type-to-release-mode-in-cmake

It would be useful to add a documentation entry to

    http://clang.llvm.org/get_started.html

for "building Clang from the command line (using PowerShell)", not just
building from VS IDE.
At the very least, a note saying that  CMAKE_BUILD_TYPE is meaningful only
for non-Windows target would be useful :-)

Thanks,

-- Gaby


>
>
> 2014-06-04 21:12 GMT+03:00 Gabriel Dos Reis <gdr at integrable-solutions.net>
> :
>
>> On Wed, Jun 4, 2014 at 8:30 AM, Richard <legalize at xmission.com> wrote:
>>
>>> In article <
>>> CANa4zJryi4eyWDXYwxWViHC6SLOZxKF2pucrdHDFFLnmxKExjg at mail.gmail.com>,
>>>     Yaron Keren <yaron.keren at gmail.com> writes:
>>>
>>> > FWIW, I found that clang compiled with Visual C++ in Debug mode too
>>> slow,
>>> > for two reasons.
>>> > The first reason was that optimizations are turned off. The second one
>>> is
>>> > trickier, if the libraries are Debug, Visual C++ defines _DEBUG [...]
>>>
>>> Ah yes, I remember.  Using the release built clang libraries the headers
>>> end up doing different things because _DEBUG is defined in your
>>> project and not defined when the libraries were compiled.
>>>
>>> So this is another wrinkle that is specific to clang and not the CRT.
>>
>>
>> Some feedback on Debug vs. non-Debug build.
>>
>> I tried a build setup that I haven't seen documented anywhere on Clang's
>> website (or on The Internet):
>>     (1) use PowerShell as working shell --
>> http://en.wikipedia.org/wiki/Windows_PowerShell
>>     (2) use cmake to generate project files
>>      (3) use msbuild to launch and drive the build
>>
>> 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).
>>
>> The ability to build from PowerShell means automation from a very nice
>> and increasingly popular shell to work with on Windows platforms :-)
>>
>> -- Gaby
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140605/e0d93360/attachment.html>


More information about the cfe-dev mailing list