Add support for exporting -I and -isystem

Soong allows users to distinguish between system includes and includes;
however, all includes exported via Bazel are treated as system includes.
In general, this has little impact.

However, libcxx targets are a rarity, using the #include_next directive,
which impacts the search order for includes. In Soong, these targets
export includes and depend on bionic, which export system includes. This
ensures that bionic includes are searched _after_ the includes for
libcxx targets; however, in Bazel, dependencies on libcxx targets fail
to resolve their dependencies on bionic as they are both system includes
and the order of the includes from libcxx and libc is not guaranteed.

Additionally, some modules export both -I and -isystem include paths, we
split these into two separate parameters and propagate them as they
would be in Soong.

Mixed build still fails building libc++ due to duplicate symbols tracked
in http://b/196630133

Bug: 198403271
Test: cquery for libc++_static's includes/system_includes is as expected
Test: USE_BAZEL_ANALYSIS=1 m libbacktrace_no_dex succeeds with libc++_*
      modules removed from mixed build denylist (fails otherwise)
Change-Id: I610db3ffa5ba6d8bdc2f75752d801899e90e75eb
4 files changed
tree: fabcfbbf84a81abf3c156ff437ab8db5ecf51ee2
  1. ci/
  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.