Chromium Code Reviews| Index: build/android/gyp/dex.py |
| diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py |
| index c1e5869d13e5f23bc26bef3ef86b44dd53e3856d..7e986be04316266cc710f5d97440e390c2d44df0 100755 |
| --- a/build/android/gyp/dex.py |
| +++ b/build/android/gyp/dex.py |
| @@ -4,7 +4,6 @@ |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| -import fnmatch |
| import optparse |
| import os |
| import sys |
| @@ -15,10 +14,10 @@ from util import md5_check |
| def DoDex(options, paths): |
| dx_binary = os.path.join(options.android_sdk_tools, 'dx') |
| - |
| - # See http://crbug.com/272064 for context on --force-jumbo. |
|
cjhopman
2013/08/20 15:27:24
Nit: keep this comment
gkanwar1
2013/08/20 17:30:14
Oops, must have lost that during a rebase. Fixed.
|
| - dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', |
| - options.dex_path] + paths |
| + dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', options.dex_path] |
| + if options.no_locals != '0': |
| + dex_cmd.append('--no-locals') |
| + dex_cmd += paths |
| record_path = '%s.md5.stamp' % options.dex_path |
| md5_check.CallAndRecordIfStale( |
| @@ -36,11 +35,14 @@ def main(argv): |
| help='Android sdk build tools 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. |
| @@ -48,8 +50,8 @@ def main(argv): |
| options, paths = parser.parse_args() |
| - if (options.proguard_enabled == "true" |
| - and options.configuration_name == "Release"): |
| + if (options.proguard_enabled == 'true' |
| + and options.configuration_name == 'Release'): |
| paths = [options.proguard_enabled_input_path] |
| DoDex(options, paths) |
| @@ -60,4 +62,3 @@ def main(argv): |
| if __name__ == '__main__': |
| sys.exit(main(sys.argv)) |
| - |