aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-16 11:12:19 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-16 11:12:19 -0800
commit6c89ae35c5c658ac9ed95b56a9c0ac3442151e05 (patch)
treee8b4a79dcb25e5658e152923fe2175d0be59e7d6 /tools
parent05ba65f644625cd1efd139cb8efddd5e4f9c4d75 (diff)
use all cpu cores when building libraries in test runner
Diffstat (limited to 'tools')
-rw-r--r--tools/shared.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 3456ab18..cbeb3eda 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -926,7 +926,7 @@ class Building:
@staticmethod
- def build_library(name, build_dir, output_dir, generated_libs, configure=['sh', './configure'], configure_args=[], make=['make'], make_args=['-j', '2'], cache=None, cache_name=None, copy_project=False, env_init={}, source_dir=None, native=False):
+ def build_library(name, build_dir, output_dir, generated_libs, configure=['sh', './configure'], configure_args=[], make=['make'], make_args='help', cache=None, cache_name=None, copy_project=False, env_init={}, source_dir=None, native=False):
''' Build a library into a .bc file. We build the .bc file once and cache it for all our tests. (We cache in
memory since the test directory is destroyed and recreated for each test. Note that we cache separately
for different compilers).
@@ -934,6 +934,8 @@ class Building:
if type(generated_libs) is not list: generated_libs = [generated_libs]
if source_dir is None: source_dir = path_from_root('tests', name.replace('_native', ''))
+ if make_args == 'help':
+ make_args = ['-j', str(multiprocessing.cpu_count())]
temp_dir = build_dir
if copy_project: