Don't generate Android.mk data if the module is disabled

am: cc4f3e3f94

Change-Id: Ib357a63acc1c92b6c227b946be73f139c195531d
This commit is contained in:
Colin Cross 2016-11-30 05:14:24 +00:00 committed by android-build-merger
commit 9b834e541e

View file

@ -150,10 +150,6 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
name := provider.BaseModuleName() name := provider.BaseModuleName()
amod := mod.(Module).base() amod := mod.(Module).base()
data, err := provider.AndroidMk()
if err != nil {
return err
}
if !amod.Enabled() { if !amod.Enabled() {
return nil return nil
@ -163,6 +159,11 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
return nil return nil
} }
data, err := provider.AndroidMk()
if err != nil {
return err
}
if data.SubName != "" { if data.SubName != "" {
name += data.SubName name += data.SubName
} }