platform_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
..
config Revert "Revert "riscv64: enable V."" 2023-09-15 16:36:59 +00:00
libbuildversion Set the dist dir for musl targets of build_version_test 2022-04-28 14:18:59 +00:00
ndk_api_coverage_parser Remove OWNERS access for non-build team people to core build system 2023-02-28 19:29:47 -08:00
ndkstubgen Add --no-ndk to ndkstubgen 2022-10-05 09:06:49 +09:00
symbolfile Add riscv64. 2022-10-10 15:33:50 +00:00
afdo.go Do not enable AFDO if the option is off, even if there is a profile file 2023-07-27 14:04:05 +09:00
afdo_test.go Enable -funique-internal-linkage-names when afdo=true 2023-04-21 14:41:55 -07:00
Android.bp Revert "Block CFI on static libraries" 2023-09-21 17:04:43 +00:00
androidmk.go rust: Rust sanitized snapshots variations 2023-08-25 12:54:56 -04:00
api_level.go Revert "Revert "Set VIC as minimum SDK version for riscv64"" 2023-07-26 09:47:10 -07:00
binary.go Have ConvertWBp2build use Bp2buildMutatorContext 2023-09-20 14:49:35 +00:00
binary_sdk_member.go
binary_test.go Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation. 2023-03-06 22:51:03 +00:00
bp2build.go Generate a ndk_sysroot target in bp2build 2023-09-25 21:27:19 +00:00
builder.go Fix addrsig warnings 2023-04-14 14:31:14 -07:00
cc.go Switch bp2build mutator to bottom up 2023-09-22 19:19:22 +00:00
cc_test.go Relocate llndk.libraries.txt into system 2023-08-16 10:03:16 +09:00
ccdeps.go Parallelize singleton execution 2023-05-19 20:31:32 +00:00
check.go Allow "-mllvm foo" cflags 2023-03-12 16:31:10 +09:00
cmakelists.go Parallelize singleton execution 2023-05-19 20:31:32 +00:00
compdb.go Parallelize singleton execution 2023-05-19 20:31:32 +00:00
compiler.go Allow ramdisk targets to set cflags/exclude_srcs. 2023-07-27 17:06:46 -07:00
compiler_test.go
coverage.go Convert coverage libs as alwayslink 2023-07-26 19:24:23 +00:00
fdo_profile.go Have ConvertWBp2build use Bp2buildMutatorContext 2023-09-20 14:49:35 +00:00
fuzz.go Merge "Added haiku presubmit packaging" into main 2023-07-20 17:00:05 +00:00
gen.go Sandbox inputs to aidl rule in cc 2023-05-23 15:53:10 -04:00
gen_test.go Write Soong tests to confirm Sysprop directories 2022-08-29 18:46:50 +00:00
generated_cc_library.go Convert cc_aconfig_library to bazel. 2023-09-20 17:46:46 -07:00
genrule.go soong: add os name to cc_genrule 2022-12-01 20:01:03 +00:00
genrule_test.go Make cc_genrule.srcs configurable. 2022-10-19 12:35:26 -07:00
image.go Allow ramdisk targets to set cflags/exclude_srcs. 2023-07-27 17:06:46 -07:00
image_sdk_traits.go
installer.go Revert "Use installExecutable for cc binaries" 2023-06-14 07:38:44 +00:00
kernel_headers.go
library.go Switch bp2build mutator to bottom up 2023-09-22 19:19:22 +00:00
library_headers.go Switch bp2build mutator to bottom up 2023-09-22 19:19:22 +00:00
library_headers_test.go Make more cc tests parallel 2022-12-05 13:43:29 -05:00
library_sdk_member.go Replace SortedStringKeys with SortedKeys 2023-02-28 16:51:32 -08:00
library_stub.go Implement API surface import with APEX stub 2023-02-27 12:57:30 +09:00
library_stub_test.go Implement API surface import with APEX stub 2023-02-27 12:57:30 +09:00
library_test.go Export Soong module type to LOCAL_SOONG_MODULE_TYPE to Make for SBOM generation. 2023-03-06 22:51:03 +00:00
linkable.go rust: Rust sanitized snapshots variations 2023-08-25 12:54:56 -04:00
linker.go Supporting changes for CFI toolchain features 2023-03-27 18:07:40 +00:00
llndk_library.go
lto.go Revert "Disable Global ThinLTO by default" 2023-09-01 17:22:58 +00:00
lto_test.go Add GLOBAL_THINLTO env fixture to lto_test 2023-06-14 14:28:30 +08:00
makevars.go Add noOverride64GlobalCflags support to Soong 2023-01-25 04:02:29 +00:00
native_bridge_sdk_trait.go
ndk_abi.go Parallelize singleton execution 2023-05-19 20:31:32 +00:00
ndk_headers.go Create a bp2build converter for ndk_headers 2023-09-20 23:04:02 +00:00
ndk_library.go Have ConvertWBp2build use Bp2buildMutatorContext 2023-09-20 14:49:35 +00:00
ndk_prebuilt.go Have ConvertWBp2build use Bp2buildMutatorContext 2023-09-20 14:49:35 +00:00
ndk_sysroot.go Create a bp2build converter for ndk_headers 2023-09-20 23:04:02 +00:00
ndk_test.go Add a property in ndk_library for header contributions 2022-08-30 18:24:40 +00:00
object.go Have ConvertWBp2build use Bp2buildMutatorContext 2023-09-20 14:49:35 +00:00
object_test.go Include NDK CRT object variants in the sysroot. 2023-04-04 23:27:15 +00:00
orderfile.go Removed order file use flags from being passed to cflags 2023-08-11 23:28:46 +00:00
orderfile_test.go Removed order file use flags from being passed to cflags 2023-08-11 23:28:46 +00:00
OWNERS Remove OWNERS access for non-build team people to core build system 2023-02-28 19:29:47 -08:00
pgo.go Remove sampling profile support from pgo rule 2022-06-07 15:23:08 +08:00
prebuilt.go Have ConvertWBp2build use Bp2buildMutatorContext 2023-09-20 14:49:35 +00:00
prebuilt_test.go Do not install prebuilt stubs from module_sdk 2023-03-28 18:19:04 +09:00
proto.go Switch bp2build mutator to bottom up 2023-09-22 19:19:22 +00:00
proto_test.go
pylintrc
rs.go Convert preview sdkVersion to int for target-api 2023-07-29 11:44:33 -07:00
sabi.go Add header_abi_checker properties for vendor, product, and platform 2022-12-28 18:50:38 +08:00
sanitize.go Reapply "Enable CFI for riscv64" 2023-09-18 13:41:29 -07:00
sanitize_test.go Fix adding manual ubsan runtime to static glibc binaries 2023-08-23 22:39:58 -07:00
sdk.go Install sdk variants in unbundled builds and package uninstallable variants 2023-05-02 15:37:26 +00:00
sdk_test.go Install sdk variants in unbundled builds and package uninstallable variants 2023-05-02 15:37:26 +00:00
snapshot_prebuilt.go rust: Rust sanitized snapshots variations 2023-08-25 12:54:56 -04:00
snapshot_utils.go rust: Add vendor and recovery dylib support. 2023-07-14 12:43:09 -04:00
stl.go Use ndk_system STL header library 2023-09-06 19:55:42 +00:00
strip.go Revert "Disable stripping for riscv64" 2022-11-11 00:59:14 +00:00
stub_library.go Parallelize singleton execution 2023-05-19 20:31:32 +00:00
sysprop.go Switch bp2build mutator to bottom up 2023-09-22 19:19:22 +00:00
test.go Do not convert non-unit tests. 2023-09-21 14:27:42 -04:00
test_data_test.go
testing.go Merge changes from topics "revert-2629131-sandbox-rust-inputs-JRFPQTIPEY", "revert-2758566-WBNIADIEXA" into main 2023-09-23 05:19:13 +00:00
tidy.go Parallelize singleton execution 2023-05-19 20:31:32 +00:00
tidy_test.go Prepare to obsolete -warnings-as-errors in tidy_flags 2022-06-12 20:25:43 -07:00
util.go make android.InList generic 2023-07-18 15:07:24 -04:00
vendor_public_library.go Reformat build/soong for go 1.19 2022-08-17 10:43:13 -07:00
vendor_public_library_test.go
vendor_snapshot.go Revert "rust: Add SCS sanitizer option for AArch64" 2023-07-31 18:01:26 +00:00
vendor_snapshot_test.go APEX can use any Prebuilt libraries 2023-05-08 22:33:35 +09:00
vndk.go Use vndk snapshot libraries txt files if exist 2023-08-22 10:11:52 +09:00
vndk_prebuilt.go Ignore some prebuilt vndk libs for trunk-stable next 2023-08-18 18:01:08 +09:00