aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorsago35 <[email protected]>2021-04-18 17:53:40 +0900
committerAyke <[email protected]>2021-04-19 00:55:42 +0200
commit6152a661e846529489461a9f368ae840e17f8066 (patch)
treeacceaba2951075ba4fdff0eca761ccddeaf8785f
parentf1a5743f77f6260799bf178b2eb7d23070c16f81 (diff)
downloadtinygo-6152a661e846529489461a9f368ae840e17f8066.tar.gz
tinygo-6152a661e846529489461a9f368ae840e17f8066.zip
ci: improve llvm-source cache
-rw-r--r--.circleci/config.yml27
-rw-r--r--Makefile4
2 files changed, 23 insertions, 8 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 4e5de56e2..105bf8cc5 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -68,14 +68,17 @@ commands:
steps:
- restore_cache:
keys:
- - llvm-source-11-v1
+ - llvm-source-11-v2
- run:
name: "Fetch LLVM source"
command: make llvm-source
- save_cache:
- key: llvm-source-11-v1
+ key: llvm-source-11-v2
paths:
- - llvm-project
+ - llvm-project/clang/lib/Headers
+ - llvm-project/clang/include
+ - llvm-project/lld/include
+ - llvm-project/llvm/include
build-wasi-libc:
steps:
- restore_cache:
@@ -160,6 +163,9 @@ commands:
command: |
if [ ! -f llvm-build/lib/liblldELF.a ]
then
+ # fetch LLVM source
+ rm -rf llvm-project
+ make llvm-source
# install dependencies
sudo apt-get install cmake ninja-build
# hack ninja to use less jobs
@@ -224,6 +230,9 @@ commands:
command: |
if [ ! -f llvm-build/lib/liblldELF.a ]
then
+ # fetch LLVM source
+ rm -rf llvm-project
+ make llvm-source
# install dependencies
sudo apt-get install cmake ninja-build
# hack ninja to use less jobs
@@ -287,14 +296,17 @@ commands:
- go-cache-macos-v2-{{ checksum "go.mod" }}
- restore_cache:
keys:
- - llvm-source-11-macos-v1
+ - llvm-source-11-macos-v2
- run:
name: "Fetch LLVM source"
command: make llvm-source
- save_cache:
- key: llvm-source-11-macos-v1
+ key: llvm-source-11-macos-v2
paths:
- - llvm-project
+ - llvm-project/clang/lib/Headers
+ - llvm-project/clang/include
+ - llvm-project/lld/include
+ - llvm-project/llvm/include
- restore_cache:
keys:
- llvm-build-11-macos-v2
@@ -303,6 +315,9 @@ commands:
command: |
if [ ! -f llvm-build/lib/liblldELF.a ]
then
+ # fetch LLVM source
+ rm -rf llvm-project
+ make llvm-source
# install dependencies
HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake ninja
# build!
diff --git a/Makefile b/Makefile
index 284e4a959..8ed7782ae 100644
--- a/Makefile
+++ b/Makefile
@@ -152,9 +152,9 @@ gen-device-stm32: build/gen-device-svd
# Get LLVM sources.
-$(LLVM_PROJECTDIR)/README.md:
+$(LLVM_PROJECTDIR)/llvm:
git clone -b xtensa_release_11.0.0 --depth=1 https://github.com/tinygo-org/llvm-project $(LLVM_PROJECTDIR)
-llvm-source: $(LLVM_PROJECTDIR)/README.md
+llvm-source: $(LLVM_PROJECTDIR)/llvm
# Configure LLVM.
TINYGO_SOURCE_DIR=$(shell pwd)