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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if not re.search(r'\b(clang|asan)=1', os.environ.get('GYP_DEFINES', '')): | 306 if not re.search(r'\b(clang|asan)=1', os.environ.get('GYP_DEFINES', '')): |
307 print 'Skipping Clang update (clang=1 was not set in GYP_DEFINES).' | 307 print 'Skipping Clang update (clang=1 was not set in GYP_DEFINES).' |
308 return 0 | 308 return 0 |
309 | 309 |
310 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 310 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
311 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 311 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
312 return 0 | 312 return 0 |
313 | 313 |
314 parser = argparse.ArgumentParser(description='Build Clang.') | 314 parser = argparse.ArgumentParser(description='Build Clang.') |
315 parser.add_argument('--no-clobber', dest='clobber', action='store_false') | 315 parser.add_argument('--no-clobber', dest='clobber', action='store_false') |
316 parser.add_argument('--tools', nargs='*', default=[]) | 316 parser.add_argument('--tools', nargs='*', default=['plugins']) |
317 # For now, this flag is only used for the non-Windows flow, but argparser gets | 317 # For now, this flag is only used for the non-Windows flow, but argparser gets |
318 # mad if it sees a flag it doesn't recognize. | 318 # mad if it sees a flag it doesn't recognize. |
319 parser.add_argument('--if-needed', action='store_true') | 319 parser.add_argument('--if-needed', action='store_true') |
320 return UpdateClang(parser.parse_args()) | 320 return UpdateClang(parser.parse_args()) |
321 | 321 |
322 | 322 |
323 if __name__ == '__main__': | 323 if __name__ == '__main__': |
324 sys.exit(main()) | 324 sys.exit(main()) |
OLD | NEW |