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

Hans Wennborg hans at chromium.org
Tue Jun 3 16:38:22 PDT 2014


On Tue, Jun 3, 2014 at 2:49 PM, Richard <legalize at xmission.com> wrote:
>
> In article <CAAt6xTsh=HMeMAzBkRkNQ9yTquhiuspvhm61i0ymXMoH9Bq8MQ at mail.gmail.com>,
>     Aaron Ballman <aaron at aaronballman.com> writes:
>
>> On Tue, Jun 3, 2014 at 5:13 PM, Richard <legalize at xmission.com> wrote:
>> >
>> > In article <CAAt6xTtpUJdD747X2A80oqcqvu1cW0i-R3NXSQ_B-7jgkq7p6Q at mail.gmail.
> com>,
>> >     Aaron Ballman <aaron at aaronballman.com> writes:
>> >> Doesn't this then requires consumers to also build with /MT when they
>> >> want to use clang as a library?
>> >
>> > Yes, it does.  It's worse than just a choice between static and
>> > dynamic, however.  You also don't want to mix release and debug runtimes.
>> > So that brings us to 4 combinations.
>>
>> Thank you for confirming my recollections!
>>
>> Personally, I think that if someone wants a debug version of the
>> libraries, they can build it themselves (we can do release/release
>> with symbols, but that doesn't affect the build switch in question).
>
> I'm not talking about debug versions of the clang libraries.  I'm
> talking about using the release version of the C++ runtime in the clang
> code and then (because you're debugging) you want to use the debug C++
> runtime in your code.  When the libraries are static, this is a no-no.
> If the libraries were DLLs, then this would be OK.  (It has to be,
> they don't give you versions of the system DLLs that are built with
> the debug C++ runtime.)
>
> I think it might also be OK if the C++ runtime were linked to
> dynamically instead of statically.
>
>> I
>> really do not think we should use /MT for the prebuilt SDK binaries;
>> that's the least-friendly option because it requires our users to
>> strictly adhere to our build settings. If we wanted to package with
>> multiple builds, that's a whole different story.
>
> Yeah, I think the whole problem stems from over-aggressive
> specification of static linkage for the C++ runtime.

I think /MT is right for the prebuilt binaries. For the libraries, I'm
not so sure. I'm not familiar with how libraries are usually shipped
on Windows.

Maybe the right thing to do is to ship the toolchain and SDK as
different packages? That would save on download time for those who
just want the toolchain, and we can figure out what the optimal build
settings are for the library separately.

 - Hans



More information about the cfe-dev mailing list