Deprecate api bp2build of ndk_library and ndk_headers

To support export of NDK APIs in multi-tree, we added functionality to
generate Bazel targets of ndk related Soong module types. Since this use
case does not exist anymore, deprecate this to prevent bitrot

The removed code includes
- `ConvertWithApi2Build` implementation of these libraries, which
  generates the Bazel targets in the synthetic `api_bp2build` workspace
- (api) bp2build unit tests for these module types

Test: go build ./cc
Bug: 284029211
Change-Id: Id3278fa119e0ab87f31f39a3783197a81b655e43
This commit is contained in:
Spandan Das
2023-05-30 23:09:36 +00:00
parent ff007311e3
commit 230c312f83
6 changed files with 0 additions and 311 deletions

View File

@@ -599,24 +599,3 @@ func apiHeaderLabels(ctx android.TopDownMutatorContext, hdrLibs []string) bazel.
}
return android.BazelLabelForModuleDepsWithFn(ctx, hdrLibs, addSuffix)
}
func ndkLibraryBp2build(ctx android.TopDownMutatorContext, m *Module) {
props := bazel.BazelTargetModuleProperties{
Rule_class: "cc_api_contribution",
Bzl_load_location: "//build/bazel/rules/apis:cc_api_contribution.bzl",
}
stubLibrary := m.compiler.(*stubDecorator)
attrs := &bazelCcApiContributionAttributes{
Library_name: stubLibrary.implementationModuleName(m.Name()),
Api_surfaces: bazel.MakeStringListAttribute(
[]string{android.PublicApi.String()}),
}
if symbolFile := stubLibrary.properties.Symbol_file; symbolFile != nil {
apiLabel := android.BazelLabelForModuleSrcSingle(ctx, proptools.String(symbolFile)).Label
attrs.Api = *bazel.MakeLabelAttribute(apiLabel)
}
apiHeaders := apiHeaderLabels(ctx, stubLibrary.properties.Export_header_libs)
attrs.Hdrs = bazel.MakeLabelListAttribute(apiHeaders)
apiContributionTargetName := android.ApiContributionTargetName(ctx.ModuleName())
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: apiContributionTargetName}, attrs)
}