diff options
author | Benoit Lamarche <benoitlamarche@google.com> | 2015-07-20 15:48:45 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-20 15:48:46 +0000 |
commit | 000a2f91edbe638090dc577801ba49592229fd8b (patch) | |
tree | 3d365029bc2421d030679f68bb4c522b8d0920fe /jack/src | |
parent | 50f041d5328a9bb084a7a3b637a5162f1220ed45 (diff) | |
parent | 4f813952709a38ad4bb22323d84b9ed887a6e36f (diff) | |
download | toolchain_jack-000a2f91edbe638090dc577801ba49592229fd8b.tar.gz toolchain_jack-000a2f91edbe638090dc577801ba49592229fd8b.tar.bz2 toolchain_jack-000a2f91edbe638090dc577801ba49592229fd8b.zip |
Merge "When obfuscating, drop local var debug info" into ub-jack-brest
Diffstat (limited to 'jack/src')
-rw-r--r-- | jack/src/com/android/jack/Options.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/jack/src/com/android/jack/Options.java b/jack/src/com/android/jack/Options.java index dc713f45..f1e595a1 100644 --- a/jack/src/com/android/jack/Options.java +++ b/jack/src/com/android/jack/Options.java @@ -681,6 +681,10 @@ public class Options { configBuilder.setString(SOURCES, Joiner.on(File.pathSeparator).join(inputSources)); } + if (emitLocalDebugInfo != null) { + configBuilder.set(EMIT_LOCAL_DEBUG_INFO, emitLocalDebugInfo); + } + configBuilder.pushDefaultLocation(new StringLocation("proguard flags")); if (flags != null) { @@ -693,8 +697,12 @@ public class Options { flags.keepAttribute("RuntimeVisibleParameterAnnotations")); configBuilder.set(ParameterAnnotationRemover.EMIT_RUNTIME_INVISIBLE_PARAMETER_ANNOTATION, flags.keepAttribute("RuntimeInvisibleParameterAnnotations")); - configBuilder.set(EMIT_LINE_NUMBER_DEBUG_INFO, - flags.keepAttribute("LineNumberTable")); + + if (flags.obfuscate()) { // do not override debug info config when shrinking + configBuilder.set(EMIT_LINE_NUMBER_DEBUG_INFO, flags.keepAttribute("LineNumberTable")); + configBuilder.set(EMIT_LOCAL_DEBUG_INFO, flags.keepAttribute("LocalVariableTable")); + } + configBuilder.set(Options.FLAGS, flags); configBuilder.set( Options.USE_MIXED_CASE_CLASSNAME, flags.getUseMixedCaseClassName()); @@ -782,9 +790,6 @@ public class Options { configBuilder.popDefaultLocation(); - if (emitLocalDebugInfo != null) { - configBuilder.set(EMIT_LOCAL_DEBUG_INFO, emitLocalDebugInfo); - } if (importedLibraries != null) { configBuilder.setString(IMPORTED_LIBRARIES, Joiner.on(',').join(importedLibraries)); } |