[rust] Skip processor info on i386 mingw-w64 < 7
This will limit LLVM thread pools to a single thread on that target, but
we don't use that functionality in rustc anyway.
See also:
8404aeb56a (commitcomment-37406150)
This commit is contained in:
parent
9d74699edc
commit
e746ae8048
|
@ -144,6 +144,11 @@ struct ProcessorGroup {
|
|||
|
||||
template <typename F>
|
||||
static bool IterateProcInfo(LOGICAL_PROCESSOR_RELATIONSHIP Relationship, F Fn) {
|
||||
#if !defined(_WIN64) && defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 7
|
||||
// `GetLogicalProcessorInformationEx@12` was only added to i386 mingw-w64 in v7.0.0
|
||||
// https://github.com/mingw-w64/mingw-w64/commit/24842d45e025db0d38fa2bbd932b95a83282efa2#diff-faf1d8a1556e75a84b7cef2e89512e79R634
|
||||
return false;
|
||||
#else
|
||||
DWORD Len = 0;
|
||||
BOOL R = ::GetLogicalProcessorInformationEx(Relationship, NULL, &Len);
|
||||
if (R || GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
|
||||
|
@ -164,6 +169,7 @@ static bool IterateProcInfo(LOGICAL_PROCESSOR_RELATIONSHIP Relationship, F Fn) {
|
|||
}
|
||||
free(Info);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
static ArrayRef<ProcessorGroup> getProcessorGroups() {
|
||||
|
|
Loading…
Reference in a new issue