Make SSH toolchain an optional override
We currently have SSH toolchain, constraint and platform. We opt into the toolchain by specifying --platforms
pointing to the platform. However, this means the toolchain can't be used to replace a baked-in platform in a target for one-off runs. For example, in:
labgrid_test(
name = "test",
src = ":binary",
platform = "@rules_labgrid//labgrid/platform:qemu-arm64-linux",
)
There isn't a way to override the QEMU platform. We should allow that by using --extra_toolchains
, so that we can run:
bazel test :test --extra_toolchains=@rules_labgrid//labgrid/toolchain/config/ssh --@rules_labgrid//labgrid/flag/device:address=<ip>
This would require us to stop registering the SSH toolchain by default, and to remove the SSH constraint and platform altogether. This would be a breaking change.