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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. |
302 cflags.extend(['-DNO_TCMALLOC']) | 302 cflags.extend(['-DNO_TCMALLOC', '-D__STDC_FORMAT_MACROS']) |
303 | 303 |
304 if is_posix: | 304 if is_posix: |
305 if options.debug: | 305 if options.debug: |
306 cflags.extend(['-O0', '-g']) | 306 cflags.extend(['-O0', '-g']) |
307 else: | 307 else: |
308 cflags.extend(['-O2', '-g0']) | 308 cflags.extend(['-O2', '-g0']) |
309 | 309 |
310 cflags.extend([ | 310 cflags.extend([ |
311 '-D_FILE_OFFSET_BITS=64', | 311 '-D_FILE_OFFSET_BITS=64', |
312 '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', | 312 '-D__STDC_CONSTANT_MACROS', '-D__STDC_FORMAT_MACROS', |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 'base/process/process_metrics_posix.cc', | 528 'base/process/process_metrics_posix.cc', |
529 'base/process/process_posix.cc', | 529 'base/process/process_posix.cc', |
530 'base/strings/string16.cc', | 530 'base/strings/string16.cc', |
531 'base/synchronization/condition_variable_posix.cc', | 531 'base/synchronization/condition_variable_posix.cc', |
532 'base/synchronization/lock_impl_posix.cc', | 532 'base/synchronization/lock_impl_posix.cc', |
533 'base/synchronization/read_write_lock_posix.cc', | 533 'base/synchronization/read_write_lock_posix.cc', |
534 'base/synchronization/waitable_event_posix.cc', | 534 'base/synchronization/waitable_event_posix.cc', |
535 'base/sys_info_posix.cc', | 535 'base/sys_info_posix.cc', |
536 'base/threading/platform_thread_internal_posix.cc', | 536 'base/threading/platform_thread_internal_posix.cc', |
537 'base/threading/platform_thread_posix.cc', | 537 'base/threading/platform_thread_posix.cc', |
538 'base/threading/thread_local_posix.cc', | |
539 'base/threading/thread_local_storage_posix.cc', | 538 'base/threading/thread_local_storage_posix.cc', |
540 'base/threading/worker_pool_posix.cc', | 539 'base/threading/worker_pool_posix.cc', |
541 'base/time/time_posix.cc', | 540 'base/time/time_posix.cc', |
542 'base/trace_event/heap_profiler_allocation_register_posix.cc', | 541 'base/trace_event/heap_profiler_allocation_register_posix.cc', |
543 ]) | 542 ]) |
544 static_libraries['libevent'] = { | 543 static_libraries['libevent'] = { |
545 'sources': [ | 544 'sources': [ |
546 'base/third_party/libevent/buffer.c', | 545 'base/third_party/libevent/buffer.c', |
547 'base/third_party/libevent/evbuffer.c', | 546 'base/third_party/libevent/evbuffer.c', |
548 'base/third_party/libevent/evdns.c', | 547 'base/third_party/libevent/evdns.c', |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 cmd.append('-v') | 739 cmd.append('-v') |
741 cmd.append('gn') | 740 cmd.append('gn') |
742 check_call(cmd) | 741 check_call(cmd) |
743 | 742 |
744 if not options.debug and not is_win: | 743 if not options.debug and not is_win: |
745 check_call(['strip', os.path.join(build_dir, 'gn')]) | 744 check_call(['strip', os.path.join(build_dir, 'gn')]) |
746 | 745 |
747 | 746 |
748 if __name__ == '__main__': | 747 if __name__ == '__main__': |
749 sys.exit(main(sys.argv[1:])) | 748 sys.exit(main(sys.argv[1:])) |
OLD | NEW |