bp2build: check in cc_library rules and unit test.

This change adds the Starlark code used by the bp2build-generated
targets for cc_library related types.

It also adds a sh_test unit test that analyzes the runfiles outputs of a
full cc_library generated by bp2build, starting with ld-android. It
analyzes that the shared and static libraries are of the right
filetypes, and that the shared library exports an expected set of
symbols.

This CL checks in cc_shared_library from rules_cc HEAD, without any
local changes for Roboleaf.

Test: TH
Test: bp2build, bazel test //build/bazel/tests/...

Change-Id: I4deb3fc3160e393b03b4bd550777146d6cad6de8
9 files changed
tree: 4117d39652f3c540c2d50c938c61f8fd8543b289
  1. bazel_skylib/
  2. docs/
  3. examples/
  4. json_module_graph/
  5. platforms/
  6. product_variables/
  7. rules/
  8. rules_cc/
  9. scripts/
  10. tests/
  11. bazel.BUILD
  12. bazel.sh
  13. bazel.WORKSPACE
  14. common.bazelrc
  15. darwin.bazelrc
  16. linux.bazelrc
  17. OWNERS
  18. 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.