summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCameron <cameron@moodycamel.com>2020-12-31 19:45:59 (GMT)
committerCameron <cameron@moodycamel.com>2020-12-31 19:45:59 (GMT)
commit4b07ca35eb56b572720521fef7c202ec4cc1e325 (patch)
tree8acf5dd53e092b6cfb884b17332b3049e68c0aa2 /src
parent9e1e51aeb56115b94d3cf14e67934dcd51a3f5c6 (diff)
downloadNinja-4b07ca35eb56b572720521fef7c202ec4cc1e325.zip
Ninja-4b07ca35eb56b572720521fef7c202ec4cc1e325.tar.gz
Ninja-4b07ca35eb56b572720521fef7c202ec4cc1e325.tar.bz2
Added preprocessor if to clarify processor count workaround code is only needed on 32-bit builds (following code review)
Diffstat (limited to 'src')
-rw-r--r--src/util.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.cc b/src/util.cc
index e8455ec..6ea854b 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -481,6 +481,7 @@ string StripAnsiEscapeCodes(const string& in) {
int GetProcessorCount() {
#ifdef _WIN32
+#ifndef _WIN64
// Need to use GetLogicalProcessorInformationEx to get real core count on
// machines with >64 cores. See https://stackoverflow.com/a/31209344/21475
DWORD len = 0;
@@ -508,7 +509,7 @@ int GetProcessorCount() {
}
}
}
- // fallback just in case
+#endif
return GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
#else
#ifdef CPU_COUNT