OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import json | 7 import json |
8 import logging | 8 import logging |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 exclude_paths = options.excluded_paths | 204 exclude_paths = options.excluded_paths |
205 paths = [p for p in paths if not | 205 paths = [p for p in paths if not |
206 os.path.relpath(p, options.output_directory) in exclude_paths] | 206 os.path.relpath(p, options.output_directory) in exclude_paths] |
207 | 207 |
208 input_paths = list(paths) | 208 input_paths = list(paths) |
209 | 209 |
210 dx_binary = os.path.join(options.android_sdk_tools, 'dx') | 210 dx_binary = os.path.join(options.android_sdk_tools, 'dx') |
211 # See http://crbug.com/272064 for context on --force-jumbo. | 211 # See http://crbug.com/272064 for context on --force-jumbo. |
212 # See https://github.com/android/platform_dalvik/commit/dd140a22d for | 212 # See https://github.com/android/platform_dalvik/commit/dd140a22d for |
213 # --num-threads. | 213 # --num-threads. |
214 dex_cmd = [dx_binary, '--num-threads=8', '--dex', '--force-jumbo', | 214 # See http://crbug.com/658782 for why -JXmx2G was added. |
215 dex_cmd = [dx_binary, '-JXmx2G', '--num-threads=8', '--dex', '--force-jumbo', | |
jbudorick
2016/10/24 20:46:06
JX?
agrieve
2016/10/24 20:47:34
Yeah, it's because "dx" is a bash script that wrap
jbudorick
2016/10/24 20:48:35
sgtm
| |
215 '--output', options.dex_path] | 216 '--output', options.dex_path] |
216 if options.no_locals != '0': | 217 if options.no_locals != '0': |
217 dex_cmd.append('--no-locals') | 218 dex_cmd.append('--no-locals') |
218 | 219 |
219 if options.multi_dex: | 220 if options.multi_dex: |
220 input_paths.append(options.main_dex_list_path) | 221 input_paths.append(options.main_dex_list_path) |
221 dex_cmd += [ | 222 dex_cmd += [ |
222 '--multi-dex', | 223 '--multi-dex', |
223 '--minimal-main-dex', | 224 '--minimal-main-dex', |
224 ] | 225 ] |
(...skipping 12 matching lines...) Expand all Loading... | |
237 options, | 238 options, |
238 input_paths=input_paths, | 239 input_paths=input_paths, |
239 input_strings=dex_cmd, | 240 input_strings=dex_cmd, |
240 output_paths=output_paths, | 241 output_paths=output_paths, |
241 force=force, | 242 force=force, |
242 pass_changes=True) | 243 pass_changes=True) |
243 | 244 |
244 | 245 |
245 if __name__ == '__main__': | 246 if __name__ == '__main__': |
246 sys.exit(main(sys.argv[1:])) | 247 sys.exit(main(sys.argv[1:])) |
OLD | NEW |