r194745 - PR 17916: Don't fail if xcrun is not present.

Joerg Sonnenberger joerg at bec.de
Thu Nov 14 15:18:09 PST 2013


Author: joerg
Date: Thu Nov 14 17:18:08 2013
New Revision: 194745

URL: http://llvm.org/viewvc/llvm-project?rev=194745&view=rev
Log:
PR 17916: Don't fail if xcrun is not present.

Modified:
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=194745&r1=194744&r2=194745&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Thu Nov 14 17:18:08 2013
@@ -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)





More information about the cfe-commits mailing list