From 094ff2c0c1f736521c634d5f606e274cb6c55345 Mon Sep 17 00:00:00 2001 From: Sebastien Hertz Date: Wed, 13 May 2015 12:14:05 +0200 Subject: Fix debuggable compiler flag detection for secondary dex files Compiles secondary dex files like the primary dex file: if it has been compiled with the --debuggable flag, compile secondary dex files with the --debuggable flag too. Therefore, dex files loaded at runtime are compiled the same way as dex files compiled at install time on the classpath (excluding the boot image that is not compiled debuggable). Also adds debuggable key in the oat header and bump the oat version. Bug: 20944228 (cherry picked from commit 0de1133ba600f299b3d67938f650720d9f859eb2) Change-Id: If6b2236e7fe547cc421f57b573043748018d3ae0 --- dex2oat/dex2oat.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dex2oat') diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index b4a45c6..3cf458a 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -979,7 +979,10 @@ class Dex2Oat FINAL { oss.str(""); // Reset. oss << kRuntimeISA; key_value_store_->Put(OatHeader::kDex2OatHostKey, oss.str()); - key_value_store_->Put(OatHeader::kPicKey, compile_pic ? "true" : "false"); + key_value_store_->Put(OatHeader::kPicKey, + compile_pic ? OatHeader::kTrueValue : OatHeader::kFalseValue); + key_value_store_->Put(OatHeader::kDebuggableKey, + debuggable ? OatHeader::kTrueValue : OatHeader::kFalseValue); } } -- cgit v1.1