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

Samuel Benzaquen sbenza at google.com
Mon Jun 10 15:36:51 PDT 2013


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.


>
> Regards,
> Manish
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130610/c0b35a23/attachment.html>


More information about the cfe-dev mailing list