Files
Sergii Tkachenko 2f514a8d4b [Bazel] Fixes the issue of copt cache discarded between test and build (#41038)
This solves the issue with with copt cache dropped between `bazel build` and `bazel test`:

```
WARNING: Build option --copt has changed, discarding analysis cache.
```

This issue was introduced in #39945, which added `--copt=-DGRPC_POSTMORTEM_CHECKS` unconditionally to all `basel test`, but not `build`:

1d6841f7d8/tools/bazel.rc (L155-L156)

This PR moves the macro to a separate bazel profile config called `postmortem`, which is not enabled by default.
Instead, this config will be enabled in all remote CIs via tools/remote_build/include/test_config_common.bazelrc: ba4984e8a0/tools/remote_build/include/test_config_common.bazelrc (L26-L27)

For the list of affected CI jobs, see my comment on this PR.

Closes #41038

PiperOrigin-RevId: 832339240
2025-11-14 09:09:54 -08:00
..