From b79c7f1101f7a1e2c4aa7b9f866f6710e546c35c Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Wed, 17 Mar 2021 00:26:25 +0000 Subject: [PATCH] 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 --- java/boot_image.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/boot_image.go b/java/boot_image.go index 12e287459..25a4f17f4 100644 --- a/java/boot_image.go +++ b/java/boot_image.go @@ -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 }