diff options
author | Sean Callanan <scallanan@apple.com> | 2017-06-27 20:35:53 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2017-06-27 20:35:53 +0000 |
commit | 5805d9e9ac5d6d4e02cb2be0499658cd64fc3fe7 (patch) | |
tree | 27a24ae3230debb4d444f6801110bf622f74ac54 /lldb/scripts/Xcode | |
parent | 9e1ade93a83635da90ff93586a1b9f503be8b8e8 (diff) | |
download | bcm5719-llvm-5805d9e9ac5d6d4e02cb2be0499658cd64fc3fe7.tar.gz bcm5719-llvm-5805d9e9ac5d6d4e02cb2be0499658cd64fc3fe7.zip |
[build system] If there's an OVERRIDE, don't guess the current SCM.
This makes automatic checkout work even in situations where the
current repository can't be determined, such as in the case of a
Git tag.
llvm-svn: 306460
Diffstat (limited to 'lldb/scripts/Xcode')
-rwxr-xr-x | lldb/scripts/Xcode/build-llvm.py | 3 | ||||
-rw-r--r-- | lldb/scripts/Xcode/repo.py | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lldb/scripts/Xcode/build-llvm.py b/lldb/scripts/Xcode/build-llvm.py index 36e491ebf06..e2a46de1a16 100755 --- a/lldb/scripts/Xcode/build-llvm.py +++ b/lldb/scripts/Xcode/build-llvm.py @@ -43,6 +43,9 @@ def process_repo(r): } def XCODE_REPOSITORIES(): + override = repo.get_override() + if override: + return [process_repo(r) for r in override] identifier = repo.identifier() if identifier == None: identifier = "<invalid>" # repo.find will just use the fallback file diff --git a/lldb/scripts/Xcode/repo.py b/lldb/scripts/Xcode/repo.py index 7623c503ba9..2657b6eb0c4 100644 --- a/lldb/scripts/Xcode/repo.py +++ b/lldb/scripts/Xcode/repo.py @@ -21,6 +21,17 @@ def identifier(): pass return None +def get_override(): + dir = os.path.dirname(os.path.realpath(__file__)) + repos_dir = os.path.join(dir, "repos") + json_regex = re.compile(r"^.*.json$") + override_path = os.path.join(repos_dir, "OVERRIDE") + if os.path.isfile(override_path): + override_set = json.load(open(override_path)) + return override_set["repos"] + else: + return None + def find(identifier): dir = os.path.dirname(os.path.realpath(__file__)) repos_dir = os.path.join(dir, "repos") |