From 27c39f1adeaf1a653fb41a5af64ee815b8048dd6 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 27 Apr 2015 18:28:18 +0000 Subject: am b6d14a00: resolved conflicts for merge of c29791d5 to mnc-dev-plus-aosp * commit 'b6d14a009e43a4d61ae2a4f98f6e3b914148d0a9': Frameworks/base: Add debug.gencfi property (cherry picked from commit a5b55a017a984608eacdf414bc1cbcd7615f1c13) --- core/jni/AndroidRuntime.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/jni') diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index 88f0697..7c2b28d 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -875,6 +875,19 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv) parseRuntimeOption("dalvik.vm.zygote.max-boot-retry", cachePruneBuf, "-Xzygote-max-boot-retry="); + /* + * When running with debug.gencfi, add --include-cfi to the compiler options so that the boot + * image, if it is compiled on device, will include CFI info, as well as other compilations + * started by the runtime. + */ + property_get("debug.gencfi", propBuf, ""); + if (strcmp(propBuf, "true") == 0) { + addOption("-Xcompiler-option"); + addOption("--include-cfi"); + addOption("-Ximage-compiler-option"); + addOption("--include-cfi"); + } + initArgs.version = JNI_VERSION_1_4; initArgs.options = mOptions.editArray(); initArgs.nOptions = mOptions.size(); -- cgit v1.1