Use shallow clones in build-llvm.py.
authorStephane Sezer <sas@cd80.net>
Wed, 2 Mar 2016 20:53:19 +0000 (20:53 +0000)
committerStephane Sezer <sas@cd80.net>
Wed, 2 Mar 2016 20:53:19 +0000 (20:53 +0000)
Summary:
This makes cloning (and therefore the whole build) faster.
The checkout step goes from ~4m to ~30s on my host.

Reviewers: tfiala

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D17425

llvm-svn: 262513

lldb/scripts/Xcode/lldbbuild.py

index cf79a3e..bb43315 100644 (file)
@@ -65,7 +65,7 @@ class Git:
     def diff (self):
         return run_in_directory(["git", "diff"], self.spec['root'])
     def check_out (self):
-        run_in_directory(["git", "clone", self.spec['url'], self.spec['root']], lldb_source_path())
+        run_in_directory(["git", "clone", "--depth=1", self.spec['url'], self.spec['root']], lldb_source_path())
         run_in_directory(["git", "fetch", "--all"], self.spec['root'])
         run_in_directory(["git", "checkout", self.spec['ref']], self.spec['root'])