[Libreoffice] Bug 40673 - unify build parallelization and use gnu makes --load-average feature where available

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Wed Sep 7 01:02:39 PDT 2011


Hi list,

I just proposed the following at
https://bugs.freedesktop.org/show_bug.cgi?id=40673 :

The ways to specify
build parallelization are way to complex and confusing.

I propose the following solution:

1) We use --with-num-cpus and --with-max-jobs and --with-sense-load
2) --with-num-cpus defaults to the number of cpus on the machine and is
stored in GMAKE_PARALELLISM only
3) --with-max-jobs defaults to the number of cpus divided by two on the
machine and is stored in GMAKE_MODULE_PARALELLISM only
4) --with-sense-load defaults to "T" unless using icecream or on
windows (where it is "") and is stored in GMAKE_SENSE_LOAD
5) all calls to build.pl are done as:
   build.pl -P$((${GMAKE_PARALELLISM}/${GMAKE_MODULE_PARALELLISM})) --
-P${GMAKE_MODULE_PARALELLISM}
6) gbuild calls (including tail_build) are done as:
       make -srj$((${GMAKE_PARALELLISM}*4))
-l$((${GMAKE_PARALELLISM}+1)) when GMAKE_SENSE_LOAD is not empty, or as:
       make -srj${GMAKE_MODULE_PARALELLISM}
   otherwise (exception: tail build might use GMAKE_PARALELLISM)

The variables @BUILD_NCPUS@ and @BUILD_MAX_JOBS@ will be removed.

Configure should warn, if GMAKE_MODULE_PARALELLISM is bigger than
GMAKE_PARALELLISM and set it to GMAKE_PARALELLISM.

Any objections to that implementation?

Best,

Bjoern

-- 
https://launchpad.net/~bjoern-michaelsen




More information about the LibreOffice mailing list