Use per-app package list to avoid unnecessary dexpreopt.
Starting from aosp/2594905, dexpreopt depends on `$PRODUCT_OUT/product_packages.txt`. When PRODUCT_PACKAGES changes, dexpreopt has to rerun for all apps. This is not ideal. After this change, dexpreopt uses a per-app product_packages.txt that is filtered by the app's dependencies, and it uses `rsync --checksum` to prevent the file's mtime from being changed if the contents don't change. This avoids unnecessary dexpreopt reruns. Bug: 288218403 Test: m Test: Change PRODUCT_PACKAGES and see no dexpreopt reruns. Change-Id: I5788a9ee987dfd0abfd7d91cbcef748452290004
This commit is contained in:
@@ -353,7 +353,7 @@ func dexpreoptCommand(ctx android.BuilderContext, globalSoong *GlobalSoongConfig
|
||||
}
|
||||
|
||||
// Generate command that saves host and target class loader context in shell variables.
|
||||
paths := ComputeClassLoaderContextDependencies(module.ClassLoaderContexts)
|
||||
_, paths := ComputeClassLoaderContextDependencies(module.ClassLoaderContexts)
|
||||
rule.Command().
|
||||
Text(`eval "$(`).Tool(globalSoong.ConstructContext).
|
||||
Text(` --target-sdk-version ${target_sdk_version}`).
|
||||
|
Reference in New Issue
Block a user