Re: Generating build for multi platforms

Fergus Henderson <[email protected]>
Newsgroups gmane.comp.compilers.distcc
Message-ID <[email protected]>
On Wed, Oct 21, 2009 at 4:20 AM, Eliakim Cohen <[email protected]> wrote:

>  Hi,
>
> Our build is very long (12 hours) for verey platform (Sun Solaris, HP UX)
> etc.
>
> We would like to implement DISTCC to speed up the build.
>
> We build number of platforms every night (Sun Solaris, HP UX, Linux Etc).
>
>
>
> Since DISTCC can utilize an agent platform to compile for the master
> platform, I was wondering whether there is a way to reuse the  DISTCC/gcc
> intermediate compile output when compiling for the second platform. E.g, if
> I used DISTCC/gcc to compile for HP UX, can I use whatever was created by
> DISTCC/gcc for HP UX in order to start the Sun Solaris compilation from a
> better point than from compiling from scratch for the Sun Solaris?
>
Generally it is NOT possible to reuse even the preprocessor output, because
conditional compilation (#if) and includes of system header files mean that
it will in general be different on different platforms.

You _can_ however reuse the distcc pump include server cache... just arrange
things so that you have a single command that will run (in parallel) all the
different compilations for all the different platforms, e.g. using a
Makefile with a target all_platforms, and then run that single command under
"pump", e.g. "pump make all_platforms".  This avoids the need to scan the
includes of each source file more than once.  The main restriction is that
your build process should not overwrite any source files during the build,
so if you need to run "configure" to generate a config.h which is different
for each target platform, then you should do so in a different directory for
each platform.

-- 
Fergus Henderson <[email protected]>

__
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/distcc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.