diff options
author | Sean Callanan <scallanan@apple.com> | 2017-07-31 21:50:00 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2017-07-31 21:50:00 +0000 |
commit | 558e52c1089519bc8a4188b806717cf1bfd13d24 (patch) | |
tree | 184effb3e9436d03499104751df6f768aebd9906 /lldb/scripts/Xcode/lldbbuild.py | |
parent | 038e28a5a71b63c145e6587eac3bfbf2a7ea1f44 (diff) | |
download | bcm5719-llvm-558e52c1089519bc8a4188b806717cf1bfd13d24.tar.gz bcm5719-llvm-558e52c1089519bc8a4188b806717cf1bfd13d24.zip |
[build-script] Bring in modernizations from downstream:
- Don't do any checks of the current SCM repository if the
llvm repositories are already there. Useful for bots.
- When symlinking, remove old symlinks.
- Support loading build-script as a library, not necessarily
under Xcode.
- Stringify args before passing them to subprocess.
llvm-svn: 309631
Diffstat (limited to 'lldb/scripts/Xcode/lldbbuild.py')
-rw-r--r-- | lldb/scripts/Xcode/lldbbuild.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/scripts/Xcode/lldbbuild.py b/lldb/scripts/Xcode/lldbbuild.py index 8496cfabf3d..e70fe1bf803 100644 --- a/lldb/scripts/Xcode/lldbbuild.py +++ b/lldb/scripts/Xcode/lldbbuild.py @@ -1,5 +1,6 @@ import os import subprocess +import sys #### UTILITIES #### @@ -14,7 +15,11 @@ def enum(*sequential, **named): def lldb_source_path(): - return os.environ.get('SRCROOT') + path = os.environ.get('SRCROOT') + if path: + return path + else: + return "./" def expected_llvm_build_path(): @@ -80,7 +85,7 @@ VCS = enum('git', def run_in_directory(args, path): - return subprocess.check_output(args, cwd=path) + return subprocess.check_output([str(arg) for arg in args], cwd=path) class Git: |