[cfe-dev] 'too many sections' when building an object file for llvm/clang

Samuel Benzaquen sbenza at google.com
Tue Jun 11 13:27:56 PDT 2013


On Mon, Jun 10, 2013 at 6:36 PM, Samuel Benzaquen <sbenza at google.com> wrote:

> On Mon, Jun 10, 2013 at 5:34 AM, Manish Verma <manish.verma at arm.com>wrote:
>
>> Hi Samuel,
>>
>> Thank you for looking at this issue.
>>
>> > I see a few solutions for this:
>> >  1. For any non-template matcher, move its code to an ASTMatchers.cpp
>> > to be created. This would take away a big chunk of the size of
>> > Registry.cpp. I don't know if this will just move the problem to
>> > ASTMatchers.cpp instead.
>> >  2. Split Registry.cpp in smaller compilation units, each with a
>> > subset of the matchers. It should be easier than (1).
>>
>> I think it would be better to implement option (2) while you look
>> for a better solution. We are happy to do the testing at our end,
>> as none of build-bots are testing this configuration.
>>
>
> I found what appears to be a solution for the problem without having to
> break the file.
> Removed a bunch of template instantiations from the marshaller functions.
> In particular, std::list<Matcher<T>> and std::vector<Matcher<T>*> for each
> node T. Just that one change seemed to take the unit below the limit.
> Sent the change on http://llvm-reviews.chandlerc.com/D948. If you want,
> please patch the change and let me know if it fixes the issue. I don't have
> that environment, so I can't test it there.
>

The change was submitted.
I found more opportunities to reduce the number of symbols changing some
things in ASTMatchers.h, but that will take a little more work. We can do
it if necessary.
_Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130611/79ff666a/attachment.html>


More information about the cfe-dev mailing list