[Lldb-commits] [lldb] r306460 - [build system] If there's an OVERRIDE, don't guess the current SCM.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 27 13:35:53 PDT 2017


Author: spyffe
Date: Tue Jun 27 13:35:53 2017
New Revision: 306460

URL: http://llvm.org/viewvc/llvm-project?rev=306460&view=rev
Log:
[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.

Modified:
    lldb/trunk/scripts/Xcode/build-llvm.py
    lldb/trunk/scripts/Xcode/repo.py

Modified: lldb/trunk/scripts/Xcode/build-llvm.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/build-llvm.py?rev=306460&r1=306459&r2=306460&view=diff
==============================================================================
--- lldb/trunk/scripts/Xcode/build-llvm.py (original)
+++ lldb/trunk/scripts/Xcode/build-llvm.py Tue Jun 27 13:35:53 2017
@@ -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

Modified: lldb/trunk/scripts/Xcode/repo.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Xcode/repo.py?rev=306460&r1=306459&r2=306460&view=diff
==============================================================================
--- lldb/trunk/scripts/Xcode/repo.py (original)
+++ lldb/trunk/scripts/Xcode/repo.py Tue Jun 27 13:35:53 2017
@@ -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")




More information about the lldb-commits mailing list