Browse Source

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 <jeffery.to@gmail.com>
lilik-openwrt-22.03
Jeffery To 4 years ago
parent
commit
b70fb40c11
No known key found for this signature in database GPG Key ID: C616D9E719E868E4
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      lang/golang/golang-values.mk
  2. +1
    -1
      lang/golang/golang/Config.in

+ 1
- 1
lang/golang/golang-values.mk View File

@ -236,7 +236,7 @@ endif
# General build info # 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_CACHE_DIR:=$(DL_DIR)/go-mod-cache
GO_MOD_ARGS= \ GO_MOD_ARGS= \


+ 1
- 1
lang/golang/golang/Config.in View File

@ -17,7 +17,7 @@ config GOLANG_BUILD_CACHE_DIR
default "" default ""
help help
Store the Go build cache in this directory. 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 config GOLANG_MOD_CACHE_WORLD_READABLE
bool "Ensure Go module cache is world-readable" bool "Ensure Go module cache is world-readable"


Loading…
Cancel
Save