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

Richard legalize at xmission.com
Tue Jun 3 14:49:55 PDT 2014


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.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>



More information about the cfe-dev mailing list