OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Windows can't run .sh files, so this is a Python implementation of | 6 """Windows can't run .sh files, so this is a Python implementation of |
7 update.sh. This script should replace update.sh on all platforms eventually.""" | 7 update.sh. This script should replace update.sh on all platforms eventually.""" |
8 | 8 |
9 import argparse | 9 import argparse |
10 import os | 10 import os |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 if not re.search(r'\b(clang|asan)=1', os.environ.get('GYP_DEFINES', '')): | 307 if not re.search(r'\b(clang|asan)=1', os.environ.get('GYP_DEFINES', '')): |
308 print 'Skipping Clang update (clang=1 was not set in GYP_DEFINES).' | 308 print 'Skipping Clang update (clang=1 was not set in GYP_DEFINES).' |
309 return 0 | 309 return 0 |
310 | 310 |
311 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 311 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
312 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 312 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
313 return 0 | 313 return 0 |
314 | 314 |
315 parser = argparse.ArgumentParser(description='Build Clang.') | 315 parser = argparse.ArgumentParser(description='Build Clang.') |
316 parser.add_argument('--no-clobber', dest='clobber', action='store_false') | 316 parser.add_argument('--no-clobber', dest='clobber', action='store_false') |
317 parser.add_argument('--tools', nargs='*') | 317 parser.add_argument('--tools', nargs='*', default=['plugins']) |
318 # For now, this flag is only used for the non-Windows flow, but argparser gets | 318 # For now, this flag is only used for the non-Windows flow, but argparser gets |
319 # mad if it sees a flag it doesn't recognize. | 319 # mad if it sees a flag it doesn't recognize. |
320 parser.add_argument('--if-needed', action='store_true') | 320 parser.add_argument('--if-needed', action='store_true') |
321 return UpdateClang(parser.parse_args()) | 321 return UpdateClang(parser.parse_args()) |
322 | 322 |
323 | 323 |
324 if __name__ == '__main__': | 324 if __name__ == '__main__': |
325 sys.exit(main()) | 325 sys.exit(main()) |
OLD | NEW |