You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go build accepts a -gcflags argument to pass flags to the underlying Go compiler invocations (i.e., go tool compile). Pants should support a mechanism to do that as well.
Model as fields on go_binary and go_package (for tests) to add compiler options with defaults provided via option(s).
The text was updated successfully, but these errors were encountered:
…ags (#17683)
Add `compiler_flags` field for adding arbitrary extra compiler flags when compiling Go files.
Design:
- When `compiler_flags` is specified on a `go_mod` target, the flags are added for all compilation involving that Go module (including third-party dependencies).
- When `compiler_flags` is specified on a `go_binary` target, the flags are added for all compilation involved in building that Go binary (including third-party dependencies). These flags are added in addition to any flags specified via setting `compiler_flags` on the applicable `go_mod` target.
- When `compiler_flags` is specified on a `go_package` target, the flags are added only for the compilation of that specific package. These flags are added in addition to any flags specified via setting `compiler_flags` on the applicable `go_mod` and/or `go_binary` targets.
Fixes#17439
go build
accepts a-gcflags
argument to pass flags to the underlying Go compiler invocations (i.e.,go tool compile
). Pants should support a mechanism to do that as well.Model as fields on
go_binary
andgo_package
(for tests) to add compiler options with defaults provided via option(s).The text was updated successfully, but these errors were encountered: