Unverified Commit 60ba8663 authored by boklm's avatar boklm
Browse files

Bug 23075: add an option to select the number of cores used

parent 7a314047
......@@ -91,6 +91,18 @@ components included in Tor Browser. You should run this if you want to
make a nightly build with the latest commits.
Number of make processes
------------------------
By default the builds are run with 4 processes simultaneously (with
make -j4). If you want to change the number of processes used, you can
set the RBM_NB_PROCS environment variable:
$ export RBM_NB_PROCS=8
You can also set the buildconf/nb_procs option in rbm.local.conf.
Automated builds
----------------
......
......@@ -32,7 +32,7 @@ cd [% project %]-[% c("version") %]
patch -p1 < $rootdir/binutils-224-gold.patch
[% END -%]
./configure --prefix=$distdir [% c('var/configure_opt') %]
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
[% IF c("var/linux") %]
......
......@@ -5,7 +5,7 @@ mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
./bootstrap --prefix=$distdir
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
[% c('tar', {
......
......@@ -13,7 +13,7 @@ tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/elfutils') %]
cd /var/tmp/build/[% project %]-[% c("version") %]
./configure --prefix="$distdir"
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
......
......@@ -90,7 +90,7 @@ rm -f configure
rm -f js/src/configure
make -f client.mk configure CONFIGURE_ARGS="--with-tor-browser-version=[% c("var/torbrowser_version") %] --with-distribution-id=org.torproject --enable-update-channel=[% c("var/torbrowser_update_channel") %] --enable-bundled-fonts"
make -j8 -f client.mk build
make -j[% c("buildconf/nb_procs") %] -f client.mk build
make -C obj-* package INNER_MAKE_PACKAGE=true
[% IF c("var/osx") %]
......
......@@ -17,7 +17,7 @@ mkdir /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.bz2
cd /var/tmp/build/[% project %]-[% c("version") %]
./configure --prefix=$distdir [% c("var/configure_opt") %]
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
[% c('tar', {
......
......@@ -9,7 +9,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
# during compile time.
./configure --disable-static --enable-shared --enable-cxx \
[% c("var/configure_opt") %] [% c("var/configure_opt_gmp") %] --prefix=$distdir
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
[% c('tar', {
......
......@@ -7,7 +7,7 @@ cd [% project %]-[% c('version') %]
patch -p1 < ../libdmg.patch
cmake -DCMAKE_INSTALL_PREFIX:PATH=$distdir/[% project %] CMakeLists.txt
cd dmg
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd $distdir
[% c('tar', {
......
......@@ -11,7 +11,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
export LD_PRELOAD=[% c("var/faketime_path") %]
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
[% END -%]
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
[% c('tar', {
......
......@@ -21,7 +21,7 @@ export LLVM_HOME=$(pwd)
mkdir build
cd build
cmake .. -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir -DCMAKE_BUILD_TYPE:STRING=Release $LLVM_HOME
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
[% c('tar', {
......
......@@ -31,25 +31,25 @@ sed 's/msvcrt/msvcr100/' -i gcc-[% c("var/gcc_version") %]/gcc/config/i386/t-min
# CFLAGS_FOR_TARGET.
export CFLAGS_FOR_TARGET="-specs=$distdir/msvcr100.spec -Wl,--nxcompat -Wl,--dynamicbase"
gcc-[% c("var/gcc_version") %]/configure --prefix=$distdir --target=i686-w64-mingw32 --disable-multilib --enable-languages=c,c++
make -j4 all-gcc
make -j[% c("buildconf/nb_procs") %] all-gcc
make install-gcc
mkdir -p /var/tmp/build/builddir/mingw-w64/mingw-w64-crt32
cd /var/tmp/build/builddir/mingw-w64/mingw-w64-crt32
/var/tmp/build/[% project %]-[% c("version") %]/mingw-w64-crt/configure \
--host=i686-w64-mingw32 --prefix=$distdir/i686-w64-mingw32
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
mkdir -p /var/tmp/build/builddir/mingw-w64/widl32
cd /var/tmp/build/builddir/mingw-w64/widl32
/var/tmp/build/[% project %]-[% c("version") %]/mingw-w64-tools/widl/configure \
--prefix=$distdir --target=i686-w64-mingw32
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/build/gcc
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
mkdir -p $distdir/gcclibs
cp i686-w64-mingw32/libssp/.libs/libssp-0.dll $distdir/gcclibs
......
......@@ -64,7 +64,7 @@ find -type f -print0 | xargs -0 [% c("var/touch") %]
export LD_PRELOAD=[% c("var/faketime_path") %]
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
[% END -%]
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
[% IF c("var/osx") -%]
unset LD_PRELOAD
......
......@@ -5,7 +5,7 @@ mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/yasm') %]
cd /var/tmp/build/yasm-[% c("version") %]
./configure --prefix="$distdir"
make -j4
make -j[% c("buildconf/nb_procs") %]
make install
cd /var/tmp/dist
[% c('tar', {
......
......@@ -6,6 +6,12 @@ build_log: '[% GET ENV.RBM_LOGS_DIR ? ENV.RBM_LOGS_DIR : "logs" %]/[% project %]
pkg_type: build
# buildconf contains build options that the user can change in rbm.local.conf
# When adding a new option to buildconf, a default value should be defined
# in var/build_id, so that changing this option does not affect the build_id.
buildconf:
nb_procs: '[% GET ENV.RBM_NB_PROCS ? ENV.RBM_NB_PROCS : "4" %]'
var:
torbrowser_version: '7.5a3'
project_name: tor-browser
......@@ -16,7 +22,7 @@ var:
# in the same order. In the cases where the installation order is
# important, sort_deps should be set to 0.
sort_deps: 1
build_id: '[% sha256(c("var/build_id_txt")).substr(0, 6) %]'
build_id: '[% sha256(c("var/build_id_txt", { buildconf => { nb_procs => 4 } })).substr(0, 6) %]'
build_id_txt: |
[% c("version") %]
[% IF c("git_hash") || c("hg_hash"); GET c("abbrev"); END; %]
......
......@@ -21,6 +21,14 @@
### stdout and stderr.
#build_log: '-'
buildconf:
buildconf: 1
### The buildconf/nb_procs option can be used to select the number of
### build processes to run simultaneously. You can also use the
### RBM_NB_PROCS environment variable. The default is 4.
#nb_procs: 8
var:
local_conf: 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment