bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Feature Submission for GNU Make


From: Howard Chu
Subject: Re: New Feature Submission for GNU Make
Date: Tue, 31 May 2011 09:37:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b13pre) Gecko/20110322 Firefox/4.0b13pre SeaMonkey/2.1b2pre

Edward Welbourne wrote:
Pretty weak. If a few more include paths were added to the project it would
still break, regardless of your patch.

When you have thousands of object files, shortening the name of each
by several bytes when invoking ar can make room for really quite a lot
more files before you run up against the command-line length limit.

Never understimate the value of a modest shortening of file names -
when our ar command-line got to about 230 kibibytes, we had to re-work
the way we invoked ar !

Whatever you're doing, you're doing it wrong. ;)

If you're tossing a bunch of object files into an ar library simply for grouping purposes, and all of the object files will eventually be used in the final executable, it's faster to use ld -r and combine groups of them all into a single object file. If you profiled your build I'm sure you would find that a large percentage of time is being wasted in ar itself.

And if you're really running a build with thousands of object files, on a frequent basis, you're foolish not to profile it and figure out what else you're doing wrong. Giant monolithic command lines also prevent you from leveraging parallel make, so that's another reason not to do things that way...

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]