Set direct nogo attribute to prevent building nogo for the wrong platform when multiple exec platforms are set (#4611)
**What type of PR is this?**
Bug fix
**What does this PR do? Why is it needed?**
This PR fixes an issue whereby, when two or more exec platforms are set
(via `--host_platform` and/or `--extra_execution_platforms`), it was
possible for Nogo to be build for one exec platform A, but be executed
on exec platform B, leading to an "exec format error" / "cannot execute
binary file" error when the action is run.
This PR moves the nogo dep directly to the relevant rules instead of via
`go_context_data`, removing the possibility for a discrepancy for the
two exec configs.
**Which issues(s) does this PR fix?**
Fixes #4571
**Other notes for review**
I wasn't sure about the handling of "legacy host mode" mentioned in the
comments so I added a test that covers the case... if that's what the
comments meant by "host mode". Please someone check whether that's
actually testing that (and/or if we still care about host mode).
9 files changed