summaryrefslogtreecommitdiff
path: root/scripts/construct_context.py
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-09-19 19:51:52 +0000
committer Spandan Das <spandandas@google.com> 2023-09-25 21:27:19 +0000
commitaf72583468e8480696e63c2aa5e50c55d379d944 (patch)
tree18d2be669630ca738d83e3172ff6fdcb2d3e9929 /scripts/construct_context.py
parentb95a8b33be5f12f4bb1f3d6c12e1f42a646848e7 (diff)
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
Diffstat (limited to 'scripts/construct_context.py')
0 files changed, 0 insertions, 0 deletions