Chromium Code Reviews| Index: build/toolchain/get_concurrent_links.py |
| diff --git a/build/toolchain/get_concurrent_links.py b/build/toolchain/get_concurrent_links.py |
| index 629d67d5030662c94bf3ea89cb4915f8e0d47ebe..108810e0ea7ffd0fe4c5fc05ab4c87cd8a4a28da 100644 |
| --- a/build/toolchain/get_concurrent_links.py |
| +++ b/build/toolchain/get_concurrent_links.py |
| @@ -7,6 +7,7 @@ |
| import os |
| import re |
| +import subprocess |
| import sys |
| def GetDefaultConcurrentLinks(): |
| @@ -31,8 +32,7 @@ def GetDefaultConcurrentLinks(): |
| ("sullAvailExtendedVirtual", ctypes.c_ulonglong), |
| ] |
| - stat = MEMORYSTATUSEX() |
| - stat.dwLength = ctypes.sizeof(stat) |
| + stat = MEMORYSTATUSEX(dwLength=ctypes.sizeof(MEMORYSTATUSEX)) |
| ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat)) |
| mem_limit = max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB |
| @@ -55,7 +55,8 @@ def GetDefaultConcurrentLinks(): |
| # A static library debug build of Chromium's unit_tests takes ~2.7GB, so |
| # 4GB per ld process allows for some more bloat. |
| return max(1, avail_bytes / (4 * (2 ** 30))) # total / 4GB |
| - except: |
| + except Exception as inst: |
| + sys.stderr.write(inst) |
|
scottmg
2015/02/17 02:51:56
I think this should probably stay silent. Does pyl
Yoshisato Yanagisawa
2015/02/17 03:39:34
No. Non-silent is just my preference.
Seeing the
|
| return 1 |
| else: |
| # TODO(scottmg): Implement this for other platforms. |