It it possible to enable the Go race detector for Go code linked into a C++ application? The Go library is built with the -race option and it is linked into a C++ application that interacts with it using CGo. Passing GORACE environment options does not seem to trigger the tool, for example,
gdb --args env GORACE="halt_on_error=1" ...
The program can't be started using
go run -race ..
because it isn't a Go binary.