Index: build/android/gyp/dex.py |
diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py |
index 86f3878f7f0d4b456906d32745916b807918f415..d974543eaacb89263253d0e8ecd7a74b80e9e3ed 100755 |
--- a/build/android/gyp/dex.py |
+++ b/build/android/gyp/dex.py |
@@ -15,7 +15,10 @@ from util import md5_check |
def DoDex(options, paths): |
dx_binary = os.path.join(options.android_sdk_root, 'platform-tools', 'dx') |
- dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] + paths |
+ dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] |
+ if options.no_locals: |
+ dex_cmd.append('--no-locals') |
+ dex_cmd += paths |
record_path = '%s.md5.stamp' % options.dex_path |
md5_check.CallAndRecordIfStale( |
@@ -32,11 +35,14 @@ def main(argv): |
parser.add_option('--android-sdk-root', help='Android sdk root directory.') |
parser.add_option('--dex-path', help='Dex output path.') |
parser.add_option('--configuration-name', |
- help='The build CONFIGURATION_NAME.') |
+ help='The build CONFIGURATION_NAME.') |
parser.add_option('--proguard-enabled', |
- help='"true" if proguard is enabled.') |
+ help='"true" if proguard is enabled.') |
parser.add_option('--proguard-enabled-input-path', |
- help='Path to dex in Release mode when proguard is enabled.') |
+ help=('Path to dex in Release mode when proguard ' |
+ 'is enabled.')) |
+ parser.add_option('--no-locals', |
+ help='Exclude locals list from the dex file.') |
parser.add_option('--stamp', help='Path to touch on success.') |
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja. |