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 fnmatch | 7 import fnmatch |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import sys | 10 import sys |
11 | 11 |
12 from util import build_utils | 12 from util import build_utils |
13 from util import md5_check | 13 from util import md5_check |
14 | 14 |
15 | 15 |
16 def DoDex(options, paths): | 16 def DoDex(options, paths): |
17 dx_binary = os.path.join(options.android_sdk_tools, 'dx') | 17 dx_binary = os.path.join(options.android_sdk_tools, 'dx') |
18 dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] + paths | 18 |
| 19 # See http://crbug.com/272064 for context on --force-jumbo. |
| 20 dex_cmd = [dx_binary, '--dex', '--force-jumbo', '--output', |
| 21 options.dex_path] + paths |
19 | 22 |
20 record_path = '%s.md5.stamp' % options.dex_path | 23 record_path = '%s.md5.stamp' % options.dex_path |
21 md5_check.CallAndRecordIfStale( | 24 md5_check.CallAndRecordIfStale( |
22 lambda: build_utils.CheckCallDie(dex_cmd, suppress_output=True), | 25 lambda: build_utils.CheckCallDie(dex_cmd, suppress_output=True), |
23 record_path=record_path, | 26 record_path=record_path, |
24 input_paths=paths, | 27 input_paths=paths, |
25 input_strings=dex_cmd) | 28 input_strings=dex_cmd) |
26 | 29 |
27 build_utils.Touch(options.dex_path) | 30 build_utils.Touch(options.dex_path) |
28 | 31 |
(...skipping 22 matching lines...) Expand all Loading... |
51 | 54 |
52 DoDex(options, paths) | 55 DoDex(options, paths) |
53 | 56 |
54 if options.stamp: | 57 if options.stamp: |
55 build_utils.Touch(options.stamp) | 58 build_utils.Touch(options.stamp) |
56 | 59 |
57 | 60 |
58 if __name__ == '__main__': | 61 if __name__ == '__main__': |
59 sys.exit(main(sys.argv)) | 62 sys.exit(main(sys.argv)) |
60 | 63 |
OLD | NEW |