summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/SConscript.main5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/SConscript.main b/build/SConscript.main
index f97c6d0..5e2bf7a 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -266,6 +266,11 @@ if env['PLATFORM'] == 'win32':
elif env['PLATFORM'] == 'posix':
+ # TODO(evanm): this is Linux-specific, not posix.
+ # Parse /proc/cpuinfo for processor count.
+ cpus = len([l for l in open('/proc/cpuinfo') if l.startswith('processor\t')])
+ SetOption('num_jobs', cpus + 1)
+
# For now, linux only loads the components we know work on Linux, by default.
load = ['base', 'testing', 'third_party', 'breakpad']