Add --experimental_output_directory_naming_scheme=diff_against_baseline

Adding the experimental flag to get rid of the no-op "affected by Starlark transition" in Bazel config when a label-based flag (i.e. //command_line_option:fdo_profile) is set back to None.

We have an incoming transition attached to a rule (i.e. _cc_library_shared_proxy) (aosp/2301014)  such as

```
def _fdo_profile_transition_impl(_, attr):
    return {
        "//command_line_option:fdo_profile": getattr(attr, "fdo_profile"),
    }
```

which sets `//command_line_option:fdo_profile` to the value of `fdo_profile` attr.

Say we have this dependency chain:

```
_cc_lib(name = "a") -> _cc_lib(name = "b", "fdo_profile"  = ":fdo") -> _cc_lib(name = "c")
```

Even though the incoming transition ensures that `a` and `c` are built without `fdo_profile`, they're built with different configs.

```
INFO: Displaying config with id d1e8282 (a)
  affected by starlark transition: []
  fdo_profile: null

INFO: Displaying config with id 3cfee49 (b)
  affected by starlark transition: [//command_line_option:fdo_profile]
  fdo_profile: //:foo

INFO: Displaying config with id 1598102 (c)
  affected by starlark transition: [//command_line_option:fdo_profile]
  fdo_profile: null
```

The flag make sures "affected by starlark transition" is empty the whole time so that the configs of `a` and `c` converge.

Test: cherry-pick aosp/2301014 and b build //external/jsoncpp:libjsoncpp which doesn't set fdo_profile but its dep (i.e. //external/libcxx:libc++) does
Change-Id: Icd5b225615de45a7cf026cbb66568a5b6fe7f85b
1 file changed
tree: 0898b09cff6e9dba587f14fd0e7552de29b772a4
  1. bin/
  2. ci/
  3. compliance/
  4. docs/
  5. examples/
  6. flags/
  7. json_module_graph/
  8. mk2rbc/
  9. platforms/
  10. product_config/
  11. product_variables/
  12. rules/
  13. scripts/
  14. tests/
  15. vendor/
  16. .gitignore
  17. bazel.BUILD
  18. bazel.WORKSPACE
  19. buildifier_hook.sh
  20. common.bazelrc
  21. darwin.bazelrc
  22. linux.bazelrc
  23. OWNERS
  24. PREUPLOAD.cfg
  25. README.md
README.md

Bazel

The code in this directory is experimental. Bazel support for Android Platform is undergoing active development and workflow stability is currently not guaranteed.