summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jared Duke <jdduke@google.com> 2024-07-23 22:10:26 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-07-23 22:10:26 +0000
commit8f1340eb8ae0bb7e8b07fbc27eb7624592a8a027 (patch)
tree2dd612aa0a41538487102f22d3e980df5d271ed8
parentb137e55a39faf07892216e3227d167fbd62cf86d (diff)
parent9c17ad6ec322f0c3daec78742f6d53d5a55ed6bf (diff)
Merge "Support symbolized odex preopt output" into main
-rw-r--r--dexpreopt/dexpreopt.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go
index b69a76fc2..56164834a 100644
--- a/dexpreopt/dexpreopt.go
+++ b/dexpreopt/dexpreopt.go
@@ -244,6 +244,7 @@ func dexpreoptCommand(ctx android.BuilderContext, globalSoong *GlobalSoongConfig
}
odexPath := module.BuildPath.InSameDir(ctx, "oat", arch.String(), pathtools.ReplaceExtension(base, "odex"))
+ odexSymbolsPath := odexPath.ReplaceExtension(ctx, "symbols.odex")
odexInstallPath := ToOdexPath(module.DexLocation, arch)
if odexOnSystemOther(module, global) {
odexInstallPath = filepath.Join(SystemOtherPartition, odexInstallPath)
@@ -258,7 +259,8 @@ func dexpreoptCommand(ctx android.BuilderContext, globalSoong *GlobalSoongConfig
systemServerClasspathJars := global.AllSystemServerClasspathJars(ctx)
rule.Command().FlagWithArg("mkdir -p ", filepath.Dir(odexPath.String()))
- rule.Command().FlagWithOutput("rm -f ", odexPath)
+ rule.Command().FlagWithOutput("rm -f ", odexPath).
+ FlagWithArg("rm -f ", odexSymbolsPath.String())
if jarIndex := systemServerJars.IndexOfJar(module.Name); jarIndex >= 0 {
// System server jars should be dexpreopted together: class loader context of each jar
@@ -386,7 +388,9 @@ func dexpreoptCommand(ctx android.BuilderContext, globalSoong *GlobalSoongConfig
FlagWithArg("--instruction-set=", arch.String()).
FlagWithArg("--instruction-set-variant=", global.CpuVariant[arch]).
FlagWithArg("--instruction-set-features=", global.InstructionSetFeatures[arch]).
- Flag("--no-generate-debug-info").
+ FlagWithOutput("--oat-symbols=", odexSymbolsPath).
+ Flag("--generate-debug-info").
+ Flag("--strip").
Flag("--generate-build-id").
Flag("--abort-on-hard-verifier-error").
Flag("--force-determinism").