[cfe-dev] libc++ clean-up
Howard Hinnant
howard.hinnant at gmail.com
Thu Sep 4 13:09:50 PDT 2014
On Sep 4, 2014, at 4:01 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
>
> On Sep 4, 2014, at 5:36 AM, C. Bergström <cbergstrom at pathscale.com> wrote:
>
>>
>> Hi
>>
>> Would patches for cleaning up unnecessary #include for libc++ be accepted? In general it seems like it has followed the rather poorly designed GNU STL rather than being more strict.
>>
>> A simple preprocessed hello world which only #include <iostream>
>>
>> CC -E hello.cxx -std=c++11 > hello-libcxx.e.cxx
>>
>> du -sh *.e.cxx
>> 532K hello-stdcxx.e.cxx
>> 1.3M hello-libcxx.e.cxx
>>
>> The effects of this cascade into being a measurable performance difference later on in the compiler. (My numbers may not be exactly llvm upstream though - ymmv) Basically the Module size and other things are larger as a result.
>
> Note that libc++ contains a lot of stuff that libstdc++ does not (all of the C++14 additions, for example).
>
> However, I’d be interested in suggestions/proposals for making the compile-time burden smaller.
Adding #includes to <__config>, such as <unistd.h> and <errno.h> contributes to poor compile times.
Howard
More information about the cfe-dev
mailing list