Merge changes from topic "libbinder_ndk-remove-cpp-headers" into main

* changes:
  ndk_library: limit exports
  Reland "Truely re-export export_header_libs from ndk_library"
  ndk_library depends on the correct arch variant of cc_library_headers
This commit is contained in:
Steven Moreland
2024-09-04 18:23:19 +00:00
committed by Gerrit Code Review
3 changed files with 27 additions and 3 deletions

View File

@@ -2507,8 +2507,14 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
}
if c.isNDKStubLibrary() {
// ndk_headers do not have any variations
actx.AddFarVariationDependencies([]blueprint.Variation{}, depTag, lib)
variationExists := actx.OtherModuleDependencyVariantExists(nil, lib)
if variationExists {
actx.AddVariationDependencies(nil, depTag, lib)
} else {
// dependencies to ndk_headers fall here as ndk_headers do not have
// any variants.
actx.AddFarVariationDependencies([]blueprint.Variation{}, depTag, lib)
}
} else if c.IsStubs() && !c.isImportedApiLibrary() {
actx.AddFarVariationDependencies(append(ctx.Target().Variations(), c.ImageVariation()),
depTag, lib)