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

Move the calls to the AndroidMkProvider to after checking if the
module is disabled.  Disabled modules may not have all the state
necessary to generate the data.

Test: m -j libLLVM
Change-Id: Iab27a26e604f3810bcc2d9f61b1839aa7bc428b4
This commit is contained in:
Colin Cross 2016-11-23 15:41:09 -08:00
parent d2ede879b5
commit cc4f3e3f94
1 changed files with 5 additions and 4 deletions

View File

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