Stem attribute in cc_{binary|library}

By default, we use the name of the target as the name of the output
.so (or binary). However, this can be overriden using the `stem`
property. This CL implements this in our Bazel rule.

With `stem`, we can run into collisions since two targets in the same
package can use the same `stem`. To avoid this, the top-level .so file
is generated in a subdir specific to a target

Update existing b unit tests to use the updated location

Bug: 240563612
Test: b unit tests
Test: built //bionic/libc:libc and //bioinc/libc:libc_hwasan and
verified that both generate a file named libc.so

Change-Id: I34762ef9ae1ec601c87144310f9132e6c8e81217
12 files changed
tree: 0355b363dbcae7ba2594a1b694b73671195bc1d8
  1. api_surfaces/
  2. bin/
  3. ci/
  4. compliance/
  5. docs/
  6. examples/
  7. flags/
  8. json_module_graph/
  9. mk2rbc/
  10. mkcompare/
  11. platforms/
  12. product_config/
  13. product_variables/
  14. rules/
  15. scripts/
  16. tests/
  17. utils/
  18. vendor/
  19. .gitignore
  20. bazel.BUILD
  21. bazel.WORKSPACE
  22. buildifier_hook.sh
  23. common.bazelrc
  24. constants_exported_to_soong.bzl
  25. darwin.bazelrc
  26. linux.bazelrc
  27. OWNERS
  28. PREUPLOAD.cfg
  29. 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.