diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-13 01:13:04 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-13 01:13:04 +0000 |
commit | 2128bec9f131cbc1f17593a5cb296087d16f08e1 (patch) | |
tree | 96566380b2d5b92ec3e9773efe1741a99431a0cd /build | |
parent | 50f996cbbf716cb4a1b9027574c3b0975ad9dcef (diff) | |
download | chromium_src-2128bec9f131cbc1f17593a5cb296087d16f08e1.zip chromium_src-2128bec9f131cbc1f17593a5cb296087d16f08e1.tar.gz chromium_src-2128bec9f131cbc1f17593a5cb296087d16f08e1.tar.bz2 |
Parse /proc/cpuinfo to guess the number of available CPUs.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@768 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/SConscript.main | 5 |
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'] |