Linking large D programms
newshound1 at digitalmars.com
Sat May 1 08:29:21 PDT 2010
Robert Clipsham wrote:
> I hear GOLD is destined to replace ld, and is supposedly far faster.
> Your distro might have a repository for it, if not you'll have to
> compile it from source. It might also be worth profiling (go)ld while
> it's linking, and seeing where it's spending the most time. If it's
> spending a lot of time reading object files then the solution would be
> to combine some object files into one before invoking the linker, eg
> using dmd's -lib switch or passing all the files at once and using -of
> foo.o so only one object file is produced.
Robert's right, passing as many as you can on one command line with -offoo.o
will result in one .o file, this should greatly speed linking.
More information about the Digitalmars-d