Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k
stars
378
forks
source link
runtime.godebugDefault handling doesn't work with gazelle/rules_go #1945
Running go build -n -x ./main.go the first occurrence of my debug statement is inside the modinfo statement of the importcfg.link and then this is passed to the linker via the -X=runtime.godebugDefault=...
What version of gazelle are you using?
0.39.1
What version of rules_go are you using?
0.51.0
What version of Bazel are you using?
7.3.2
Does this issue reproduce with the latest releases of all the above?
These should be the latest version
What operating system and processor architecture are you using?
AARCH64 and macos
What did you do?
I want to set the default value of a GODEBUG variable. According to the documentation there are three ways to do this:
//go:debug somevalue=X
before the package declarationWhat did you expect to see?
Trying first and second I expected the resulting binary to include the
godebugDefault
What did you see instead?
Both the directive and the go.mod file have no impact on compiling the go binary.
More details and other observations
internal/godebug
package whilego build
forbids thisgo build
would warn about unknown directive and when built with bazel it does notReproducer set-up