[lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path.

This will make sure that we find an actual path in case you have Command Line Tools installed.

llvm-svn: 287403
This commit is contained in:
Kuba Mracek 2016-11-18 23:25:57 +00:00
parent 6cc58e09c8
commit fe16c1ff14
1 changed files with 1 additions and 1 deletions

View File

@ -251,7 +251,7 @@ def usePlatformSdkOnDarwin(config, lit_config):
# default system root path.
if 'darwin' in config.target_triple:
try:
cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
cmd = subprocess.Popen(['xcrun', '--show-sdk-path', '--sdk', 'macosx'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = cmd.communicate()
out = out.strip()