build: set netgo & osusergo tags for Linux build (#10261)

Avoid:

/_/GOROOT/src/os/user/cgo_lookup_cgo.go:45:(.text+0x54): warning: Using
'getgrgid_r' in statically linked applications requires at runtime the
shared libraries from the glibc version used for linking

and

/tmp/go-build/cgo-gcc-prolog:60:(.text+0x40): warning: Using
'getaddrinfo' in statically linked applications requires at runtime the
shared libraries from the glibc version used for linking
This commit is contained in:
Jakob Borg
2025-08-16 06:33:01 +02:00
committed by GitHub
parent 33b5c3c62e
commit 755daaa7b7
2 changed files with 24 additions and 20 deletions
+3
View File
@@ -49,6 +49,8 @@ var (
replaceTags = map[string]string{
"sqlite_omit_load_extension": "",
"sqlite_dbstat": "",
"netgo": "",
"osusergo": "",
}
)
@@ -132,6 +134,7 @@ func TagsList() []string {
tags = tags[1:]
}
tags = slices.Compact(tags)
return tags
}