forked from OSchip/llvm-project
PR 17916: Don't fail if xcrun is not present.
llvm-svn: 194745
This commit is contained in:
parent
4afe079663
commit
7a1ae9f1a1
|
@ -359,11 +359,14 @@ if use_gmalloc:
|
|||
# On Darwin, support relocatable SDKs by providing Clang with a
|
||||
# default system root path.
|
||||
if 'darwin' in config.target_triple:
|
||||
cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
out, err = cmd.communicate()
|
||||
out = out.strip()
|
||||
res = cmd.wait()
|
||||
try:
|
||||
cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
out, err = cmd.communicate()
|
||||
out = out.strip()
|
||||
res = cmd.wait()
|
||||
except OSError:
|
||||
res = -1
|
||||
if res == 0 and out:
|
||||
sdk_path = out
|
||||
lit_config.note('using SDKROOT: %r' % sdk_path)
|
||||
|
|
Loading…
Reference in New Issue