diff options
author | 2021-04-27 23:56:44 +0900 | |
---|---|---|
committer | 2021-05-15 00:29:49 +0900 | |
commit | 4dda75e73e3e52e11b1cd37af33645fcfe5ed980 (patch) | |
tree | 930a34f728c5073e2bfaaad369d384b2fec466ba /java/dexpreopt.go | |
parent | 015a0afe07cd5ed38ec72af5ae6059c247e5f841 (diff) |
Add usesTargetFiles option in dexpreopt_gen
For running dex2oat on the target_files, the paths should be use the
device install path instead of the path starting with $(OUT).
So add usesTargetFiles option and basePath option which indicates
extracted path. With those options, the path is replaced with
$(basePath)/$(device path)
And also, add DexPreoptImageDeviceLocations in the config which refers
to the boot image path(without arch) on the device. Because
DexPreoptImage related device path was missing.
Bug: 158843648
Test: dexpreopt_gen -usesTargetFiles -basePath (extract path) and then
check if paths in the generated shell script are based on on-device
path.
Change-Id: I9667fadbf3b7c6f770e0d1bcbee5d67c1ecd8a3d
Diffstat (limited to 'java/dexpreopt.go')
-rw-r--r-- | java/dexpreopt.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/dexpreopt.go b/java/dexpreopt.go index 8d23ad6bd..2e46d74fa 100644 --- a/java/dexpreopt.go +++ b/java/dexpreopt.go @@ -184,7 +184,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr imagesDeps = append(imagesDeps, variant.imagesDeps) } // The image locations for all Android variants are identical. - hostImageLocations := bootImage.getAnyAndroidVariant().imageLocations() + hostImageLocations, deviceImageLocations := bootImage.getAnyAndroidVariant().imageLocations() var profileClassListing android.OptionalPath var profileBootListing android.OptionalPath @@ -224,9 +224,10 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr ProvidesUsesLibrary: providesUsesLib, ClassLoaderContexts: d.classLoaderContexts, - Archs: archs, - DexPreoptImagesDeps: imagesDeps, - DexPreoptImageLocationsOnHost: hostImageLocations, + Archs: archs, + DexPreoptImagesDeps: imagesDeps, + DexPreoptImageLocationsOnHost: hostImageLocations, + DexPreoptImageLocationsOnDevice: deviceImageLocations, PreoptBootClassPathDexFiles: dexFiles.Paths(), PreoptBootClassPathDexLocations: dexLocations, |