[Top][All Lists]

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

Speeding up libtool

From: Robert Ögren
Subject: Speeding up libtool
Date: Mon, 14 Mar 2005 23:11:00 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hi everybody,

I looked through the TODO thread from 2004-11 and saw some talk about speeding up libtool. I'm particularly interested in improved compilation speed on Cygwin (Windows). Is there any progress on this?

A while ago I created a temporary solution for myself which caches the commands executed by libtool 1.5 to speed up the compilation process. It is a small Perl script that is run in place of libtool and that maintains a simple database of libtool command line => resulting commands by running the real libtool any time a command is not already in the database and parsing its standard out and storing the commands and .la files. It understands very little of what libtool actually does, the speedup is achieved by invoking libtool less often.

By replacing the name of the source file and the corresponding output file with placeholders if they match it usually only requires a few libtool invocations for compiling many source files. The link commands are usually unique but at least the second time a source tree is rebuilt they are already cached.

This is aimed at software developers like myself who build projects from CVS and frequently modify some source files, compile and relink.

The code was not written with portability in mind and certainly has bugs and quirks, but works well for me and should be possible to port to other platforms than Cygwin. The speedup might not be very large on those platforms however. But if anyone tries, please tell me how it worked.

The code is available at if anyone is interested. See it as a proof of concept.


reply via email to

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