| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 def write_gn_ninja(path, root_gen_dir, options): | 282 def write_gn_ninja(path, root_gen_dir, options): |
| 283 if is_win: | 283 if is_win: |
| 284 cc = os.environ.get('CC', 'cl.exe') | 284 cc = os.environ.get('CC', 'cl.exe') |
| 285 cxx = os.environ.get('CXX', 'cl.exe') | 285 cxx = os.environ.get('CXX', 'cl.exe') |
| 286 ld = os.environ.get('LD', 'link.exe') | 286 ld = os.environ.get('LD', 'link.exe') |
| 287 ar = os.environ.get('AR', 'lib.exe') | 287 ar = os.environ.get('AR', 'lib.exe') |
| 288 else: | 288 else: |
| 289 cc = os.environ.get('CC', 'cc') | 289 cc = os.environ.get('CC', 'cc') |
| 290 cxx = os.environ.get('CXX', 'c++') | 290 cxx = os.environ.get('CXX', 'c++') |
| 291 ld = os.environ.get('LD', cxx) | 291 ld = cxx |
| 292 ar = os.environ.get('AR', 'ar') | 292 ar = os.environ.get('AR', 'ar') |
| 293 | 293 |
| 294 cflags = os.environ.get('CFLAGS', '').split() | 294 cflags = os.environ.get('CFLAGS', '').split() |
| 295 cflags_cc = os.environ.get('CXXFLAGS', '').split() | 295 cflags_cc = os.environ.get('CXXFLAGS', '').split() |
| 296 ldflags = os.environ.get('LDFLAGS', '').split() | 296 ldflags = os.environ.get('LDFLAGS', '').split() |
| 297 include_dirs = [root_gen_dir, SRC_ROOT] | 297 include_dirs = [root_gen_dir, SRC_ROOT] |
| 298 libs = [] | 298 libs = [] |
| 299 | 299 |
| 300 # //base/allocator/allocator_extension.cc needs this macro defined, | 300 # //base/allocator/allocator_extension.cc needs this macro defined, |
| 301 # otherwise there would be link errors. | 301 # otherwise there would be link errors. |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 cmd.append('-v') | 739 cmd.append('-v') |
| 740 cmd.append('gn') | 740 cmd.append('gn') |
| 741 check_call(cmd) | 741 check_call(cmd) |
| 742 | 742 |
| 743 if not options.debug and not is_win: | 743 if not options.debug and not is_win: |
| 744 check_call(['strip', os.path.join(build_dir, 'gn')]) | 744 check_call(['strip', os.path.join(build_dir, 'gn')]) |
| 745 | 745 |
| 746 | 746 |
| 747 if __name__ == '__main__': | 747 if __name__ == '__main__': |
| 748 sys.exit(main(sys.argv[1:])) | 748 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |