mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[lit][macOS] Add a utility function to find the platform SDK version
on macOS This function will be used to tie Clang's Integeration tests to a particular SDK version. See https://reviews.llvm.org/D32178 for more context. llvm-svn: 304541
This commit is contained in:
parent
14bb5040f2
commit
9f2c1b5601
@ -267,6 +267,20 @@ def usePlatformSdkOnDarwin(config, lit_config):
|
||||
lit_config.note('using SDKROOT: %r' % sdk_path)
|
||||
config.environment['SDKROOT'] = sdk_path
|
||||
|
||||
def findPlatformSdkVersionOnMacOS(config, lit_config):
|
||||
if 'darwin' in config.target_triple:
|
||||
try:
|
||||
cmd = subprocess.Popen(['xcrun', '--show-sdk-version', '--sdk', 'macosx'],
|
||||
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:
|
||||
return out
|
||||
return None
|
||||
|
||||
def killProcessAndChildren(pid):
|
||||
"""
|
||||
This function kills a process with ``pid`` and all its
|
||||
|
Loading…
Reference in New Issue
Block a user