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
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
linux amd64
Any other potentially useful information about your toolchain?
What did you do?
go 1.14 enabled checkptr by default when compiling with -race or -msan. This check causes boltdb to fail at runtime (see etcd-io/bbolt#187). So I've tried to add gc_goopts to my test target (see: prysmaticlabs/prysm@b4f042e)
gc_goopts= [
"-d=checkptr=0",
],
However, this flag doesn't seem to be applied when bazel is building the testmain, while the race flag is still applied.
What did you expect to see?
gcflags applied to testmain compilation. -gcflags '-d=checkptr=0 -race'
What did you see instead?
Only race flags applied. -gcflags -race
The text was updated successfully, but these errors were encountered:
I've verified -d=checkptr=0 is passed when compiling the test package. The test passes with that flag, and it fails if the gc_goopts attribute is removed.
Why is it important though that -d=checkptr=0 is used when compiling the testmain package. It sounds like github.com/etcd-io/bbolt is the package that has the problem. Have you tried setting gc_goopts = ["-d=checkptr=0"] on that go_library? gc_goopts only applies to one package, not its dependencies.
Ah! I thought compiler flag needed to be on the final compile and link step. Adding the flag to boltdb's go_library fixed my problem indeed. Thanks for looking into it!
What version of rules_go are you using?
0.22.1
What version of gazelle are you using?
0.22.0
What version of Bazel are you using?
2.1.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
linux amd64
Any other potentially useful information about your toolchain?
What did you do?
go 1.14 enabled checkptr by default when compiling with -race or -msan. This check causes boltdb to fail at runtime (see etcd-io/bbolt#187). So I've tried to add gc_goopts to my test target (see: prysmaticlabs/prysm@b4f042e)
However, this flag doesn't seem to be applied when bazel is building the testmain, while the race flag is still applied.
What did you expect to see?
gcflags applied to testmain compilation.
-gcflags '-d=checkptr=0 -race'
What did you see instead?
Only race flags applied.
-gcflags -race
The text was updated successfully, but these errors were encountered: