From 1ad8a13e4754ece770f577c0bc3faf0c315ad66d Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 28 Jun 2023 21:34:44 +0100 Subject: [PATCH] Don't strip oat files on host. We need the debugging info for perf. Test: m Change-Id: Iceaa72d8b1c7d27ea113ca72c8af1174ce6f05ba --- java/dexpreopt_bootjars.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 35f60979f..2b0f57e82 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -789,7 +789,6 @@ func buildBootImageVariant(ctx android.ModuleContext, image *bootImageVariant, p Flag("--generate-build-id"). Flag("--image-format=lz4hc"). FlagWithArg("--oat-symbols=", symbolsFile.String()). - Flag("--strip"). FlagWithArg("--oat-file=", outputPath.String()). FlagWithArg("--oat-location=", oatLocation). FlagWithArg("--image=", imagePath.String()). @@ -799,6 +798,11 @@ func buildBootImageVariant(ctx android.ModuleContext, image *bootImageVariant, p Flag("--force-determinism"). Flag("--abort-on-hard-verifier-error") + // We don't strip on host to make perf tools work. + if image.target.Os == android.Android { + cmd.Flag("--strip") + } + // If the image is profile-guided but the profile is disabled, we omit "--compiler-filter" to // leave the decision to dex2oat to pick the compiler filter. if !(image.isProfileGuided() && global.DisableGenerateProfile) {