File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 22
22
23
23
24
24
ifeq ($(LLVM_VER ) ,svn)
25
- LLVM_MONOSRC_DIR: =$(SRCCACHE ) /llvm-project-$(LLVM_VER )
25
+ LLVM_BARESRC_DIR: =$(SRCCACHE ) /llvm-project-bare
26
+ LLVM_MONOSRC_DIR: =$(SRCCACHE ) /llvm-project-$(LLVM_VER ) -${LLVM_GIT_VER}
26
27
LLVM_SRC_DIR: =$(LLVM_MONOSRC_DIR ) /llvm
27
28
LIBCXX_ROOT_DIR: =$(LLVM_MONOSRC_DIR )
28
29
else
Original file line number Diff line number Diff line change @@ -372,8 +372,12 @@ ifneq ($(LLVM_VER),svn)
372
372
mkdir -p $(LLVM_SRC_DIR)
373
373
$(TAR) -C $(LLVM_SRC_DIR) --strip-components 1 -xf $(LLVM_TAR)
374
374
else
375
+ ([ ! -d $(LLVM_BARESRC_DIR) ] && \
376
+ git clone --bare $(LLVM_GIT_URL) $(LLVM_BARESRC_DIR) ) || \
377
+ (cd $(LLVM_BARESRC_DIR) && \
378
+ git fetch)
375
379
([ ! -d $(LLVM_MONOSRC_DIR) ] && \
376
- git clone $(LLVM_GIT_URL) $(LLVM_MONOSRC_DIR) ) || \
380
+ git clone --dissociate --reference $(LLVM_BARESRC_DIR) $(LLVM_GIT_URL) $(LLVM_MONOSRC_DIR) ) || \
377
381
(cd $(LLVM_MONOSRC_DIR) && \
378
382
git pull --ff-only)
379
383
ifneq ($(LLVM_GIT_VER ) ,)
@@ -574,8 +578,11 @@ check-llvm: $(LLVM_BUILDDIR_withtype)/build-checked
574
578
575
579
ifeq ($(LLVM_VER ) ,svn)
576
580
update-llvm :
577
- cd $(LLVM_MONOSRC_DIR ) && \
578
- git pull --ff-only
581
+ (cd $( LLVM_BARESRC_DIR) && \
582
+ git fetch)
583
+ (cd $( LLVM_MONOSRC_DIR) && \
584
+ git fetch $(LLVM_BARESRC_DIR ) +refs/remotes/* :refs/remotes/* && \
585
+ git pull --ff-only)
579
586
endif
580
587
else # USE_BINARYBUILDER_LLVM
581
588
ifneq ($(BINARYBUILDER_LLVM_ASSERTS ) , 1)
You can’t perform that action at this time.
0 commit comments