-
Notifications
You must be signed in to change notification settings - Fork 799
cmd/gomobile: pass -a build flag to go build command #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This PR (HEAD: 558d52e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/mobile/+/724360. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/724360. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/724360. |
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
|
This PR (HEAD: 92bbebf) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/mobile/+/724360. Important tips:
|
|
Message from Caleb Jasik: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/724360. |
|
Message from Hajime Hoshi: Patch Set 5: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/724360. |
|
Message from Hajime Hoshi: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/724360. |
The gomobile build command wraps "go build" and parses many build
flags including "-a", but it was not actually passing the "-a" flag
through to the underlying go build command.
The "-a" flag forces a rebuild of packages and dependencies, which
is useful for ensuring clean builds when needed.
Add the missing code to pass the "-a" flag through to the go build
command when buildA is true, matching the pattern used for other
build flags like "-x" and "-gcflags".
Fixes golang/go/#76466