From 706ace0c691d74f31d0f4f07c2ee98e0f115bfc0 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 15 Sep 2026 07:58:50 -0700 Subject: [PATCH] make: avoid fetching available LLVM revision --- make/llvm.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/make/llvm.mk b/make/llvm.mk index e57a61df3f..8f0c9b8df3 100644 --- a/make/llvm.mk +++ b/make/llvm.mk @@ -83,11 +83,13 @@ llvm-source: ## Get or update LLVM sources git init $(LLVM_PROJECTDIR); \ fi cd $(LLVM_PROJECTDIR) && \ - if ! git remote get-url origin >/dev/null 2>&1; then \ - git remote add origin https://github.com/tinygo-org/llvm-project; \ + if ! git cat-file -e "$(LLVM_REVISION)^{commit}" 2>/dev/null; then \ + if ! git remote get-url origin >/dev/null 2>&1; then \ + git remote add origin https://github.com/tinygo-org/llvm-project; \ + fi && \ + git fetch --depth=1 origin $(LLVM_REVISION); \ fi && \ - git fetch --depth=1 origin $(LLVM_REVISION) && \ - git checkout FETCH_HEAD + git checkout $(LLVM_REVISION) # Configure LLVM. TINYGO_SOURCE_DIR=$(shell pwd)