Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: build/android/gyp/dex.py

Issue 2445883002: Raise dx's max java heap 1gb->2gb (-Xmx) (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698