| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 # This file isn't officially supported by the Chromium project. It's maintained | 6 # This file isn't officially supported by the Chromium project. It's maintained |
| 7 # on a best-effort basis by volunteers, so some things may be broken from time | 7 # on a best-effort basis by volunteers, so some things may be broken from time |
| 8 # to time. If you encounter errors, it's most often due to files in base that | 8 # to time. If you encounter errors, it's most often due to files in base that |
| 9 # have been added or moved since somebody last tried this script. Generally | 9 # have been added or moved since somebody last tried this script. Generally |
| 10 # such errors are easy to diagnose. | 10 # such errors are easy to diagnose. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 'base': {'sources': [], 'tool': 'cxx'}, | 145 'base': {'sources': [], 'tool': 'cxx'}, |
| 146 'dynamic_annotations': {'sources': [], 'tool': 'cc'}, | 146 'dynamic_annotations': {'sources': [], 'tool': 'cc'}, |
| 147 'gn': {'sources': [], 'tool': 'cxx'}, | 147 'gn': {'sources': [], 'tool': 'cxx'}, |
| 148 } | 148 } |
| 149 | 149 |
| 150 for name in os.listdir(GN_ROOT): | 150 for name in os.listdir(GN_ROOT): |
| 151 if not name.endswith('.cc'): | 151 if not name.endswith('.cc'): |
| 152 continue | 152 continue |
| 153 if name.endswith('_unittest.cc'): | 153 if name.endswith('_unittest.cc'): |
| 154 continue | 154 continue |
| 155 if name in ['generate_test_gn_data.cc', 'run_all_unittests.cc']: | 155 if name == 'run_all_unittests.cc': |
| 156 continue | 156 continue |
| 157 full_path = os.path.join(GN_ROOT, name) | 157 full_path = os.path.join(GN_ROOT, name) |
| 158 static_libraries['gn']['sources'].append( | 158 static_libraries['gn']['sources'].append( |
| 159 os.path.relpath(full_path, SRC_ROOT)) | 159 os.path.relpath(full_path, SRC_ROOT)) |
| 160 | 160 |
| 161 static_libraries['dynamic_annotations']['sources'].extend([ | 161 static_libraries['dynamic_annotations']['sources'].extend([ |
| 162 'base/third_party/dynamic_annotations/dynamic_annotations.c', | 162 'base/third_party/dynamic_annotations/dynamic_annotations.c', |
| 163 'base/third_party/superfasthash/superfasthash.c', | 163 'base/third_party/superfasthash/superfasthash.c', |
| 164 ]) | 164 ]) |
| 165 static_libraries['base']['sources'].extend([ | 165 static_libraries['base']['sources'].extend([ |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 cmd.append('-v') | 460 cmd.append('-v') |
| 461 cmd.append('gn') | 461 cmd.append('gn') |
| 462 check_call(cmd) | 462 check_call(cmd) |
| 463 | 463 |
| 464 if not options.debug: | 464 if not options.debug: |
| 465 check_call(['strip', os.path.join(build_dir, 'gn')]) | 465 check_call(['strip', os.path.join(build_dir, 'gn')]) |
| 466 | 466 |
| 467 | 467 |
| 468 if __name__ == '__main__': | 468 if __name__ == '__main__': |
| 469 sys.exit(main(sys.argv[1:])) | 469 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |