From 28cff022ee9800e924d750310584e18fb3401742 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Fri, 24 Jul 2026 17:53:55 -0400 Subject: [PATCH] Link an android binary in build-test-mobile The package builds only compile, so a linker-only failure could not fail CI. anet relies on //go:linkname, which the linker rejects on Go 1.23+ without -checklinkname=0, so linking cmd/nebula for android both covers that regression and records the flag requirement. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 24c71459..b7697047 100644 --- a/Makefile +++ b/Makefile @@ -222,11 +222,14 @@ test-cov-html: go test -coverprofile=coverage.out go tool cover -html=coverage.out +# The package builds only compile. The final line links an android binary so a linker-only failure, +# such as the //go:linkname reference anet makes, cannot pass CI. build-test-mobile: GOARCH=amd64 GOOS=ios go build $(shell go list ./... | grep -v '/cmd/\|/examples/') GOARCH=arm64 GOOS=ios go build $(shell go list ./... | grep -v '/cmd/\|/examples/') GOARCH=amd64 GOOS=android go build $(shell go list ./... | grep -v '/cmd/\|/examples/') GOARCH=arm64 GOOS=android go build $(shell go list ./... | grep -v '/cmd/\|/examples/') + GOARCH=arm64 GOOS=android go build -ldflags=-checklinkname=0 -o /dev/null ${NEBULA_CMD_PATH} bench: go test -bench=.