Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,18 @@ components included in Tor Browser. You should run this if you want to ...@@ -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. 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 Automated builds
---------------- ----------------
......
...@@ -32,7 +32,7 @@ cd [% project %]-[% c("version") %] ...@@ -32,7 +32,7 @@ cd [% project %]-[% c("version") %]
patch -p1 < $rootdir/binutils-224-gold.patch patch -p1 < $rootdir/binutils-224-gold.patch
[% END -%] [% END -%]
./configure --prefix=$distdir [% c('var/configure_opt') %] ./configure --prefix=$distdir [% c('var/configure_opt') %]
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
[% IF c("var/linux") %] [% IF c("var/linux") %]
......
...@@ -5,7 +5,7 @@ mkdir -p /var/tmp/build ...@@ -5,7 +5,7 @@ mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %] cd /var/tmp/build/[% project %]-[% c('version') %]
./bootstrap --prefix=$distdir ./bootstrap --prefix=$distdir
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/dist cd /var/tmp/dist
[% c('tar', { [% c('tar', {
......
...@@ -13,7 +13,7 @@ tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/elfutils') %] ...@@ -13,7 +13,7 @@ tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/elfutils') %]
cd /var/tmp/build/[% project %]-[% c("version") %] cd /var/tmp/build/[% project %]-[% c("version") %]
./configure --prefix="$distdir" ./configure --prefix="$distdir"
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/dist cd /var/tmp/dist
......
...@@ -90,7 +90,7 @@ rm -f configure ...@@ -90,7 +90,7 @@ rm -f configure
rm -f js/src/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 -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 make -C obj-* package INNER_MAKE_PACKAGE=true
[% IF c("var/osx") %] [% IF c("var/osx") %]
......
...@@ -17,7 +17,7 @@ mkdir /var/tmp/build ...@@ -17,7 +17,7 @@ mkdir /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.bz2 tar -C /var/tmp/build -xf [% project %]-[% c("version") %].tar.bz2
cd /var/tmp/build/[% project %]-[% c("version") %] cd /var/tmp/build/[% project %]-[% c("version") %]
./configure --prefix=$distdir [% c("var/configure_opt") %] ./configure --prefix=$distdir [% c("var/configure_opt") %]
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/dist cd /var/tmp/dist
[% c('tar', { [% c('tar', {
......
...@@ -9,7 +9,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] ...@@ -9,7 +9,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
# during compile time. # during compile time.
./configure --disable-static --enable-shared --enable-cxx \ ./configure --disable-static --enable-shared --enable-cxx \
[% c("var/configure_opt") %] [% c("var/configure_opt_gmp") %] --prefix=$distdir [% c("var/configure_opt") %] [% c("var/configure_opt_gmp") %] --prefix=$distdir
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/dist cd /var/tmp/dist
[% c('tar', { [% c('tar', {
......
...@@ -7,7 +7,7 @@ cd [% project %]-[% c('version') %] ...@@ -7,7 +7,7 @@ cd [% project %]-[% c('version') %]
patch -p1 < ../libdmg.patch patch -p1 < ../libdmg.patch
cmake -DCMAKE_INSTALL_PREFIX:PATH=$distdir/[% project %] CMakeLists.txt cmake -DCMAKE_INSTALL_PREFIX:PATH=$distdir/[% project %] CMakeLists.txt
cd dmg cd dmg
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd $distdir cd $distdir
[% c('tar', { [% c('tar', {
......
...@@ -11,7 +11,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] ...@@ -11,7 +11,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
export LD_PRELOAD=[% c("var/faketime_path") %] export LD_PRELOAD=[% c("var/faketime_path") %]
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
[% END -%] [% END -%]
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/dist cd /var/tmp/dist
[% c('tar', { [% c('tar', {
......
...@@ -21,7 +21,7 @@ export LLVM_HOME=$(pwd) ...@@ -21,7 +21,7 @@ export LLVM_HOME=$(pwd)
mkdir build mkdir build
cd build cd build
cmake .. -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir -DCMAKE_BUILD_TYPE:STRING=Release $LLVM_HOME 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 make install
cd /var/tmp/dist cd /var/tmp/dist
[% c('tar', { [% c('tar', {
......
...@@ -31,25 +31,25 @@ sed 's/msvcrt/msvcr100/' -i gcc-[% c("var/gcc_version") %]/gcc/config/i386/t-min ...@@ -31,25 +31,25 @@ sed 's/msvcrt/msvcr100/' -i gcc-[% c("var/gcc_version") %]/gcc/config/i386/t-min
# CFLAGS_FOR_TARGET. # CFLAGS_FOR_TARGET.
export CFLAGS_FOR_TARGET="-specs=$distdir/msvcr100.spec -Wl,--nxcompat -Wl,--dynamicbase" 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++ 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 make install-gcc
mkdir -p /var/tmp/build/builddir/mingw-w64/mingw-w64-crt32 mkdir -p /var/tmp/build/builddir/mingw-w64/mingw-w64-crt32
cd /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 \ /var/tmp/build/[% project %]-[% c("version") %]/mingw-w64-crt/configure \
--host=i686-w64-mingw32 --prefix=$distdir/i686-w64-mingw32 --host=i686-w64-mingw32 --prefix=$distdir/i686-w64-mingw32
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
mkdir -p /var/tmp/build/builddir/mingw-w64/widl32 mkdir -p /var/tmp/build/builddir/mingw-w64/widl32
cd /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 \ /var/tmp/build/[% project %]-[% c("version") %]/mingw-w64-tools/widl/configure \
--prefix=$distdir --target=i686-w64-mingw32 --prefix=$distdir --target=i686-w64-mingw32
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/build/gcc cd /var/tmp/build/gcc
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
mkdir -p $distdir/gcclibs mkdir -p $distdir/gcclibs
cp i686-w64-mingw32/libssp/.libs/libssp-0.dll $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") %] ...@@ -64,7 +64,7 @@ find -type f -print0 | xargs -0 [% c("var/touch") %]
export LD_PRELOAD=[% c("var/faketime_path") %] export LD_PRELOAD=[% c("var/faketime_path") %]
export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]" export FAKETIME="[% USE date; GET date.format(c('timestamp'), format = '%Y-%m-%d %H:%M:%S') %]"
[% END -%] [% END -%]
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
[% IF c("var/osx") -%] [% IF c("var/osx") -%]
unset LD_PRELOAD unset LD_PRELOAD
......
...@@ -5,7 +5,7 @@ mkdir -p /var/tmp/build ...@@ -5,7 +5,7 @@ mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/yasm') %] tar -C /var/tmp/build -xf $rootdir/[% c('input_files_by_name/yasm') %]
cd /var/tmp/build/yasm-[% c("version") %] cd /var/tmp/build/yasm-[% c("version") %]
./configure --prefix="$distdir" ./configure --prefix="$distdir"
make -j4 make -j[% c("buildconf/nb_procs") %]
make install make install
cd /var/tmp/dist cd /var/tmp/dist
[% c('tar', { [% c('tar', {
......
...@@ -6,6 +6,12 @@ build_log: '[% GET ENV.RBM_LOGS_DIR ? ENV.RBM_LOGS_DIR : "logs" %]/[% project %] ...@@ -6,6 +6,12 @@ build_log: '[% GET ENV.RBM_LOGS_DIR ? ENV.RBM_LOGS_DIR : "logs" %]/[% project %]
pkg_type: build 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: var:
torbrowser_version: '7.5a3' torbrowser_version: '7.5a3'
project_name: tor-browser project_name: tor-browser
...@@ -16,7 +22,7 @@ var: ...@@ -16,7 +22,7 @@ var:
# in the same order. In the cases where the installation order is # in the same order. In the cases where the installation order is
# important, sort_deps should be set to 0. # important, sort_deps should be set to 0.
sort_deps: 1 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: | build_id_txt: |
[% c("version") %] [% c("version") %]
[% IF c("git_hash") || c("hg_hash"); GET c("abbrev"); END; %] [% IF c("git_hash") || c("hg_hash"); GET c("abbrev"); END; %]
......
...@@ -21,6 +21,14 @@ ...@@ -21,6 +21,14 @@
### stdout and stderr. ### stdout and stderr.
#build_log: '-' #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: var:
local_conf: 1 local_conf: 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment