summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Niklas Hasse <jhasse@bixense.com>2019-08-08 11:52:19 +0200
committerGitHub <noreply@github.com>2019-08-08 11:52:19 +0200
commit6d8c19a13f40c05696d6dea3e28f6b99d55f6eaf (patch)
treecb1400948b262174d8a7acff3a7225c301ea1b71
parent0ea27d728d34e3e2a1eae6f54dbe6ca0822a0b4a (diff)
parent007e029ea35e29466bd40cc38de42d3c8eab70d3 (diff)
downloadninja-6d8c19a13f40c05696d6dea3e28f6b99d55f6eaf.tar.gz
Merge pull request #1604 from jessemckenna/correct-cpu-count-over-64
Enable ninja to use > 64 CPUs on Windows
-rwxr-xr-xconfigure.py2
-rw-r--r--src/util.cc4
2 files changed, 2 insertions, 4 deletions
diff --git a/configure.py b/configure.py
index 850bb98..0393cdd 100755
--- a/configure.py
+++ b/configure.py
@@ -351,7 +351,7 @@ else:
except:
pass
if platform.is_mingw():
- cflags += ['-D_WIN32_WINNT=0x0501']
+ cflags += ['-D_WIN32_WINNT=0x0601']
ldflags = ['-L$builddir']
if platform.uses_usr_local():
cflags.append('-I/usr/local/include')
diff --git a/src/util.cc b/src/util.cc
index ee810d6..f80616b 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -481,9 +481,7 @@ string StripAnsiEscapeCodes(const string& in) {
int GetProcessorCount() {
#ifdef _WIN32
- SYSTEM_INFO info;
- GetNativeSystemInfo(&info);
- return info.dwNumberOfProcessors;
+ return GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
#else
#ifdef CPU_COUNT
// The number of exposed processors might not represent the actual number of