From 7baeded82e40352ebfb43b716e0b1dd752e72e7e Mon Sep 17 00:00:00 2001 From: jeffhao Date: Tue, 14 Jun 2011 16:37:22 -0700 Subject: [PATCH] Dx defaults to emitting dexfiles without jumbo opcodes. There's compatibility issues with going back and forth between versions, and it's best to have dx default to a stable point and allow optimizations to be controlled by switches. For jumbo opcodes to be enabled, dx can be given the switch "--target-api=14". Change-Id: I824092c795638ca329325b14c435bc41c1ab56d5 --- dx/src/com/android/dx/command/Main.java | 4 ++-- dx/src/com/android/dx/command/dexer/Main.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dx/src/com/android/dx/command/Main.java b/dx/src/com/android/dx/command/Main.java index 09f543f75..69f986485 100644 --- a/dx/src/com/android/dx/command/Main.java +++ b/dx/src/com/android/dx/command/Main.java @@ -35,8 +35,8 @@ public class Main { "[--dump-width=]\n" + " [--dump-method=[*]] [--verbose-dump] [--no-files] " + "[--core-library]\n" + - " [--num-threads=] [.class | .{zip,jar,apk} | " + - "] ...\n" + + " [--num-threads=] [--target-api=]\n" + + " [.class | .{zip,jar,apk} | ] ...\n" + " Convert a set of classfiles into a dex file, optionally " + "embedded in a\n" + " jar/zip. Output name must end with one of: .dex .jar " + diff --git a/dx/src/com/android/dx/command/dexer/Main.java b/dx/src/com/android/dx/command/dexer/Main.java index ae0778746..ac1c5f0d8 100644 --- a/dx/src/com/android/dx/command/dexer/Main.java +++ b/dx/src/com/android/dx/command/dexer/Main.java @@ -919,7 +919,7 @@ public class Main { public boolean keepClassesInJar = false; /** what API level to target */ - public int targetApiLevel = DexFormat.API_CURRENT; + public int targetApiLevel = DexFormat.API_NO_EXTENDED_OPCODES; /** how much source position info to preserve */ public int positionInfo = PositionList.LINES; -- 2.11.0