tool/gocross: add android autoflags (#11465)

Updates tailscale/corp#18202

Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker
2024-03-19 16:08:20 -07:00
committed by GitHub
parent 221de01745
commit e37eded256
2 changed files with 61 additions and 0 deletions
+2
View File
@@ -61,6 +61,8 @@ func autoflagsForTest(argv []string, env *Environment, goroot, nativeGOOS, nativ
}
switch targetOS {
case "android":
cgo = env.Get("CGO_ENABLED", "0") == "1"
case "linux":
// Getting Go to build a static binary with cgo enabled is a
// minor ordeal. The incantations you apparently need are