Run InitAndroidArchModule last in factory functions.

It calls InitAndroidModule which retrieves the properties, so all
AddProperties must go before it.

Test: `m nothing` with new ART prebuilt drop that has a
  prebuilt_boot_image module.
Bug: 177892522
Change-Id: Ia09db9ef17148d36d8d4f25df3f1bf4f528a2fc8
This commit is contained in:
Martin Stjernholm 2021-03-17 00:26:25 +00:00
parent 05f72de083
commit b79c7f1101
1 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@ import (
"android/soong/android"
"android/soong/dexpreopt"
"github.com/google/blueprint"
)
@ -56,9 +57,9 @@ type BootImageModule struct {
func bootImageFactory() android.Module {
m := &BootImageModule{}
m.AddProperties(&m.properties)
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
android.InitApexModule(m)
android.InitSdkAwareModule(m)
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
return m
}
@ -210,11 +211,11 @@ func (module *prebuiltBootImageModule) Name() string {
func prebuiltBootImageFactory() android.Module {
m := &prebuiltBootImageModule{}
m.AddProperties(&m.properties)
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
// This doesn't actually have any prebuilt files of its own so pass a placeholder for the srcs
// array.
android.InitPrebuiltModule(m, &[]string{"placeholder"})
android.InitApexModule(m)
android.InitSdkAwareModule(m)
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
return m
}