From 163664a5483bcc12db89654ab3650dae00831c5e Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Fri, 6 Dec 2019 13:42:21 +0000 Subject: [PATCH] Pass correct --image argument to oatdump. This was broken after CL: Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826 ..which split boot image into primary and extension. The argument to oatdump was not updated properly. The old form before the split was: --image=out/soong/generic_x86/dex_bootjars/system/framework/boot.art The new form after the split is: --image=out/soong/generic_x86/dex_artjars/apex/com.android.art/javalib/boot.art:out/soong/generic_x86/dex_bootjars/system/framework/boot-framework.art Test: lunch aosp_x86-userdebug && m dump-oat Test: Manually inspect build command to make sure correct image location is used: $ fgrep -e 'oatdump' $ANDROID_BUILD_TOP/out/soong/build.ninja | egrep -e '--image[^ ]*' -o --image=out/soong/generic_x86/dex_artjars/apex/com.android.art/javalib/boot.art:out/soong/generic_x86/dex_bootjars/system/framework/boot-framework.art Change-Id: I54a5146c404aefb6eaeadbe3e9363db935ecad86 --- java/dexpreopt_bootjars.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 280ce8c5e..88e3bc2b3 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -547,7 +547,7 @@ func dumpOatRules(ctx android.SingletonContext, image *bootImage) { BuiltTool(ctx, "oatdumpd"). FlagWithInputList("--runtime-arg -Xbootclasspath:", image.dexPathsDeps.Paths(), ":"). FlagWithList("--runtime-arg -Xbootclasspath-locations:", image.dexLocationsDeps, ":"). - FlagWithArg("--image=", dexpreopt.PathToLocation(image.images[arch], arch)).Implicit(image.images[arch]). + FlagWithArg("--image=", strings.Join(image.imageLocations, ":")).Implicits(image.imagesDeps[arch].Paths()). FlagWithOutput("--output=", output). FlagWithArg("--instruction-set=", arch.String()) rule.Build(pctx, ctx, "dump-oat-boot-"+arch.String(), "dump oat boot "+arch.String())