mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 21:24:31 +04:00
golang: Add support for setting gcflags/ldflags from package Makefile
This adds several variables for Go package Makefiles: * GO_PKG_GCFLAGS - go tool compile arguments * GO_PKG_LDFLAGS - go tool link arguments * GO_PKG_LDFLAGS_X - go tool link -X definitions Settings these will add the corresponding flags to the go install command line. (Other command line arguments can still be added by passing them as the first argument to GoPackage/Build/Compile.) This also adds Go's runtime environment variables (GOGC, GOMAXPROCS, GOTRACEBACK) to the unexport list. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
@@ -13,7 +13,8 @@ include $(GO_INCLUDE_DIR)/golang-version.mk
|
||||
|
||||
|
||||
unexport \
|
||||
GOARCH GOBIN GOCACHE GODEBUG GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
|
||||
GOARCH GOBIN GOCACHE GOFLAGS GOHOSTARCH GOOS GOPATH GORACE GOROOT GOTMPDIR GCCGO \
|
||||
GOGC GODEBUG GOMAXPROCS GOTRACEBACK \
|
||||
CGO_ENABLED \
|
||||
CGO_CFLAGS CGO_CFLAGS_ALLOW CGO_CFLAGS_DISALLOW \
|
||||
CGO_CPPFLAGS CGO_CPPFLAGS_ALLOW CGO_CPPFLAGS_DISALLOW \
|
||||
|
||||
Reference in New Issue
Block a user