bazel
bazel copied to clipboard
Normalize C++ action config tool paths based on exec platform OS
Work towards #19208
RELNOTES: Tool paths specified in cc_toolchain action configs are now normalized based on the current execution platform's OS rather than the host OS. In particular, Windows-style absolute paths are now treated as absolute paths when building on a Windows executor from a non-Windows host.
@lberki I implemented the solution you mentioned as your favorite one in https://github.com/bazelbuild/bazel/issues/19208#issuecomment-1689609485.
As a follow-up, I would also use this new logic in HeaderDiscovery.
CC @sluongng
@lberki Gentle ping
This looks stalled. What's the next action? Do you need my review?
cc @lberki @fmeum
@comius I have mostly given up on this for now. There are too many callers of PathFragment methods that make properly dealing with invalid paths almost impossible. I will wait for C++ Starlarkification to progress before I revisit this.