From 998306e525467a9545fc1a7b6e8d4f29a7f199c4 Mon Sep 17 00:00:00 2001 From: Chris Wolfe Date: Mon, 15 Aug 2016 14:47:23 -0400 Subject: [PATCH] Support required property This adds LOCAL_REQUIRED_MODULES to the generated Android.mk for any dependencies in the "required" list of a module. Change-Id: Ibcfe89dce7d247eb441af94e37388a59e71a75a9 --- android/androidmk.go | 4 ++++ android/module.go | 3 +++ cc/cc.go | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/android/androidmk.go b/android/androidmk.go index 1e261a049..0afa1bd9d 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -200,6 +200,10 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b fmt.Fprintln(w, "LOCAL_MULTILIB :=", amod.commonProperties.Compile_multilib) fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", data.OutputFile.String()) + if len(amod.commonProperties.Required) > 0 { + fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(amod.commonProperties.Required, " ")) + } + archStr := amod.Arch().ArchType.String() host := false switch amod.Os().Class { diff --git a/android/module.go b/android/module.go index f1af53a53..bf9dfaac9 100644 --- a/android/module.go +++ b/android/module.go @@ -120,6 +120,9 @@ type commonProperties struct { // init.rc files to be installed if this module is installed Init_rc []string + // names of other modules to install if this module is installed + Required []string + // Set by TargetMutator CompileTarget Target `blueprint:"mutated"` diff --git a/cc/cc.go b/cc/cc.go index 752046f2c..7984449a9 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -124,7 +124,6 @@ type BaseProperties struct { type UnusedProperties struct { Native_coverage *bool - Required []string Tags []string }