| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 'base/allocator/allocator_extension.cc', | 400 'base/allocator/allocator_extension.cc', |
| 401 'base/at_exit.cc', | 401 'base/at_exit.cc', |
| 402 'base/base_paths.cc', | 402 'base/base_paths.cc', |
| 403 'base/base_switches.cc', | 403 'base/base_switches.cc', |
| 404 'base/build_time.cc', | 404 'base/build_time.cc', |
| 405 'base/callback_helpers.cc', | 405 'base/callback_helpers.cc', |
| 406 'base/callback_internal.cc', | 406 'base/callback_internal.cc', |
| 407 'base/command_line.cc', | 407 'base/command_line.cc', |
| 408 'base/debug/activity_tracker.cc', | 408 'base/debug/activity_tracker.cc', |
| 409 'base/debug/alias.cc', | 409 'base/debug/alias.cc', |
| 410 'base/debug/crash_logging.cc', |
| 410 'base/debug/dump_without_crashing.cc', | 411 'base/debug/dump_without_crashing.cc', |
| 411 'base/debug/stack_trace.cc', | 412 'base/debug/stack_trace.cc', |
| 412 'base/debug/task_annotator.cc', | 413 'base/debug/task_annotator.cc', |
| 413 'base/environment.cc', | 414 'base/environment.cc', |
| 414 'base/feature_list.cc', | 415 'base/feature_list.cc', |
| 415 'base/files/file.cc', | 416 'base/files/file.cc', |
| 416 'base/files/file_descriptor_watcher_posix.cc', | |
| 417 'base/files/file_enumerator.cc', | 417 'base/files/file_enumerator.cc', |
| 418 'base/files/file_path.cc', | 418 'base/files/file_path.cc', |
| 419 'base/files/file_path_constants.cc', | 419 'base/files/file_path_constants.cc', |
| 420 'base/files/file_tracing.cc', | 420 'base/files/file_tracing.cc', |
| 421 'base/files/file_util.cc', | 421 'base/files/file_util.cc', |
| 422 'base/files/important_file_writer.cc', | 422 'base/files/important_file_writer.cc', |
| 423 'base/files/memory_mapped_file.cc', | 423 'base/files/memory_mapped_file.cc', |
| 424 'base/files/scoped_file.cc', | 424 'base/files/scoped_file.cc', |
| 425 'base/hash.cc', | 425 'base/hash.cc', |
| 426 'base/json/json_parser.cc', | 426 'base/json/json_parser.cc', |
| 427 'base/json/json_reader.cc', | 427 'base/json/json_reader.cc', |
| 428 'base/json/json_string_value_serializer.cc', | 428 'base/json/json_string_value_serializer.cc', |
| 429 'base/json/json_writer.cc', | 429 'base/json/json_writer.cc', |
| 430 'base/json/string_escape.cc', | 430 'base/json/string_escape.cc', |
| 431 'base/lazy_instance.cc', | 431 'base/lazy_instance.cc', |
| 432 'base/location.cc', | 432 'base/location.cc', |
| 433 'base/logging.cc', | 433 'base/logging.cc', |
| 434 'base/md5.cc', | 434 'base/md5.cc', |
| 435 'base/memory/ref_counted.cc', | 435 'base/memory/ref_counted.cc', |
| 436 'base/memory/ref_counted_memory.cc', | 436 'base/memory/ref_counted_memory.cc', |
| 437 'base/memory/singleton.cc', | 437 'base/memory/singleton.cc', |
| 438 'base/memory/shared_memory_handle.cc', | 438 'base/memory/shared_memory_handle.cc', |
| 439 'base/memory/shared_memory_helper.cc', | |
| 440 'base/memory/weak_ptr.cc', | 439 'base/memory/weak_ptr.cc', |
| 441 'base/message_loop/incoming_task_queue.cc', | 440 'base/message_loop/incoming_task_queue.cc', |
| 442 'base/message_loop/message_loop.cc', | 441 'base/message_loop/message_loop.cc', |
| 443 'base/message_loop/message_loop_task_runner.cc', | 442 'base/message_loop/message_loop_task_runner.cc', |
| 444 'base/message_loop/message_pump.cc', | 443 'base/message_loop/message_pump.cc', |
| 445 'base/message_loop/message_pump_default.cc', | 444 'base/message_loop/message_pump_default.cc', |
| 446 'base/metrics/bucket_ranges.cc', | 445 'base/metrics/bucket_ranges.cc', |
| 447 'base/metrics/field_trial.cc', | 446 'base/metrics/field_trial.cc', |
| 448 'base/metrics/field_trial_param_associator.cc', | 447 'base/metrics/field_trial_param_associator.cc', |
| 449 'base/metrics/histogram.cc', | 448 'base/metrics/histogram.cc', |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 'base/trace_event/category_registry.cc', | 530 'base/trace_event/category_registry.cc', |
| 532 'base/trace_event/event_name_filter.cc', | 531 'base/trace_event/event_name_filter.cc', |
| 533 'base/trace_event/heap_profiler_allocation_context.cc', | 532 'base/trace_event/heap_profiler_allocation_context.cc', |
| 534 'base/trace_event/heap_profiler_allocation_context_tracker.cc', | 533 'base/trace_event/heap_profiler_allocation_context_tracker.cc', |
| 535 'base/trace_event/heap_profiler_allocation_register.cc', | 534 'base/trace_event/heap_profiler_allocation_register.cc', |
| 536 'base/trace_event/heap_profiler_event_filter.cc', | 535 'base/trace_event/heap_profiler_event_filter.cc', |
| 537 'base/trace_event/heap_profiler_heap_dump_writer.cc', | 536 'base/trace_event/heap_profiler_heap_dump_writer.cc', |
| 538 'base/trace_event/heap_profiler_serialization_state.cc', | 537 'base/trace_event/heap_profiler_serialization_state.cc', |
| 539 'base/trace_event/heap_profiler_stack_frame_deduplicator.cc', | 538 'base/trace_event/heap_profiler_stack_frame_deduplicator.cc', |
| 540 'base/trace_event/heap_profiler_type_name_deduplicator.cc', | 539 'base/trace_event/heap_profiler_type_name_deduplicator.cc', |
| 540 'base/trace_event/malloc_dump_provider.cc', |
| 541 'base/trace_event/memory_allocator_dump.cc', | 541 'base/trace_event/memory_allocator_dump.cc', |
| 542 'base/trace_event/memory_allocator_dump_guid.cc', | 542 'base/trace_event/memory_allocator_dump_guid.cc', |
| 543 'base/trace_event/memory_dump_manager.cc', | 543 'base/trace_event/memory_dump_manager.cc', |
| 544 'base/trace_event/memory_dump_provider_info.cc', | 544 'base/trace_event/memory_dump_provider_info.cc', |
| 545 'base/trace_event/memory_dump_request_args.cc', | 545 'base/trace_event/memory_dump_request_args.cc', |
| 546 'base/trace_event/memory_dump_scheduler.cc', | 546 'base/trace_event/memory_dump_scheduler.cc', |
| 547 'base/trace_event/memory_infra_background_whitelist.cc', | 547 'base/trace_event/memory_infra_background_whitelist.cc', |
| 548 'base/trace_event/memory_peak_detector.cc', | 548 'base/trace_event/memory_peak_detector.cc', |
| 549 'base/trace_event/memory_tracing_observer.cc', | 549 'base/trace_event/memory_tracing_observer.cc', |
| 550 'base/trace_event/memory_usage_estimator.cc', | 550 'base/trace_event/memory_usage_estimator.cc', |
| (...skipping 17 matching lines...) Expand all Loading... |
| 568 'base/values.cc', | 568 'base/values.cc', |
| 569 'base/vlog.cc', | 569 'base/vlog.cc', |
| 570 ]) | 570 ]) |
| 571 | 571 |
| 572 if is_posix: | 572 if is_posix: |
| 573 static_libraries['base']['sources'].extend([ | 573 static_libraries['base']['sources'].extend([ |
| 574 'base/base_paths_posix.cc', | 574 'base/base_paths_posix.cc', |
| 575 'base/debug/debugger_posix.cc', | 575 'base/debug/debugger_posix.cc', |
| 576 'base/debug/stack_trace_posix.cc', | 576 'base/debug/stack_trace_posix.cc', |
| 577 'base/files/file_enumerator_posix.cc', | 577 'base/files/file_enumerator_posix.cc', |
| 578 'base/files/file_descriptor_watcher_posix.cc', |
| 578 'base/files/file_posix.cc', | 579 'base/files/file_posix.cc', |
| 579 'base/files/file_util_posix.cc', | 580 'base/files/file_util_posix.cc', |
| 580 'base/files/memory_mapped_file_posix.cc', | 581 'base/files/memory_mapped_file_posix.cc', |
| 582 'base/memory/shared_memory_helper.cc', |
| 581 'base/message_loop/message_pump_libevent.cc', | 583 'base/message_loop/message_pump_libevent.cc', |
| 582 'base/posix/file_descriptor_shuffle.cc', | 584 'base/posix/file_descriptor_shuffle.cc', |
| 583 'base/posix/global_descriptors.cc', | 585 'base/posix/global_descriptors.cc', |
| 584 'base/posix/safe_strerror.cc', | 586 'base/posix/safe_strerror.cc', |
| 585 'base/process/kill_posix.cc', | 587 'base/process/kill_posix.cc', |
| 586 'base/process/process_handle_posix.cc', | 588 'base/process/process_handle_posix.cc', |
| 587 'base/process/process_metrics_posix.cc', | 589 'base/process/process_metrics_posix.cc', |
| 588 'base/process/process_posix.cc', | 590 'base/process/process_posix.cc', |
| 589 'base/rand_util_posix.cc', | 591 'base/rand_util_posix.cc', |
| 590 'base/strings/string16.cc', | 592 'base/strings/string16.cc', |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 'base/process/internal_linux.cc', | 641 'base/process/internal_linux.cc', |
| 640 'base/process/memory_linux.cc', | 642 'base/process/memory_linux.cc', |
| 641 'base/process/process_handle_linux.cc', | 643 'base/process/process_handle_linux.cc', |
| 642 'base/process/process_info_linux.cc', | 644 'base/process/process_info_linux.cc', |
| 643 'base/process/process_iterator_linux.cc', | 645 'base/process/process_iterator_linux.cc', |
| 644 'base/process/process_linux.cc', | 646 'base/process/process_linux.cc', |
| 645 'base/process/process_metrics_linux.cc', | 647 'base/process/process_metrics_linux.cc', |
| 646 'base/strings/sys_string_conversions_posix.cc', | 648 'base/strings/sys_string_conversions_posix.cc', |
| 647 'base/sys_info_linux.cc', | 649 'base/sys_info_linux.cc', |
| 648 'base/threading/platform_thread_linux.cc', | 650 'base/threading/platform_thread_linux.cc', |
| 649 'base/trace_event/malloc_dump_provider.cc', | |
| 650 ]) | 651 ]) |
| 651 if is_linux: | 652 if is_linux: |
| 652 static_libraries['base']['sources'].extend([ | 653 static_libraries['base']['sources'].extend([ |
| 653 'base/allocator/allocator_shim.cc', | 654 'base/allocator/allocator_shim.cc', |
| 654 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', | 655 'base/allocator/allocator_shim_default_dispatch_to_glibc.cc', |
| 655 ]) | 656 ]) |
| 656 libs.extend(['-lrt', '-latomic']) | 657 libs.extend(['-lrt', '-latomic']) |
| 657 static_libraries['libevent']['include_dirs'].extend([ | 658 static_libraries['libevent']['include_dirs'].extend([ |
| 658 os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') | 659 os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux') |
| 659 ]) | 660 ]) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 'base/memory/shared_memory_mac.cc', | 692 'base/memory/shared_memory_mac.cc', |
| 692 'base/message_loop/message_pump_mac.mm', | 693 'base/message_loop/message_pump_mac.mm', |
| 693 'base/metrics/field_trial.cc', | 694 'base/metrics/field_trial.cc', |
| 694 'base/process/process_handle_mac.cc', | 695 'base/process/process_handle_mac.cc', |
| 695 'base/process/process_info_mac.cc', | 696 'base/process/process_info_mac.cc', |
| 696 'base/process/process_iterator_mac.cc', | 697 'base/process/process_iterator_mac.cc', |
| 697 'base/process/process_metrics_mac.cc', | 698 'base/process/process_metrics_mac.cc', |
| 698 'base/strings/sys_string_conversions_mac.mm', | 699 'base/strings/sys_string_conversions_mac.mm', |
| 699 'base/time/time_mac.cc', | 700 'base/time/time_mac.cc', |
| 700 'base/threading/platform_thread_mac.mm', | 701 'base/threading/platform_thread_mac.mm', |
| 701 'base/trace_event/malloc_dump_provider.cc', | |
| 702 ]) | 702 ]) |
| 703 static_libraries['libevent']['include_dirs'].extend([ | 703 static_libraries['libevent']['include_dirs'].extend([ |
| 704 os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac') | 704 os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'mac') |
| 705 ]) | 705 ]) |
| 706 static_libraries['libevent']['sources'].extend([ | 706 static_libraries['libevent']['sources'].extend([ |
| 707 'base/third_party/libevent/kqueue.c', | 707 'base/third_party/libevent/kqueue.c', |
| 708 ]) | 708 ]) |
| 709 | 709 |
| 710 libs.extend([ | 710 libs.extend([ |
| 711 '-framework', 'AppKit', | 711 '-framework', 'AppKit', |
| (...skipping 10 matching lines...) Expand all Loading... |
| 722 'base/debug/debugger.cc', | 722 'base/debug/debugger.cc', |
| 723 'base/debug/debugger_win.cc', | 723 'base/debug/debugger_win.cc', |
| 724 'base/debug/profiler.cc', | 724 'base/debug/profiler.cc', |
| 725 'base/debug/stack_trace_win.cc', | 725 'base/debug/stack_trace_win.cc', |
| 726 'base/file_version_info_win.cc', | 726 'base/file_version_info_win.cc', |
| 727 'base/files/file_enumerator_win.cc', | 727 'base/files/file_enumerator_win.cc', |
| 728 'base/files/file_path_watcher_win.cc', | 728 'base/files/file_path_watcher_win.cc', |
| 729 'base/files/file_util_win.cc', | 729 'base/files/file_util_win.cc', |
| 730 'base/files/file_win.cc', | 730 'base/files/file_win.cc', |
| 731 'base/files/memory_mapped_file_win.cc', | 731 'base/files/memory_mapped_file_win.cc', |
| 732 'base/guid.cc', |
| 732 'base/logging_win.cc', | 733 'base/logging_win.cc', |
| 733 'base/memory/memory_pressure_monitor_win.cc', | 734 'base/memory/memory_pressure_monitor_win.cc', |
| 734 'base/memory/shared_memory_handle_win.cc', | 735 'base/memory/shared_memory_handle_win.cc', |
| 735 'base/memory/shared_memory_win.cc', | 736 'base/memory/shared_memory_win.cc', |
| 736 'base/message_loop/message_pump_win.cc', | 737 'base/message_loop/message_pump_win.cc', |
| 737 'base/native_library_win.cc', | 738 'base/native_library_win.cc', |
| 738 'base/power_monitor/power_monitor_device_source_win.cc', | 739 'base/power_monitor/power_monitor_device_source_win.cc', |
| 739 'base/process/kill_win.cc', | 740 'base/process/kill_win.cc', |
| 740 'base/process/launch_win.cc', | 741 'base/process/launch_win.cc', |
| 741 'base/process/memory_win.cc', | 742 'base/process/memory_win.cc', |
| 742 'base/process/process_handle_win.cc', | 743 'base/process/process_handle_win.cc', |
| 743 'base/process/process_info_win.cc', | 744 'base/process/process_info_win.cc', |
| 744 'base/process/process_iterator_win.cc', | 745 'base/process/process_iterator_win.cc', |
| 745 'base/process/process_metrics_win.cc', | 746 'base/process/process_metrics_win.cc', |
| 746 'base/process/process_win.cc', | 747 'base/process/process_win.cc', |
| 747 'base/profiler/native_stack_sampler_win.cc', | 748 'base/profiler/native_stack_sampler_win.cc', |
| 748 'base/profiler/win32_stack_frame_unwinder.cc', | 749 'base/profiler/win32_stack_frame_unwinder.cc', |
| 749 'base/rand_util.cc', | 750 'base/rand_util.cc', |
| 750 'base/rand_util_win.cc', | 751 'base/rand_util_win.cc', |
| 751 'base/strings/sys_string_conversions_win.cc', | 752 'base/strings/sys_string_conversions_win.cc', |
| 752 'base/sync_socket_win.cc', | 753 'base/sync_socket_win.cc', |
| 753 'base/synchronization/condition_variable_win.cc', | 754 'base/synchronization/condition_variable_win.cc', |
| 754 'base/synchronization/lock_impl_win.cc', | 755 'base/synchronization/lock_impl_win.cc', |
| 755 'base/synchronization/read_write_lock_win.cc', | 756 'base/synchronization/read_write_lock_win.cc', |
| 756 'base/synchronization/waitable_event_watcher_win.cc', | 757 'base/synchronization/waitable_event_watcher_win.cc', |
| 757 'base/synchronization/waitable_event_win.cc', | 758 'base/synchronization/waitable_event_win.cc', |
| 758 'base/sys_info_win.cc', | 759 'base/sys_info_win.cc', |
| 759 'base/threading/platform_thread_win.cc', | 760 'base/threading/platform_thread_win.cc', |
| 760 'base/threading/thread_local_storage_win.cc', | 761 'base/threading/thread_local_storage_win.cc', |
| 761 'base/threading/thread_local_win.cc', | |
| 762 'base/threading/worker_pool_win.cc', | 762 'base/threading/worker_pool_win.cc', |
| 763 'base/time/time_win.cc', | 763 'base/time/time_win.cc', |
| 764 'base/timer/hi_res_timer_manager_win.cc', | 764 'base/timer/hi_res_timer_manager_win.cc', |
| 765 'base/trace_event/heap_profiler_allocation_register_win.cc', | 765 'base/trace_event/heap_profiler_allocation_register_win.cc', |
| 766 'base/trace_event/trace_event_etw_export_win.cc', | 766 'base/trace_event/trace_event_etw_export_win.cc', |
| 767 'base/win/enum_variant.cc', | 767 'base/win/enum_variant.cc', |
| 768 'base/win/event_trace_controller.cc', | 768 'base/win/event_trace_controller.cc', |
| 769 'base/win/event_trace_provider.cc', | 769 'base/win/event_trace_provider.cc', |
| 770 'base/win/i18n.cc', | 770 'base/win/i18n.cc', |
| 771 'base/win/iat_patch_function.cc', | 771 'base/win/iat_patch_function.cc', |
| (...skipping 10 matching lines...) Expand all Loading... |
| 782 'base/win/scoped_variant.cc', | 782 'base/win/scoped_variant.cc', |
| 783 'base/win/shortcut.cc', | 783 'base/win/shortcut.cc', |
| 784 'base/win/startup_information.cc', | 784 'base/win/startup_information.cc', |
| 785 'base/win/wait_chain.cc', | 785 'base/win/wait_chain.cc', |
| 786 'base/win/win_util.cc', | 786 'base/win/win_util.cc', |
| 787 'base/win/windows_version.cc', | 787 'base/win/windows_version.cc', |
| 788 'base/win/wrapped_window_proc.cc', | 788 'base/win/wrapped_window_proc.cc', |
| 789 ]) | 789 ]) |
| 790 | 790 |
| 791 libs.extend([ | 791 libs.extend([ |
| 792 'advapi32.lib', |
| 793 'dbghelp.lib', |
| 792 'kernel32.lib', | 794 'kernel32.lib', |
| 795 'ole32.lib', |
| 796 'shell32.lib', |
| 793 'user32.lib', | 797 'user32.lib', |
| 794 'shell32.lib', | 798 'userenv.lib', |
| 795 'ole32.lib', | 799 'version.lib', |
| 796 'winmm.lib', | 800 'winmm.lib', |
| 797 'ws2_32.lib', | 801 'ws2_32.lib', |
| 798 'userenv.lib', | |
| 799 'version.lib', | |
| 800 'dbghelp.lib', | |
| 801 ]) | 802 ]) |
| 802 | 803 |
| 803 # we just build static libraries that GN needs | 804 # we just build static libraries that GN needs |
| 804 executables['gn']['libs'].extend(static_libraries.keys()) | 805 executables['gn']['libs'].extend(static_libraries.keys()) |
| 805 | 806 |
| 806 write_generic_ninja(path, static_libraries, executables, cc, cxx, ar, ld, | 807 write_generic_ninja(path, static_libraries, executables, cc, cxx, ar, ld, |
| 807 cflags, cflags_cc, ldflags, include_dirs, libs) | 808 cflags, cflags_cc, ldflags, include_dirs, libs) |
| 808 | 809 |
| 809 def build_gn_with_gn(temp_gn, build_dir, options): | 810 def build_gn_with_gn(temp_gn, build_dir, options): |
| 810 gn_gen_args = options.gn_gen_args or '' | 811 gn_gen_args = options.gn_gen_args or '' |
| 811 if not options.debug: | 812 if not options.debug: |
| 812 gn_gen_args += ' is_debug=false' | 813 gn_gen_args += ' is_debug=false' |
| 813 cmd = [temp_gn, 'gen', build_dir, '--args=%s' % gn_gen_args] | 814 cmd = [temp_gn, 'gen', build_dir, '--args=%s' % gn_gen_args] |
| 814 check_call(cmd) | 815 check_call(cmd) |
| 815 | 816 |
| 816 cmd = ['ninja', '-C', build_dir] | 817 cmd = ['ninja', '-C', build_dir] |
| 817 if options.verbose: | 818 if options.verbose: |
| 818 cmd.append('-v') | 819 cmd.append('-v') |
| 819 cmd.append('gn') | 820 cmd.append('gn') |
| 820 check_call(cmd) | 821 check_call(cmd) |
| 821 | 822 |
| 822 if not options.debug and not is_win: | 823 if not options.debug and not is_win: |
| 823 check_call(['strip', os.path.join(build_dir, 'gn')]) | 824 check_call(['strip', os.path.join(build_dir, 'gn')]) |
| 824 | 825 |
| 825 | 826 |
| 826 if __name__ == '__main__': | 827 if __name__ == '__main__': |
| 827 sys.exit(main(sys.argv[1:])) | 828 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |