Open
Description
What happened?
When RBE is used for cross-compilation, the host platform may be different from the exec platform.
In my case I have a linux_x86 host platform, so the launcher created by ctx.actions.expand_template
here
rules_js/js/private/js_binary.bzl
Lines 481 to 486 in 92a36f3
will create a file with a node path pointing to the host-resolved toolchain, with linux_x86 arch.
Now, I enable RBE and the exec
platform is linux_arm64. The launcher script is copied to the remote and tries to spawn node for the wrong arch, which of course fails with executable format error
cannot execute binary file ...nodejs_linux_amd64...`
Version
Bazel 6.2.1, latest of rules_js
How to reproduce
Tricky since you need an RBE setup with alternate architecture.
Any other information?
No response