Files
build_soong/cc
Spandan Das af72583468 Generate a ndk_sysroot target in bp2build
This target will have a dependency edge to every bp2build equivalent of
Soong's ndk_headers. In b builds, sdk variants will compile against this
aggregated CcInfo providing target

A non monolithic alternative was discarded after conversations in
b/300504837#comment1-5

Contents of bp2build generated target: https://paste.googleplex.com/6643820291686400

Implementation details
- Since there is no equivalent Soong module for ndk_sysroot, hardcode
  bp2build/build_conversion.go to collect all ndk_headers soong modules.
  Add them to `deps` of a ndk_sysroot target
- Create `ndk_sysroot` in build/bazel/rules/cc/BUILD.bazel. This is
  expected to be a temporary location. This will use the
  cc_library_headers macro
- Update SetStubsForDynamicDeps so that sdk variant of rdeps depends on
  //build/bazel/rules/cc:ndk_sysroot. This will provide a CcInfo during
  compilation. Since ndk_sysroot is of type cc_library_headers, it will
  not get packaged into the apk.
- Refactor `goBazelTarget` to a generic `bTarget` so that it is
  representative of the expanded usage by ndk_sysroot

Test: b build //build/bazel/examples/android_app/java/com/app:app_with_sdk_variant_of_jni_deps --config=android (with aosp/2755284)

Bug: 300504837

Change-Id: Ifa427dd78115703ab251b0e1a0b71d3f19e91008
2023-09-25 21:27:19 +00:00
..
2022-10-05 09:06:49 +09:00
2022-10-10 15:33:50 +00:00
2023-04-14 14:31:14 -07:00
2023-09-22 19:19:22 +00:00
2023-05-19 20:31:32 +00:00
2023-03-12 16:31:10 +09:00
2023-05-19 20:31:32 +00:00
2023-05-19 20:31:32 +00:00
2023-05-23 15:53:10 -04:00
2022-12-01 20:01:03 +00:00
2021-04-26 18:41:00 -07:00
2023-05-19 20:31:32 +00:00
2023-09-22 19:19:22 +00:00
2023-09-18 13:41:29 -07:00
2023-09-06 19:55:42 +00:00
2023-09-21 14:27:42 -04:00
2023-05-19 20:31:32 +00:00
2023-07-18 15:07:24 -04:00