summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-12-10 12:30:44 -0800
committer Cole Faust <colefaust@google.com> 2024-12-10 12:31:53 -0800
commitbd20ac15ddecd33832318e2d158a2dcc129a22c1 (patch)
tree8a2618d9515e4543589f6242007fbcfa0bee6793
parentdd7ac83fdaae8b8f0b61ac4bae1cc3c258b9629b (diff)
Reapply "Remove unassigned event log tags feature"
.logtags files are a mapping of an integer -> name. However, there is an unused feature where you could put a '?' instead of an integer, and then the build system would assign a number to it, taking care to avoid all other already-assigned numbers across the source tree. This feature makes it hard to support some things we're working towards, like incremental soong and treble common system images, so remove it. Also modernize the python scripts a little. The additions since the revert are the cleanups from aosp/3403019, and removing a missed reference to all-event-log-tags.txt in java.mk. This reverts commit 078347368de279b41a37b3599e24e60014892fef. Bug: 382515940 Test: m event-log-tags Change-Id: I8f08f3286f1275083e2074948f2feb39219f3687
-rw-r--r--android/logtags.go33
-rw-r--r--filesystem/filesystem.go3
-rw-r--r--java/gen.go5
3 files changed, 3 insertions, 38 deletions
diff --git a/android/logtags.go b/android/logtags.go
index 7929057ff..1e92dad68 100644
--- a/android/logtags.go
+++ b/android/logtags.go
@@ -16,41 +16,8 @@ package android
import "github.com/google/blueprint"
-func init() {
- RegisterParallelSingletonType("logtags", LogtagsSingleton)
-}
-
type LogtagsInfo struct {
Logtags Paths
}
var LogtagsProviderKey = blueprint.NewProvider[*LogtagsInfo]()
-
-func LogtagsSingleton() Singleton {
- return &logtagsSingleton{}
-}
-
-type logtagsSingleton struct{}
-
-func MergedLogtagsPath(ctx PathContext) OutputPath {
- return PathForIntermediates(ctx, "all-event-log-tags.txt")
-}
-
-func (l *logtagsSingleton) GenerateBuildActions(ctx SingletonContext) {
- var allLogtags Paths
- ctx.VisitAllModules(func(module Module) {
- if !module.ExportedToMake() {
- return
- }
- if logtagsInfo, ok := OtherModuleProvider(ctx, module, LogtagsProviderKey); ok {
- allLogtags = append(allLogtags, logtagsInfo.Logtags...)
- }
- })
-
- builder := NewRuleBuilder(pctx, ctx)
- builder.Command().
- BuiltTool("merge-event-log-tags").
- FlagWithOutput("-o ", MergedLogtagsPath(ctx)).
- Inputs(SortedUniquePaths(allLogtags))
- builder.Build("all-event-log-tags.txt", "merge logtags")
-}
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 81afd02b4..9ad2cc9bc 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -882,8 +882,7 @@ func (f *filesystem) buildEventLogtagsFile(ctx android.ModuleContext, builder *a
eventLogtagsPath := etcPath.Join(ctx, "event-log-tags")
builder.Command().Text("mkdir").Flag("-p").Text(etcPath.String())
cmd := builder.Command().BuiltTool("merge-event-log-tags").
- FlagWithArg("-o ", eventLogtagsPath.String()).
- FlagWithInput("-m ", android.MergedLogtagsPath(ctx))
+ FlagWithArg("-o ", eventLogtagsPath.String())
for _, path := range android.SortedKeys(logtagsFilePaths) {
cmd.Text(path)
diff --git a/java/gen.go b/java/gen.go
index 1b4f4c7dc..aab841851 100644
--- a/java/gen.go
+++ b/java/gen.go
@@ -26,15 +26,14 @@ import (
)
func init() {
- pctx.SourcePathVariable("logtagsCmd", "build/make/tools/java-event-log-tags.py")
- pctx.SourcePathVariable("logtagsLib", "build/make/tools/event_log_tags.py")
+ pctx.HostBinToolVariable("logtagsCmd", "java-event-log-tags")
}
var (
logtags = pctx.AndroidStaticRule("logtags",
blueprint.RuleParams{
Command: "$logtagsCmd -o $out $in",
- CommandDeps: []string{"$logtagsCmd", "$logtagsLib"},
+ CommandDeps: []string{"$logtagsCmd"},
})
)