From 0fda89f4a80223d0adb01e0f44a0575c83956ea0 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 1 Jun 2016 15:25:32 -0700 Subject: [PATCH] Add support for logtags This lets modules declare logtags files, which will then be exported to make using LOCAL_LOGTAGS_FILES. Make still generates event-log-tags and the java code. Bug: 28989759 Change-Id: Ie6be79d3ef8a17a74d42eba681a25a08b4c0e7ae --- android/androidmk.go | 5 +++++ android/module.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/android/androidmk.go b/android/androidmk.go index c8dce0f85..603b37de7 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -22,6 +22,7 @@ import ( "os" "path/filepath" "sort" + "strings" "android/soong" @@ -200,6 +201,10 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true") } else { fmt.Fprintln(w, "LOCAL_MODULE_TARGET_ARCH :=", archStr) + + if len(amod.commonProperties.Logtags) > 0 { + fmt.Fprintln(w, "LOCAL_LOGTAGS_FILES := ", strings.Join(amod.commonProperties.Logtags, " ")) + } } for _, extra := range data.Extra { diff --git a/android/module.go b/android/module.go index 08abf78a9..18555234a 100644 --- a/android/module.go +++ b/android/module.go @@ -111,6 +111,10 @@ type commonProperties struct { // whether this is a proprietary vendor module, and should be installed into /vendor Proprietary bool + // *.logtags files, to combine together in order to generate the /system/etc/event-log-tags + // file + Logtags []string + // Set by HostOrDeviceMutator CompileHostOrDevice HostOrDevice `blueprint:"mutated"`