Add notice property to all modules

Add a notice property to all modules which, if set, propagates to
LOCAL_NOTICE_FILE in make.

Test: m -j checkbuild, examine out/soong/Android*.mk
Change-Id: I565a5624dfd7b376b976b1a43dac5cea96869026
This commit is contained in:
Colin Cross 2017-08-31 15:07:09 -07:00
parent 7f9036c89b
commit 5aac362949
3 changed files with 7 additions and 0 deletions

View File

@ -232,6 +232,9 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
if amod.commonProperties.Owner != nil {
fmt.Fprintln(&data.preamble, "LOCAL_MODULE_OWNER :=", *amod.commonProperties.Owner)
}
if amod.commonProperties.Notice != nil {
fmt.Fprintln(&data.preamble, "LOCAL_NOTICE_FILE :=", *amod.commonProperties.Notice)
}
}
if host {

View File

@ -162,6 +162,9 @@ type commonProperties struct {
// names of other modules to install if this module is installed
Required []string `android:"arch_variant"`
// relative path to a file to include in the list of notices for the device
Notice *string
// Set by TargetMutator
CompileTarget Target `blueprint:"mutated"`
CompilePrimary bool `blueprint:"mutated"`

View File

@ -74,6 +74,7 @@ func init() {
"LOCAL_PROTOC_OPTIMIZE_TYPE": "proto.type",
"LOCAL_MODULE_OWNER": "owner",
"LOCAL_RENDERSCRIPT_TARGET_API": "renderscript.target_api",
"LOCAL_NOTICE_FILE": "notice",
})
addStandardProperties(bpparser.ListType,
map[string]string{