mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-15 00:43:02 +00:00
make: allow updating LLVM sources
This commit is contained in:
+7
-4
@@ -78,13 +78,16 @@ endif
|
|||||||
# Pinned in llvm-version.txt. Branch tinygo_22.x of tinygo-org/llvm-project.
|
# Pinned in llvm-version.txt. Branch tinygo_22.x of tinygo-org/llvm-project.
|
||||||
LLVM_REVISION = $(shell cat llvm-version.txt)
|
LLVM_REVISION = $(shell cat llvm-version.txt)
|
||||||
|
|
||||||
$(LLVM_PROJECTDIR)/llvm:
|
llvm-source: ## Get or update LLVM sources
|
||||||
git init $(LLVM_PROJECTDIR)
|
@if [ ! -e "$(LLVM_PROJECTDIR)/.git" ]; then \
|
||||||
|
git init $(LLVM_PROJECTDIR); \
|
||||||
|
fi
|
||||||
cd $(LLVM_PROJECTDIR) && \
|
cd $(LLVM_PROJECTDIR) && \
|
||||||
git remote add origin https://github.com/tinygo-org/llvm-project && \
|
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) && \
|
git fetch --depth=1 origin $(LLVM_REVISION) && \
|
||||||
git checkout FETCH_HEAD
|
git checkout FETCH_HEAD
|
||||||
llvm-source: $(LLVM_PROJECTDIR)/llvm ## Get LLVM sources
|
|
||||||
|
|
||||||
# Configure LLVM.
|
# Configure LLVM.
|
||||||
TINYGO_SOURCE_DIR=$(shell pwd)
|
TINYGO_SOURCE_DIR=$(shell pwd)
|
||||||
|
|||||||
Reference in New Issue
Block a user