Open kon72 opened 8 months ago
It's ugly, but a solution I can come up with is:
Thanks so much for tracking it down and reporting, Kon.
We really do need those features off (for the reasons in the comments next to them), and compiler param files need to be on for the actual compilation on Windows. I can't think of a better solution offhand than the one you propose.
Might also be worth filing a Bazel issue?
Hmm, actually, I'm seeing this work okay for Android builds in my personal project. I'm wondering if, perhaps, they turned on param files by default in the Mac toolchain you're using, and that's why we're seeing it? I still can't think of a better solution, unfortunately.
I did a more thorough test on my main project and removing the --feature=-'s in refresh.template.py didn't seem to lead to changes in the bazel-out paths there, for the macOS host as well as for transitions to iOS and Android. So it must be something about that transition type? Super duper weird.
In the reproducible code below,
bazel build //:b
would run the compilation under the directorybazel-out/darwin_arm64-fastbuild-ST-299abaa87f6b
, but the generated compile commands havebazel-out/darwin_arm64-fastbuild-ST-3b9a2f2abd71
in place of that.After some digging, it looks
--features
flags used in the aquery command is causing the bazel-out hash to change.As a quick workaround, omitting features flag from aquery args fixed this issue. (But surely it's going to surface up some other problems...)
Minimal reproducible example
transition.bzl
BUILD