Delete some api_bp2build dead code.
Follow up of https://android-review.googlesource.com/2630914 Bug: 284029211 Test: presubmits Change-Id: Idc0ff2f20e54b81cfdf61472a72e9cb027f60554
This commit is contained in:
@@ -648,8 +648,8 @@ invocations are run in the debugger, e.g., running
|
|||||||
SOONG_DELVE=2345 SOONG_DELVE_STEPS='build,modulegraph' m
|
SOONG_DELVE=2345 SOONG_DELVE_STEPS='build,modulegraph' m
|
||||||
```
|
```
|
||||||
results in only `build` (main build step) and `modulegraph` being run in the debugger.
|
results in only `build` (main build step) and `modulegraph` being run in the debugger.
|
||||||
The allowed step names are `api_bp2build`, `bp2build_files`, `bp2build_workspace`,
|
The allowed step names are `bp2build_files`, `bp2build_workspace`, `build`,
|
||||||
`build`, `modulegraph`, `queryview`, `soong_docs`.
|
`modulegraph`, `queryview`, `soong_docs`.
|
||||||
|
|
||||||
Note setting or unsetting `SOONG_DELVE` causes a recompilation of `soong_build`. This
|
Note setting or unsetting `SOONG_DELVE` causes a recompilation of `soong_build`. This
|
||||||
is because in order to debug the binary, it needs to be built with debug
|
is because in order to debug the binary, it needs to be built with debug
|
||||||
|
@@ -14,14 +14,6 @@
|
|||||||
|
|
||||||
package android
|
package android
|
||||||
|
|
||||||
func init() {
|
|
||||||
RegisterApiDomainBuildComponents(InitRegistrationContext)
|
|
||||||
}
|
|
||||||
|
|
||||||
func RegisterApiDomainBuildComponents(ctx RegistrationContext) {
|
|
||||||
ctx.RegisterModuleType("api_domain", ApiDomainFactory)
|
|
||||||
}
|
|
||||||
|
|
||||||
type ApiSurface int
|
type ApiSurface int
|
||||||
|
|
||||||
// TODO(b/246656800): Reconcile with android.SdkKind
|
// TODO(b/246656800): Reconcile with android.SdkKind
|
||||||
@@ -44,50 +36,3 @@ func (a ApiSurface) String() string {
|
|||||||
return "invalid"
|
return "invalid"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type apiDomain struct {
|
|
||||||
ModuleBase
|
|
||||||
BazelModuleBase
|
|
||||||
|
|
||||||
properties apiDomainProperties
|
|
||||||
}
|
|
||||||
|
|
||||||
type apiDomainProperties struct {
|
|
||||||
// cc library contributions (.h files/.map.txt) of this API domain
|
|
||||||
// This dependency is a no-op in Soong, but the corresponding Bazel target in the api_bp2build workspace
|
|
||||||
// will provide a `CcApiContributionInfo` provider
|
|
||||||
Cc_api_contributions []string
|
|
||||||
|
|
||||||
// java library contributions (as .txt) of this API domain
|
|
||||||
// This dependency is a no-op in Soong, but the corresponding Bazel target in the api_bp2build workspace
|
|
||||||
// will provide a `JavaApiContributionInfo` provider
|
|
||||||
Java_api_contributions []string
|
|
||||||
}
|
|
||||||
|
|
||||||
func ApiDomainFactory() Module {
|
|
||||||
m := &apiDomain{}
|
|
||||||
m.AddProperties(&m.properties)
|
|
||||||
InitAndroidArchModule(m, DeviceSupported, MultilibBoth)
|
|
||||||
return m
|
|
||||||
}
|
|
||||||
|
|
||||||
// Do not create any dependency edges in Soong for now to skip visibility checks for some systemapi libraries.
|
|
||||||
// Currently, all api_domain modules reside in build/orchestrator/apis/Android.bp
|
|
||||||
// However, cc libraries like libsigchain (com.android.art) restrict their visibility to art/*
|
|
||||||
// When the api_domain module types are collocated with their contributions, this dependency edge can be restored
|
|
||||||
func (a *apiDomain) DepsMutator(ctx BottomUpMutatorContext) {
|
|
||||||
}
|
|
||||||
|
|
||||||
// API domain does not have any builld actions yet
|
|
||||||
func (a *apiDomain) GenerateAndroidBuildActions(ctx ModuleContext) {
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
apiContributionSuffix = ".contribution"
|
|
||||||
)
|
|
||||||
|
|
||||||
// ApiContributionTargetName returns the name of the bp2build target (e.g. cc_api_contribution) of contribution modules (e.g. ndk_library)
|
|
||||||
// A suffix is necessary to prevent a name collision with the base target in the same bp2build bazel package
|
|
||||||
func ApiContributionTargetName(moduleName string) string {
|
|
||||||
return moduleName + apiContributionSuffix
|
|
||||||
}
|
|
||||||
|
@@ -181,8 +181,7 @@ func NewContext(config Config) *Context {
|
|||||||
return ctx
|
return ctx
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function to register the module types used in bp2build and
|
// Helper function to register the module types used in bp2build.
|
||||||
// api_bp2build.
|
|
||||||
func registerModuleTypes(ctx *Context) {
|
func registerModuleTypes(ctx *Context) {
|
||||||
for _, t := range moduleTypes {
|
for _, t := range moduleTypes {
|
||||||
t.register(ctx)
|
t.register(ctx)
|
||||||
|
@@ -161,18 +161,3 @@ func libraryHeadersBp2Build(ctx android.Bp2buildMutatorContext, module *Module)
|
|||||||
Tags: tags,
|
Tags: tags,
|
||||||
}, attrs)
|
}, attrs)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append .contribution suffix to input labels
|
|
||||||
func apiBazelTargets(ll bazel.LabelList) bazel.LabelList {
|
|
||||||
labels := make([]bazel.Label, 0)
|
|
||||||
for _, l := range ll.Includes {
|
|
||||||
labels = append(labels, bazel.Label{
|
|
||||||
Label: android.ApiContributionTargetName(l.Label),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return bazel.MakeLabelList(labels)
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
allArches = []string{"arm", "arm64", "x86", "x86_64"}
|
|
||||||
)
|
|
||||||
|
Reference in New Issue
Block a user