AlexStocks commented on code in PR #157: URL: https://github.com/apache/dubbo-go-pixiu-samples/pull/157#discussion_r3295423205
########## igt/Makefile: ########## @@ -30,7 +30,12 @@ pixiuSources = $(wildcard $(PIXIU_DIR)/pixiu/*.go) export GO111MODULE ?= on export GOPROXY ?= https://goproxy.io,direct export GOSUMDB ?= sum.golang.org -export GOARCH ?= amd64 +NATIVE_ARCH := $(shell uname -m) +ifeq ($(NATIVE_ARCH), arm64) Review Comment: [P1] 这里只识别 `arm64`,但 Linux ARM64 主机的 `uname -m` 通常返回 `aarch64`,因此在常见 ARM Linux 环境仍会落到 `GOARCH=amd64`,没有达到“自动检测 native GOARCH”的目的。这个 Makefile 已经依赖 Go,建议直接 `export GOARCH ?= $(shell go env GOARCH)`;如果继续用 `uname -m`,至少需要把 `aarch64` 映射到 `arm64`,`x86_64` 映射到 `amd64`,其他架构回退到 `go env GOARCH`。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
