Wrap PackageContext and SingletonContext
Wrap blueprint.PackageContext so that the *Func methods can provide an android.Config instead of an interface{}. The modified signatures means that every method in ModuleContext and SingletonContext that takes a blueprint.PackageContext now needs to be wrapped to take an android.PackageContext. SingletonContext wasn't previously wrapped at all, but as long as it is, wrap everything like ModuleContext does. This requires updating every Singleton to use the android-specific methods. Test: builds, all Soong tests pass Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
This commit is contained in:
14
java/gen.go
14
java/gen.go
@@ -28,8 +28,6 @@ func init() {
|
||||
pctx.HostBinToolVariable("aidlCmd", "aidl")
|
||||
pctx.SourcePathVariable("logtagsCmd", "build/tools/java-event-log-tags.py")
|
||||
pctx.SourcePathVariable("mergeLogtagsCmd", "build/tools/merge-event-log-tags.py")
|
||||
|
||||
pctx.IntermediatesPathVariable("allLogtagsFile", "all-event-log-tags.txt")
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -117,7 +115,7 @@ func (j *Module) genSources(ctx android.ModuleContext, srcFiles android.Paths,
|
||||
return outSrcFiles
|
||||
}
|
||||
|
||||
func LogtagsSingleton() blueprint.Singleton {
|
||||
func LogtagsSingleton() android.Singleton {
|
||||
return &logtagsSingleton{}
|
||||
}
|
||||
|
||||
@@ -127,18 +125,18 @@ type logtagsProducer interface {
|
||||
|
||||
type logtagsSingleton struct{}
|
||||
|
||||
func (l *logtagsSingleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
|
||||
func (l *logtagsSingleton) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
var allLogtags android.Paths
|
||||
ctx.VisitAllModules(func(module blueprint.Module) {
|
||||
ctx.VisitAllModules(func(module android.Module) {
|
||||
if logtags, ok := module.(logtagsProducer); ok {
|
||||
allLogtags = append(allLogtags, logtags.logtags()...)
|
||||
}
|
||||
})
|
||||
|
||||
ctx.Build(pctx, blueprint.BuildParams{
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: mergeLogtags,
|
||||
Description: "merge logtags",
|
||||
Outputs: []string{"$allLogtagsFile"},
|
||||
Inputs: allLogtags.Strings(),
|
||||
Output: android.PathForIntermediates(ctx, "all-event-log-tags.txt"),
|
||||
Inputs: allLogtags,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user