To repro, run this o n a MacOS computer:
$ git clone [email protected]:juanique/bazel-examples.git
$ cd bazel-examples/bazel8/rules_cc/4-zig-hermetic-cc-toolchain
$ bazel build :main --config=remote-linux
# ^ This works! with hermetic cc toolchain 3.x
$ git checkout remote-exec-repro
$ bazel build :main --config=remote-linux
# ^ This does NOT work! with hermetic cc toolchain 4.x
I did a bisect search and found this to be the commit where it broke: 892973b
But there's a high probability that I'm just using the new version wrong.
The diff between the working and the non-working versions is here: https://github.com/juanique/bazel-examples/pull/28/changes