rules_go icon indicating copy to clipboard operation
rules_go copied to clipboard

Embedding native buildinfo in Bazel binaries

Open PramodRaoB opened this issue 1 year ago • 0 comments

What version of rules_go are you using?

0.46.0

What version of gazelle are you using?

0.34.0

What version of Bazel are you using?

7.1.0

Does this issue reproduce with the latest releases of all the above?

Yes

What operating system and processor architecture are you using?

Darwin, x86_64

Any other potentially useful information about your toolchain?

NA

What did you do?

Build a binary target with the "pgoprofile" flag set. Then, inspect the build-info of the generated binary by running go version -m <binary_file>

What did you expect to see?

Expect to see PGO option being listed in the build info among other flags, for example:

build -pgo=<pgo_file_location>
build GOOS=<>
build GOARCH=<>

What did you see instead?

<binary_name>: go1.22.3 X:nocoverageredesign

Comments

I see that the issue of embedding build-info into the binary has been raised in #3090. However, I'm raising this issue to gain understanding on whether build-info other than the dependency info such as the one's I listed (specifically the pgo flag) can be embedded. If not, could I gain guidance on how I go about verifying whether or not a binary has a flag like pgo enabled.

PramodRaoB avatar May 28 '24 05:05 PramodRaoB