From b70fb40c11eaee21a38f37ebc9b29edb486c4d93 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 16 Oct 2020 17:13:42 +0800 Subject: [PATCH] golang: Move build cache into $(TMP_DIR) This changes the default build cache directory from $(TOPDIR)/.go-build to $(TMP_DIR)/go-build, so that the cache directory is ignored by git and is removed by "make dirclean". This does not move/remove a build cache directory in the previous location; it will need to be removed manually. Fixes https://github.com/openwrt/packages/issues/13675. Signed-off-by: Jeffery To --- lang/golang/golang-values.mk | 2 +- lang/golang/golang/Config.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/golang/golang-values.mk b/lang/golang/golang-values.mk index 69126a1ed..b029ba5b1 100644 --- a/lang/golang/golang-values.mk +++ b/lang/golang/golang-values.mk @@ -236,7 +236,7 @@ endif # General build info -GO_BUILD_CACHE_DIR:=$(or $(call qstrip,$(CONFIG_GOLANG_BUILD_CACHE_DIR)),$(TOPDIR)/.go-build) +GO_BUILD_CACHE_DIR:=$(or $(call qstrip,$(CONFIG_GOLANG_BUILD_CACHE_DIR)),$(TMP_DIR)/go-build) GO_MOD_CACHE_DIR:=$(DL_DIR)/go-mod-cache GO_MOD_ARGS= \ diff --git a/lang/golang/golang/Config.in b/lang/golang/golang/Config.in index 714bf01fd..76fd85c80 100644 --- a/lang/golang/golang/Config.in +++ b/lang/golang/golang/Config.in @@ -17,7 +17,7 @@ config GOLANG_BUILD_CACHE_DIR default "" help Store the Go build cache in this directory. - If not set, uses './.go-build'. + If not set, uses '$(TMP_DIR)/go-build'. config GOLANG_MOD_CACHE_WORLD_READABLE bool "Ensure Go module cache is world-readable"