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
This commit is contained in:
Ulya Trafimovich 2019-12-06 13:42:21 +00:00
parent cea93afe76
commit 163664a548
1 changed files with 1 additions and 1 deletions

View File

@ -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())