~chromium-team/chromium-browser/artful-beta

« back to all changes in this revision

Viewing changes to debian/patches/build_with_only_one_cpu.patch

  • Committer: Fabien Tassin
  • Date: 2008-11-10 22:08:21 UTC
  • Revision ID: fta@ubuntu.com-20081110220821-bbe0gkgpu4kbobr4
* Initial revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Upstream: http://code.google.com/p/chromium/issues/detail?id=3805
 
3
# Ubuntu: none
 
4
# Description: on dual core computers, linking the two test_shell* binaries
 
5
# at the same time consumes nearly 2GB of memory. Use only 1 cpu/core.
 
6
#
 
7
---
 
8
 build/SConscript.main |    4 +---
 
9
 1 file changed, 1 insertion(+), 3 deletions(-)
 
10
 
 
11
Index: chrome/build/SConscript.main
 
12
===================================================================
 
13
--- chrome.orig/build/SConscript.main
 
14
+++ chrome/build/SConscript.main
 
15
@@ -119,19 +119,17 @@
 
16
 root_env.AddMethod(ChromeObject)
 
17
 
 
18
 
 
19
 # TODO(bradnelson): pull this functionality into hammer.
 
20
 # Auto select the number of processors
 
21
 if root_env['PLATFORM'] in ['win32', 'cygwin']:
 
22
   cpus = int(os.environ.get('NUMBER_OF_PROCESSORS', 1))
 
23
 elif root_env['PLATFORM'] in ['linux', 'linux2', 'posix']:
 
24
-  # TODO(evanm): this is Linux-specific, not posix.
 
25
-  # Parse /proc/cpuinfo for processor count.
 
26
-  cpus = len([l for l in open('/proc/cpuinfo') if l.startswith('processor\t')])
 
27
+  cpus = 0
 
28
 else:
 
29
   cpus = 1
 
30
 SetOption('num_jobs', cpus + 1)
 
31
 
 
32
 
 
33
 if ARGUMENTS.get('VERBOSE') in (None, '0'):
 
34
   root_env['CCCOMSTR'] = 'Compiling $TARGET ...'
 
35
   root_env['CXXCOMSTR'] = 'Compiling $TARGET ...'