mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
Use subprocess.Popen instead of popen2 to stop a deprecation warning when running lit on OS X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d6b98e8bd8
commit
2f494b6afc
@ -12,7 +12,7 @@ def detectCPUs():
|
|||||||
if isinstance(ncpus, int) and ncpus > 0:
|
if isinstance(ncpus, int) and ncpus > 0:
|
||||||
return ncpus
|
return ncpus
|
||||||
else: # OSX:
|
else: # OSX:
|
||||||
return int(os.popen2("sysctl -n hw.ncpu")[1].read())
|
return int(capture(['sysctl', '-n', 'hw.ncpu']))
|
||||||
# Windows:
|
# Windows:
|
||||||
if os.environ.has_key("NUMBER_OF_PROCESSORS"):
|
if os.environ.has_key("NUMBER_OF_PROCESSORS"):
|
||||||
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
|
ncpus = int(os.environ["NUMBER_OF_PROCESSORS"])
|
||||||
|
Loading…
Reference in New Issue
Block a user