Document mixed/heterogeneous builds across different operating systems
- Dominant language
- Rust
- Stars
- 4.4k
- Forks
- 394
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to have a BUILD step automatically run on a remote host if the local OS is not target_compatible without having to use `--fake-host`?
E.g I want to make something like this to work:
```
genrule(
name = "hello_windows",
out = "hello_windows.txt",
cmd = "echo Hello from Windows >> $OUT",
target_compatible_with = ["config//os:windows"],
)
genrule(
name = "hello_linux",
out = "hello_linux.txt",
cmd = "sha1sum $(location :hello_windows) >> $OUT",
target_compatible_with = ["config//os:linux"],
)
```
This is similar to the following bazel issues:
- https://github.com/bazelbuild/bazel/issues/19587
- https://github.com/bazelbuild/bazel/issues/19209
- https://github.com/bazelbuild/bazel/issues/5309
Contributor guide
Assessment
This issue has not been assessed yet.