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

Side by Side Diff: tools/clean_output_directory.py

Issue 10908069: Fix dart-editor clobber by always clobbering all architectures if no argument is given. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months 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) 2012, 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 shutil 9 import shutil
10 import sys 10 import sys
11 import utils 11 import utils
12 12
13 HOST_OS = utils.GuessOS() 13 HOST_OS = utils.GuessOS()
14 14
15 def BuildOptions(): 15 def BuildOptions():
16 result = optparse.OptionParser() 16 result = optparse.OptionParser()
17 result.add_option("-m", "--mode", 17 result.add_option("-m", "--mode",
18 help='Build variants (comma-separated).', 18 help='Build variants (comma-separated).',
19 metavar='[all,debug,release]', 19 metavar='[all,debug,release]',
20 default='all') 20 default='all')
21 result.add_option("--arch", 21 result.add_option("--arch",
22 help='Target architectures (comma-separated).', 22 help='Target architectures (comma-separated).',
23 metavar='[all,ia32,x64,simarm,arm]', 23 metavar='[all,ia32,x64,simarm,arm]',
24 default=utils.GuessArchitecture()) 24 default='all')
25 result.add_option("--os", 25 result.add_option("--os",
26 help='Target OSs (comma-separated).', 26 help='Target OSs (comma-separated).',
27 metavar='[all,host,android]', 27 metavar='[all,host,android]',
28 default='all') 28 default='all')
29 return result 29 return result
30 30
31 31
32 def ProcessOsOption(os): 32 def ProcessOsOption(os):
33 if os == 'host': 33 if os == 'host':
34 return HOST_OS 34 return HOST_OS
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 shutil.rmtree(build_root, ignore_errors=True) 77 shutil.rmtree(build_root, ignore_errors=True)
78 # On windows we have additional object files within the runtime library. 78 # On windows we have additional object files within the runtime library.
79 if HOST_OS == 'win32': 79 if HOST_OS == 'win32':
80 runtime_root = 'runtime/' + build_root 80 runtime_root = 'runtime/' + build_root
81 print "Deleting %s" % (runtime_root) 81 print "Deleting %s" % (runtime_root)
82 shutil.rmtree(runtime_root, ignore_errors=True) 82 shutil.rmtree(runtime_root, ignore_errors=True)
83 return 0 83 return 0
84 84
85 if __name__ == '__main__': 85 if __name__ == '__main__':
86 sys.exit(Main()) 86 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