OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 """Downloads and unpacks a toolchain for building on Windows. The contents are | 6 """Downloads and unpacks a toolchain for building on Windows. The contents are |
7 matched by sha1 which will be updated when the toolchain is updated. | 7 matched by sha1 which will be updated when the toolchain is updated. |
8 | 8 |
9 Having a toolchain script in depot_tools means that it's not versioned | 9 Having a toolchain script in depot_tools means that it's not versioned |
10 directly with the source code. That is, if the toolchain is upgraded, but | 10 directly with the source code. That is, if the toolchain is upgraded, but |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 pass | 67 pass |
68 | 68 |
69 | 69 |
70 def GetFileList(root): | 70 def GetFileList(root): |
71 """Gets a normalized list of files under |root|.""" | 71 """Gets a normalized list of files under |root|.""" |
72 assert not os.path.isabs(root) | 72 assert not os.path.isabs(root) |
73 assert os.path.normpath(root) == root | 73 assert os.path.normpath(root) == root |
74 file_list = [] | 74 file_list = [] |
75 for base, _, files in os.walk(root): | 75 for base, _, files in os.walk(root): |
76 paths = [os.path.join(base, f) for f in files] | 76 paths = [os.path.join(base, f) for f in files] |
77 file_list.extend(x.lower() for x in paths) | 77 # Ignore WER ReportQueue entries that vctip/cl leave in the bin dir if/when |
| 78 # they crash. |
| 79 file_list.extend(x.lower() for x in paths if 'WER\\ReportQueue' not in x) |
78 return sorted(file_list, key=lambda s: s.replace('/', '\\')) | 80 return sorted(file_list, key=lambda s: s.replace('/', '\\')) |
79 | 81 |
80 | 82 |
81 def MakeTimestampsFileName(root): | 83 def MakeTimestampsFileName(root): |
82 return os.path.join(root, '..', '.timestamps') | 84 return os.path.join(root, '..', '.timestamps') |
83 | 85 |
84 | 86 |
85 def CalculateHash(root): | 87 def CalculateHash(root): |
86 """Calculates the sha1 of the paths to all files in the given |root| and the | 88 """Calculates the sha1 of the paths to all files in the given |root| and the |
87 contents of those files, and returns as a hex string.""" | 89 contents of those files, and returns as a hex string.""" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 options.output_json) | 426 options.output_json) |
425 | 427 |
426 if os.environ.get('GYP_MSVS_VERSION') == '2015': | 428 if os.environ.get('GYP_MSVS_VERSION') == '2015': |
427 InstallUniversalCRTIfNeeded(abs_target_dir) | 429 InstallUniversalCRTIfNeeded(abs_target_dir) |
428 | 430 |
429 return 0 | 431 return 0 |
430 | 432 |
431 | 433 |
432 if __name__ == '__main__': | 434 if __name__ == '__main__': |
433 sys.exit(main()) | 435 sys.exit(main()) |
OLD | NEW |