[cfe-dev] RFC: Clang driver redesign

David Chisnall csdavec at swan.ac.uk
Wed Nov 9 03:06:09 PST 2011


On 9 Nov 2011, at 00:19, Seth Cantrell wrote:

> Would the cost of always linking to the standard c++ library, unless asked not to, be too much?

It comes with its own problems.  I recently spent some time tracking down a bug that was caused by the build system that I was using deciding that every project that included any C++ source files needed to be linked with the C++ compiler.  This dragged in the C++ standard library, which broke several things.  

If we were defining a completely new driver, I'd say that we should never link the C++ standard library unless asked to do so.  We don't automatically link in libobjc when linking Objective-C code and, unlike lib[std]c{xx,++}, it is not possible to write Objective-C code that works without libobjc linked.  This is even more important now that there is often a choice of C++ standard library implementation available.

David



More information about the cfe-dev mailing list