bp2build: Add support for export_.*headers props

Soong supports export_.*_headers properties, the libraries contained in
this list must also be within a shared/static/whole_static/header libs
property. For bp2build, we eliminate this duplication. The libraries
not listed in an export_.*_headers property will migrate to an attribute
prepended with implementation_, those in export_.*_headers will not have
a prefix.

Test: build/bazel/ci/bp2build.sh
Test: build/bazel/ci/mixed_libc.sh
Bug: 198241472
Change-Id: I3eb84c983ec5d241c8a568e411dfd5619d3184a7
This commit is contained in:
Liz Kammer
2021-09-22 15:52:58 -04:00
parent 4ea6052650
commit 7a210ac233
10 changed files with 288 additions and 139 deletions

View File

@@ -135,8 +135,8 @@ func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
attrs := &bazelCcLibraryHeadersAttributes{
Export_includes: exportedIncludes.Includes,
Export_system_includes: exportedIncludes.SystemIncludes,
Implementation_deps: linkerAttrs.deps,
Deps: linkerAttrs.exportedDeps,
Implementation_deps: linkerAttrs.implementationDeps,
Deps: linkerAttrs.deps,
System_dynamic_deps: linkerAttrs.systemDynamicDeps,
}