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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user