| Index: build/android/gyp/dex.py
|
| diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py
|
| index c1e5869d13e5f23bc26bef3ef86b44dd53e3856d..f90de9529083ffa064767b2630c653f69c8cc557 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,11 @@ 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.
|
| - 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 +36,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 +51,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 +63,3 @@ def main(argv):
|
|
|
| if __name__ == '__main__':
|
| sys.exit(main(sys.argv))
|
| -
|
|
|