[Darwin] Reworking r250003 to use lit.util.capture instead of subprocess.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bf64c23851
commit
6bed14b343
@ -6,7 +6,6 @@ import pkgutil
|
||||
import re
|
||||
import shlex
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
import lit.Test # pylint: disable=import-error,no-name-in-module
|
||||
import lit.util # pylint: disable=import-error,no-name-in-module
|
||||
@ -48,11 +47,8 @@ def getSysrootFlagsOnDarwin(config, lit_config):
|
||||
# default system root path.
|
||||
if 'darwin' in config.target_triple:
|
||||
try:
|
||||
cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
out, err = cmd.communicate()
|
||||
out = out.strip()
|
||||
res = cmd.wait()
|
||||
out = lit.util.capture(['xcrun', '--show-sdk-path']).strip()
|
||||
res = 0
|
||||
except OSError:
|
||||
res = -1
|
||||
if res == 0 and out:
|
||||
|
Loading…
x
Reference in New Issue
Block a user