Thinking outloud some more - what we want is a best-effort GOFLAGS. It kind of is like that already, since commands ignore flags they don't know about, like @eliasnaur said. We want to go a bit further and go past "unsupported" errors. If a user really wants to force the use of a flag, they could use go build -race, which will get the current behavior.
For what it's worth, we made it so that the test that builds with GOOS=js skips itself when the race tag is enabled. Detecting the build tag requires a global bool and an extra file, but the setup is simple enough.