]> granicus.if.org Git - llvm/commitdiff
[lit] When setting SDKROOT on Darwin, use '--sdk macosx' to find the right SDK path.
authorKuba Mracek <mracek@apple.com>
Fri, 18 Nov 2016 23:25:57 +0000 (23:25 +0000)
committerKuba Mracek <mracek@apple.com>
Fri, 18 Nov 2016 23:25:57 +0000 (23:25 +0000)
This will make sure that we find an actual path in case you have Command Line Tools installed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287403 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/util.py

index 609011b1972d8f92a578b6d16a7f440dad711529..be37998c6f16cdf8cf1f09458db0c858668bbc67 100644 (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()