mirror of
https://github.com/alibaba/higress.git
synced 2026-05-26 05:37:25 +08:00
fix(build): Make sure golang-filter is built with the correct TARGET_ARCH (#3682)
Co-authored-by: EndlessSeeker <153817598+EndlessSeeker@users.noreply.github.com>
This commit is contained in:
@@ -23,6 +23,11 @@ export GOPROXY ?= https://proxy.golang.org,direct
|
|||||||
|
|
||||||
TARGET_ARCH ?= amd64
|
TARGET_ARCH ?= amd64
|
||||||
|
|
||||||
|
VALID_ARCHS := amd64 arm64
|
||||||
|
ifeq ($(filter $(TARGET_ARCH),$(VALID_ARCHS)),)
|
||||||
|
$(error "TARGET_ARCH must be one of: $(VALID_ARCHS)")
|
||||||
|
endif
|
||||||
|
|
||||||
GOARCH_LOCAL := $(TARGET_ARCH)
|
GOARCH_LOCAL := $(TARGET_ARCH)
|
||||||
GOOS_LOCAL := $(TARGET_OS)
|
GOOS_LOCAL := $(TARGET_OS)
|
||||||
RELEASE_LDFLAGS='$(GO_LDFLAGS) -extldflags -static -s -w'
|
RELEASE_LDFLAGS='$(GO_LDFLAGS) -extldflags -static -s -w'
|
||||||
@@ -166,7 +171,7 @@ build-gateway: prebuild buildx-prepare build-golang-filter
|
|||||||
USE_REAL_USER=1 TARGET_ARCH=arm64 DOCKER_TARGETS="docker.proxyv2" ./tools/hack/build-istio-image.sh init
|
USE_REAL_USER=1 TARGET_ARCH=arm64 DOCKER_TARGETS="docker.proxyv2" ./tools/hack/build-istio-image.sh init
|
||||||
DOCKER_TARGETS="docker.proxyv2" IMG_URL="${IMG_URL}" ./tools/hack/build-istio-image.sh docker.buildx
|
DOCKER_TARGETS="docker.proxyv2" IMG_URL="${IMG_URL}" ./tools/hack/build-istio-image.sh docker.buildx
|
||||||
|
|
||||||
build-gateway-local: prebuild build-golang-filter-amd64
|
build-gateway-local: prebuild $(if $(filter amd64,$(TARGET_ARCH)),build-golang-filter-amd64,build-golang-filter-arm64)
|
||||||
TARGET_ARCH=${TARGET_ARCH} DOCKER_TARGETS="docker.proxyv2" ./tools/hack/build-istio-image.sh docker
|
TARGET_ARCH=${TARGET_ARCH} DOCKER_TARGETS="docker.proxyv2" ./tools/hack/build-istio-image.sh docker
|
||||||
|
|
||||||
build-golang-filter-amd64:
|
build-golang-filter-amd64:
|
||||||
|
|||||||
Reference in New Issue
Block a user