From 321f0ea46cda01c187775e87dd8e962b088fdce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Thu, 9 Apr 2015 16:00:55 +0300 Subject: [PATCH] Don't pass /maxcpucount parameter to msbuild, since it already spawns the full number of cl.exe instances by itself. --- emsdk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emsdk b/emsdk index 6641785..82ca870 100755 --- a/emsdk +++ b/emsdk @@ -469,7 +469,11 @@ def make_build(build_root, build_type): if WINDOWS: if 'Visual Studio' in CMAKE_GENERATOR: solution_name = subprocess.check_output(['dir', '/b', '*.sln'], shell=True, cwd=build_root).strip() - make = [find_msbuild(os.path.join(build_root, solution_name)), '/maxcpucount:' + str(CPU_CORES), '/t:Build', '/p:Configuration='+build_type, '/nologo', '/verbosity:minimal', solution_name] +# Disabled for now: Don't pass /maxcpucount argument to msbuild, since it looks like when building, msbuild already automatically spawns the full amount of logical +# cores the system has, and passing the number of logical cores here has been observed to give a quadratic N*N explosion on the number of spawned processes +# (e.g. on a Core i7 5960X with 16 logical cores, it would spawn 16*16=256 cl.exe processes, which would start crashing when running out of system memory) +# make = [find_msbuild(os.path.join(build_root, solution_name)), '/maxcpucount:' + str(CPU_CORES), '/t:Build', '/p:Configuration='+build_type, '/nologo', '/verbosity:minimal', solution_name] + make = [find_msbuild(os.path.join(build_root, solution_name)), '/t:Build', '/p:Configuration='+build_type, '/nologo', '/verbosity:minimal', solution_name] else: make = ['mingw32-make', '-j' + str(CPU_CORES)] else: