forked from OSchip/llvm-project
parent
a484d17ec5
commit
e155f8646c
|
@ -15,7 +15,7 @@ def detectCPUs():
|
|||
return int(os.popen2("sysctl -n hw.ncpu")[1].read())
|
||||
# Windows:
|
||||
if os.environ.has_key("NUMBER_OF_PROCESSORS"):
|
||||
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"]);
|
||||
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
|
||||
if ncpus > 0:
|
||||
return ncpus
|
||||
return 1 # Default
|
||||
|
|
Loading…
Reference in New Issue