Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5de41960 authored by Alex Light's avatar Alex Light
Browse files

Save invocation info of dex2oat runs.

It is useful to have the exact dex2oat invocation used to generate
artifacts for some tests. This adds the --write-invocation-to= flag to
the build to save this information.

Test: m droid
Bug: 119332327
Change-Id: Id7664cf6d05bbb1c580f94584cdeb96084d5799c
parent 186c771c
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -201,6 +201,8 @@ func dexpreoptCommand(global GlobalConfig, module ModuleConfig, rule *Rule, prof
	vdexPath := pathtools.ReplaceExtension(odexPath, "vdex")
	vdexInstallPath := pathtools.ReplaceExtension(odexInstallPath, "vdex")

	invocationPath := pathtools.ReplaceExtension(odexPath, "invocation")

	// bootImageLocation is $OUT/dex_bootjars/system/framework/boot.art, but dex2oat actually reads
	// $OUT/dex_bootjars/system/framework/arm64/boot.art
	var bootImagePath string
@@ -305,6 +307,7 @@ func dexpreoptCommand(global GlobalConfig, module ModuleConfig, rule *Rule, prof
		Text(`ANDROID_LOG_TAGS="*:e"`).
		Tool(global.Tools.Dex2oat).
		Flag("--avoid-storing-invocation").
		FlagWithOutput("--write-invocation-to=", invocationPath).ImplicitOutput(invocationPath).
		Flag("--runtime-arg").FlagWithArg("-Xms", global.Dex2oatXms).
		Flag("--runtime-arg").FlagWithArg("-Xmx", global.Dex2oatXmx).
		Flag("${class_loader_context_arg}").