Fix build parallelism on Windows with NUMA (dotnet/coreclr#21278)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 29 Nov 2018 18:06:34 +0000 (19:06 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Nov 2018 18:06:34 +0000 (19:06 +0100)
commite6328a99cbbdd77dac01094c53d0c14ffdaacac1
tree24364ea0ed40cc3442596654bd563876d402c34f
parent2626fd21e77c3bfbba792b4ab0b9d31748e4e4f7
Fix build parallelism on Windows with NUMA (dotnet/coreclr#21278)

When multiple NUMA nodes are enabled on the machine where coreclr is
built, we incorrectly detect the number of cores that we use for build
parallelism of the native part of the build (NumberOfCores) as only
a number in the last NUMA node.
The reason is that the `wmic cpu get NumberOfCores /value` returns
multiple lines, one per each NUMA node.
This change fixes it by summing values from all the lines.

Commit migrated from https://github.com/dotnet/coreclr/commit/0cc4b0c3e6207fcae9ffde81096f86c40d2634b4
src/coreclr/build.cmd