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

Side by Side Diff: tools/build.py

Issue 11275255: Add -a option to tools/build.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« 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 (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a 4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file. 5 # BSD-style license that can be found in the LICENSE file.
6 # 6 #
7 7
8 import optparse 8 import optparse
9 import os 9 import os
10 import shutil 10 import shutil
11 import subprocess 11 import subprocess
12 import sys 12 import sys
13 import utils 13 import utils
14 14
15 HOST_OS = utils.GuessOS() 15 HOST_OS = utils.GuessOS()
16 HOST_CPUS = utils.GuessCpus() 16 HOST_CPUS = utils.GuessCpus()
17 armcompilerlocation = '/opt/codesourcery/arm-2009q1' 17 armcompilerlocation = '/opt/codesourcery/arm-2009q1'
18 SCRIPT_DIR = os.path.dirname(sys.argv[0]) 18 SCRIPT_DIR = os.path.dirname(sys.argv[0])
19 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) 19 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
20 THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party') 20 THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party')
21 21
22 def BuildOptions(): 22 def BuildOptions():
23 result = optparse.OptionParser() 23 result = optparse.OptionParser()
24 result.add_option("-m", "--mode", 24 result.add_option("-m", "--mode",
25 help='Build variants (comma-separated).', 25 help='Build variants (comma-separated).',
26 metavar='[all,debug,release]', 26 metavar='[all,debug,release]',
27 default='debug') 27 default='debug')
28 result.add_option("-v", "--verbose", 28 result.add_option("-v", "--verbose",
29 help='Verbose output.', 29 help='Verbose output.',
30 default=False, action="store_true") 30 default=False, action="store_true")
31 result.add_option("--arch", 31 result.add_option("-a", "--arch",
32 help='Target architectures (comma-separated).', 32 help='Target architectures (comma-separated).',
33 metavar='[all,ia32,x64,simarm,arm]', 33 metavar='[all,ia32,x64,simarm,arm]',
34 default=utils.GuessArchitecture()) 34 default=utils.GuessArchitecture())
35 result.add_option("--os", 35 result.add_option("--os",
36 help='Target OSs (comma-separated).', 36 help='Target OSs (comma-separated).',
37 metavar='[all,host,android]', 37 metavar='[all,host,android]',
38 default='host') 38 default='host')
39 result.add_option("-j", 39 result.add_option("-j",
40 help='The number of parallel jobs to run.', 40 help='The number of parallel jobs to run.',
41 metavar=HOST_CPUS, 41 metavar=HOST_CPUS,
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 process.wait() 320 process.wait()
321 if process.returncode != 0: 321 if process.returncode != 0:
322 print "BUILD FAILED" 322 print "BUILD FAILED"
323 return 1 323 return 1
324 324
325 return 0 325 return 0
326 326
327 327
328 if __name__ == '__main__': 328 if __name__ == '__main__':
329 sys.exit(Main()) 329 sys.exit(Main())
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