Fix one more reference to lit.util.capture()

The capture method was removed in r306643.

llvm-svn: 307201
This commit is contained in:
Michael Zolotukhin 2017-07-05 21:06:11 +00:00
parent 0d1990e2e7
commit f70de9caa2
2 changed files with 4 additions and 2 deletions

View File

@ -3,13 +3,14 @@
from lit import Test from lit import Test
import lit.formats import lit.formats
import lit.util import lit.util
import subprocess
def getSysrootFlagsOnDarwin(config, lit_config): def getSysrootFlagsOnDarwin(config, lit_config):
# On Darwin, support relocatable SDKs by providing Clang with a # On Darwin, support relocatable SDKs by providing Clang with a
# default system root path. # default system root path.
if 'darwin' in config.target_triple: if 'darwin' in config.target_triple:
try: try:
out = lit.util.capture(['xcrun', '--show-sdk-path']).strip() out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip()
res = 0 res = 0
except OSError: except OSError:
res = -1 res = -1

View File

@ -4,13 +4,14 @@ from lit import Test
import lit.formats import lit.formats
import lit.util import lit.util
import os import os
import subprocess
def getSysrootFlagsOnDarwin(config, lit_config): def getSysrootFlagsOnDarwin(config, lit_config):
# On Darwin, support relocatable SDKs by providing Clang with a # On Darwin, support relocatable SDKs by providing Clang with a
# default system root path. # default system root path.
if 'darwin' in config.target_triple: if 'darwin' in config.target_triple:
try: try:
out = lit.util.capture(['xcrun', '--show-sdk-path']).strip() out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip()
res = 0 res = 0
except OSError: except OSError:
res = -1 res = -1