cmd/gogio: add -tags flag for supplying extra tags to the build

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-06-22 20:57:35 +02:00
parent 342c0da320
commit 5bd0ecea5e
5 changed files with 8 additions and 1 deletions
+3
View File
@@ -33,12 +33,14 @@ var (
keepWorkdir = flag.Bool("work", false, "print the name of the temporary work directory and do not delete it when exiting.")
linkMode = flag.String("linkmode", "", "set the -linkmode flag of the go tool")
extraLdflags = flag.String("ldflags", "", "extra flags to the Go linker")
extraTags = flag.String("tags", "", "extra tags to the Go tool")
)
type buildInfo struct {
name string
pkg string
ldflags string
tags string
target string
appID string
version int
@@ -96,6 +98,7 @@ func mainErr() error {
dir: dir,
version: *version,
minsdk: *minsdk,
tags: *extraTags,
}
if bi.appID == "" {
bi.appID = appIDFromPackage(pkgPath)