Skip to content

Commit 92bbebf

Browse files
committed
cmd/gomobile: ensure -a build flag is passed to go build command
The gomobile build command wraps `go build`, and parses many build flags, but it only parses `-a` and misses actually consuming it currently. This means that forcing a rebuild of packages is not possible easily: https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies
1 parent a159579 commit 92bbebf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/gomobile/build.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,9 @@ func goCmdAt(at string, subcmd string, srcs []string, env []string, args ...stri
318318
if buildX {
319319
cmd.Args = append(cmd.Args, "-x")
320320
}
321+
if buildA {
322+
cmd.Args = append(cmd.Args, "-a")
323+
}
321324
if buildGcflags != "" {
322325
cmd.Args = append(cmd.Args, "-gcflags", buildGcflags)
323326
}

0 commit comments

Comments
 (0)