From f5c548db17548dde7a38dbfbf97c21fd3a4d1a55 Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Wed, 16 Nov 2022 14:52:41 +0000 Subject: [PATCH] Do not assume that boot image profile exists when building ART apex. If the apex is built without boot images, profile may not exist. Test: treehugger Change-Id: I0824100d0ac38f4b7b71b302b401a0c66c3ff3cf --- apex/apex.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apex/apex.go b/apex/apex.go index ff0f50475..db884a19b 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -2508,7 +2508,8 @@ func apexBootclasspathFragmentFiles(ctx android.ModuleContext, module blueprint. filesToAdd = append(filesToAdd, *af) } - if pathInApex := bootclasspathFragmentInfo.ProfileInstallPathInApex(); pathInApex != "" { + pathInApex := bootclasspathFragmentInfo.ProfileInstallPathInApex() + if pathInApex != "" && !java.SkipDexpreoptBootJars(ctx) { pathOnHost := bootclasspathFragmentInfo.ProfilePathOnHost() tempPath := android.PathForModuleOut(ctx, "boot_image_profile", pathInApex)