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

Manish Verma manish.verma at arm.com
Wed Jun 12 13:02:22 PDT 2013


Hi Sam,

Thank you for the work. I can confirm that we are no longer seeing the build
failure with MSVC.

Cheers,
Manish

> -----Original Message-----
> From: Samuel Benzaquen [mailto:sbenza at google.com]
> Sent: 11 June 2013 21:28
> To: Manish Verma
> Cc: Nicholas Braden; Clang; Manuel Klimek
> Subject: Re: [cfe-dev] 'too many sections' when building an object
> file for llvm/clang
> 
> 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








More information about the cfe-dev mailing list