 Chromium Code Reviews
 Chromium Code Reviews Issue 2734303002:
  fold both_gn_and_gyp and gn_only groups into gn_all  (Closed)
    
  
    Issue 2734303002:
  fold both_gn_and_gyp and gn_only groups into gn_all  (Closed) 
  | OLD | NEW | 
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be | 
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. | 
| 4 | 4 | 
| 5 # This is the root build file for GN. GN will start processing by loading this | 5 # This is the root build file for GN. GN will start processing by loading this | 
| 6 # file, and recursively load all dependencies until all dependencies are either | 6 # file, and recursively load all dependencies until all dependencies are either | 
| 7 # resolved or known not to exist (which will cause the build to fail). So if | 7 # resolved or known not to exist (which will cause the build to fail). So if | 
| 8 # you add a new build file, there must be some path of dependencies from this | 8 # you add a new build file, there must be some path of dependencies from this | 
| 9 # file to your new one or GN won't know about it. | 9 # file to your new one or GN won't know about it. | 
| 10 | 10 | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 # GYP and GN determine "all", see crbug.com/503241. | 67 # GYP and GN determine "all", see crbug.com/503241. | 
| 68 # | 68 # | 
| 69 # TODO(GYP_GONE): crbug.com/481694. Make sure that the above is true and there | 69 # TODO(GYP_GONE): crbug.com/481694. Make sure that the above is true and there | 
| 70 # are scripts run on the bots that enforce this. Once the GYP migration is | 70 # are scripts run on the bots that enforce this. Once the GYP migration is | 
| 71 # over, we can collapse all of these targets as desired. | 71 # over, we can collapse all of these targets as desired. | 
| 72 | 72 | 
| 73 group("gn_all") { | 73 group("gn_all") { | 
| 74 testonly = true | 74 testonly = true | 
| 75 | 75 | 
| 76 deps = [ | 76 deps = [ | 
| 77 ":both_gn_and_gyp", | |
| 78 ":gn_only", | |
| 79 ":gn_visibility", | 77 ":gn_visibility", | 
| 80 ] | |
| 81 | |
| 82 if (!is_ios) { | |
| 83 deps += [ "//v8:gn_all" ] | |
| 84 } | |
| 85 } | |
| 86 | |
| 87 # TODO(GYP_GONE): This target exists for compatibility with GYP, specifically | |
| 88 # for the iOS bots and the official builders. | |
| 89 group("All") { | |
| 90 testonly = true | |
| 91 | |
| 92 deps = [ | |
| 93 ":gn_all", | |
| 94 ] | |
| 95 } | |
| 96 | |
| 97 # TODO(GYP_GONE): This target exists for compatibility with GYP for the | |
| 98 # builders that specify targets in the recipes directly. | |
| 99 # Ideally it should not exist, and the builders should be specifying | |
| 100 # more specific targets (or 'All') via the source-side | |
| 101 # //testing/buildbot/*.json files. We should simply delete this target | |
| 102 # and update any recipes that are using it. | |
| 103 group("chromium_builder_tests") { | |
| 104 testonly = true | |
| 105 deps = [] | |
| 106 } | |
| 107 | |
| 108 # TODO(GYP_GONE): Figure out if we really need this target or if there's | |
| 109 # some better way to specify things. | |
| 110 if (is_win) { | |
| 111 group("chrome_official_builder_no_unittests") { | |
| 112 deps = [ | |
| 113 "//base/win:eventlog_provider", | |
| 114 "//chrome/installer/gcapi", | |
| 115 "//chrome/installer/mini_installer", | |
| 116 "//cloud_print", | |
| 117 "//cloud_print/virtual_driver/win/port_monitor:copy_gcp_portmon_binaries", | |
| 118 "//components/policy:pack_policy_templates", | |
| 119 "//courgette", | |
| 120 "//courgette:copy_courgette_binaries", | |
| 121 "//remoting/webapp", | |
| 122 ] | |
| 123 | |
| 124 if (target_cpu == "x86") { | |
| 125 if (is_clang) { | |
| 126 deps += [ "//courgette(//build/toolchain/win:clang_x64)" ] | |
| 127 } else { | |
| 128 deps += [ "//courgette(//build/toolchain/win:x64)" ] | |
| 129 } | |
| 130 } | |
| 131 if (is_chrome_branded) { | |
| 132 deps += [ "//remoting/host:remoting_host_installation" ] | |
| 133 } | |
| 134 } | |
| 135 | |
| 136 group("chrome_official_builder") { | |
| 137 testonly = true | |
| 138 | |
| 139 deps = [ | |
| 140 ":chrome_official_builder_no_unittests", | |
| 141 "//base:base_unittests", | |
| 142 "//chrome/test:browser_tests", | |
| 143 "//chrome/test:sync_integration_tests", | |
| 144 "//ipc:ipc_tests", | |
| 145 "//media:media_unittests", | |
| 146 "//media/midi:midi_unittests", | |
| 147 "//net:net_unittests", | |
| 148 "//printing:printing_unittests", | |
| 149 "//sql:sql_unittests", | |
| 150 "//ui/base:ui_base_unittests", | |
| 151 "//ui/gfx:gfx_unittests", | |
| 152 "//ui/touch_selection:ui_touch_selection_unittests", | |
| 153 "//ui/views:views_unittests", | |
| 154 "//url:url_unittests", | |
| 155 ] | |
| 156 } | |
| 157 | |
| 158 group("All_syzygy") { | |
| 159 if (is_syzyasan) { | |
| 160 deps = [ | |
| 161 "//chrome/installer/mini_installer:mini_installer", | |
| 162 "//chrome/installer/mini_installer:mini_installer_syzygy", | |
| 163 ] | |
| 164 } | |
| 165 } | |
| 166 | |
| 167 if (is_syzyasan) { | |
| 168 group("chrome_official_syzyasan_builder") { | |
| 169 deps = [ | |
| 170 ":All_syzygy", | |
| 171 ":chrome_official_builder_no_unittests", | |
| 172 ] | |
| 173 } | |
| 174 } | |
| 175 } | |
| 176 | |
| 177 if (is_chromeos) { | |
| 178 group("chromiumos_preflight") { | |
| 179 testonly = true | |
| 180 deps = [ | |
| 181 "//breakpad:minidump_stackwalk($host_toolchain)", | |
| 182 "//chrome", | |
| 183 "//chrome/test/chromedriver", | |
| 184 "//media:media_unittests", | |
| 185 "//media/gpu:video_decode_accelerator_unittest", | |
| 186 "//media/gpu:video_encode_accelerator_unittest", | |
| 187 "//ppapi/examples/video_decode", | |
| 188 "//sandbox/linux:chrome_sandbox", | |
| 189 "//sandbox/linux:sandbox_linux_unittests", | |
| 190 | |
| 191 # Blocked on https://github.com/catapult-project/catapult/issues/2297 | |
| 192 #"//third_party/catapult/telemetry:bitmaptools", | |
| 193 "//tools/perf/clear_system_cache", | |
| 194 ] | |
| 195 } | |
| 196 } | |
| 197 | |
| 198 # The "both_gn_and_gyp" target should reflect every target that is built | |
| 199 # in both the GN and GYP builds, and ideally it should match the | |
| 200 # "both_gn_and_gyp" target in build/gn_migration.gypi line-for-line. | |
| 201 group("both_gn_and_gyp") { | |
| 202 testonly = true | |
| 203 deps = [ | |
| 204 "//base:base_unittests", | 78 "//base:base_unittests", | 
| 205 "//chrome/installer", | 79 "//chrome/installer", | 
| 206 "//components:components_unittests", | 80 "//components:components_unittests", | 
| 207 "//net:net_unittests", | 81 "//net:net_unittests", | 
| 208 "//skia:skia_unittests", | 82 "//skia:skia_unittests", | 
| 209 "//sql:sql_unittests", | 83 "//sql:sql_unittests", | 
| 210 "//tools/ipc_fuzzer:ipc_fuzzer_all", | 84 "//tools/ipc_fuzzer:ipc_fuzzer_all", | 
| 211 "//ui/base:ui_base_unittests", | 85 "//ui/base:ui_base_unittests", | 
| 212 "//ui/gfx:gfx_unittests", | 86 "//ui/gfx:gfx_unittests", | 
| 213 "//url:url_unittests", | 87 "//url:url_unittests", | 
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 699 ] | 573 ] | 
| 700 } | 574 } | 
| 701 | 575 | 
| 702 if (use_openh264) { | 576 if (use_openh264) { | 
| 703 deps += [ | 577 deps += [ | 
| 704 "//third_party/openh264:common", | 578 "//third_party/openh264:common", | 
| 705 "//third_party/openh264:encoder", | 579 "//third_party/openh264:encoder", | 
| 706 "//third_party/openh264:processing", | 580 "//third_party/openh264:processing", | 
| 707 ] | 581 ] | 
| 708 } | 582 } | 
| 709 } | |
| 710 | |
| 711 group("gn_only") { | |
| 712 testonly = true | |
| 713 | |
| 714 deps = [] | |
| 715 | 583 | 
| 716 if (!is_ios) { | 584 if (!is_ios) { | 
| 
Dirk Pranke
2017/03/08 02:13:36
Do you feel like merging these conditions with the
 
tfarina
2017/03/08 22:17:54
I'm up to it. But in a follow up, because that way
 | |
| 717 deps += [ | 585 deps += [ | 
| 718 "//media/mojo:media_mojo_unittests", | 586 "//media/mojo:media_mojo_unittests", | 
| 719 "//services:service_unittests", | 587 "//services:service_unittests", | 
| 720 ] | 588 ] | 
| 721 } | 589 } | 
| 722 | 590 | 
| 723 if (!is_android && !is_ios) { | 591 if (!is_android && !is_ios) { | 
| 724 deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ] | 592 deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ] | 
| 725 } | 593 } | 
| 726 | 594 | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 833 if (is_android) { | 701 if (is_android) { | 
| 834 deps += [ "//build/android/gyp/test:hello_world" ] | 702 deps += [ "//build/android/gyp/test:hello_world" ] | 
| 835 } | 703 } | 
| 836 | 704 | 
| 837 if (is_linux && use_ozone) { | 705 if (is_linux && use_ozone) { | 
| 838 deps += [ | 706 deps += [ | 
| 839 "//headless", | 707 "//headless", | 
| 840 "//headless:headless_tests", | 708 "//headless:headless_tests", | 
| 841 ] | 709 ] | 
| 842 } | 710 } | 
| 711 | |
| 712 if (!is_ios) { | |
| 713 deps += [ "//v8:gn_all" ] | |
| 714 } | |
| 715 } | |
| 716 | |
| 717 # TODO(GYP_GONE): This target exists for compatibility with GYP, specifically | |
| 718 # for the iOS bots and the official builders. | |
| 719 group("All") { | |
| 720 testonly = true | |
| 721 | |
| 722 deps = [ | |
| 723 ":gn_all", | |
| 724 ] | |
| 725 } | |
| 726 | |
| 727 # TODO(GYP_GONE): This target exists for compatibility with GYP for the | |
| 728 # builders that specify targets in the recipes directly. | |
| 729 # Ideally it should not exist, and the builders should be specifying | |
| 730 # more specific targets (or 'All') via the source-side | |
| 731 # //testing/buildbot/*.json files. We should simply delete this target | |
| 732 # and update any recipes that are using it. | |
| 733 group("chromium_builder_tests") { | |
| 734 testonly = true | |
| 735 deps = [] | |
| 736 } | |
| 737 | |
| 738 # TODO(GYP_GONE): Figure out if we really need this target or if there's | |
| 739 # some better way to specify things. | |
| 740 if (is_win) { | |
| 741 group("chrome_official_builder_no_unittests") { | |
| 742 deps = [ | |
| 743 "//base/win:eventlog_provider", | |
| 744 "//chrome/installer/gcapi", | |
| 745 "//chrome/installer/mini_installer", | |
| 746 "//cloud_print", | |
| 747 "//cloud_print/virtual_driver/win/port_monitor:copy_gcp_portmon_binaries", | |
| 748 "//components/policy:pack_policy_templates", | |
| 749 "//courgette", | |
| 750 "//courgette:copy_courgette_binaries", | |
| 751 "//remoting/webapp", | |
| 752 ] | |
| 753 | |
| 754 if (target_cpu == "x86") { | |
| 755 if (is_clang) { | |
| 756 deps += [ "//courgette(//build/toolchain/win:clang_x64)" ] | |
| 757 } else { | |
| 758 deps += [ "//courgette(//build/toolchain/win:x64)" ] | |
| 759 } | |
| 760 } | |
| 761 if (is_chrome_branded) { | |
| 762 deps += [ "//remoting/host:remoting_host_installation" ] | |
| 763 } | |
| 764 } | |
| 765 | |
| 766 group("chrome_official_builder") { | |
| 767 testonly = true | |
| 768 | |
| 769 deps = [ | |
| 770 ":chrome_official_builder_no_unittests", | |
| 771 "//base:base_unittests", | |
| 772 "//chrome/test:browser_tests", | |
| 773 "//chrome/test:sync_integration_tests", | |
| 774 "//ipc:ipc_tests", | |
| 775 "//media:media_unittests", | |
| 776 "//media/midi:midi_unittests", | |
| 777 "//net:net_unittests", | |
| 778 "//printing:printing_unittests", | |
| 779 "//sql:sql_unittests", | |
| 780 "//ui/base:ui_base_unittests", | |
| 781 "//ui/gfx:gfx_unittests", | |
| 782 "//ui/touch_selection:ui_touch_selection_unittests", | |
| 783 "//ui/views:views_unittests", | |
| 784 "//url:url_unittests", | |
| 785 ] | |
| 786 } | |
| 787 | |
| 788 group("All_syzygy") { | |
| 789 if (is_syzyasan) { | |
| 790 deps = [ | |
| 791 "//chrome/installer/mini_installer:mini_installer", | |
| 792 "//chrome/installer/mini_installer:mini_installer_syzygy", | |
| 793 ] | |
| 794 } | |
| 795 } | |
| 796 | |
| 797 if (is_syzyasan) { | |
| 798 group("chrome_official_syzyasan_builder") { | |
| 799 deps = [ | |
| 800 ":All_syzygy", | |
| 801 ":chrome_official_builder_no_unittests", | |
| 802 ] | |
| 803 } | |
| 804 } | |
| 805 } | |
| 806 | |
| 807 if (is_chromeos) { | |
| 808 group("chromiumos_preflight") { | |
| 809 testonly = true | |
| 810 deps = [ | |
| 811 "//breakpad:minidump_stackwalk($host_toolchain)", | |
| 812 "//chrome", | |
| 813 "//chrome/test/chromedriver", | |
| 814 "//media:media_unittests", | |
| 815 "//media/gpu:video_decode_accelerator_unittest", | |
| 816 "//media/gpu:video_encode_accelerator_unittest", | |
| 817 "//ppapi/examples/video_decode", | |
| 818 "//sandbox/linux:chrome_sandbox", | |
| 819 "//sandbox/linux:sandbox_linux_unittests", | |
| 820 | |
| 821 # Blocked on https://github.com/catapult-project/catapult/issues/2297 | |
| 822 #"//third_party/catapult/telemetry:bitmaptools", | |
| 823 "//tools/perf/clear_system_cache", | |
| 824 ] | |
| 825 } | |
| 843 } | 826 } | 
| 844 | 827 | 
| 845 group("gn_mojo_targets") { | 828 group("gn_mojo_targets") { | 
| 846 testonly = true | 829 testonly = true | 
| 847 if (is_linux && !is_chromeos) { | 830 if (is_linux && !is_chromeos) { | 
| 848 # TODO(GYP): Figure out if any of these should be in gn_all | 831 # TODO(GYP): Figure out if any of these should be in gn_all | 
| 849 # and figure out how cross-platform they are | 832 # and figure out how cross-platform they are | 
| 850 deps = [ | 833 deps = [ | 
| 851 "//ipc:ipc_tests", | 834 "//ipc:ipc_tests", | 
| 852 "//mojo:tests", | 835 "//mojo:tests", | 
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1093 assert(target_name != "") # Mark as used. | 1076 assert(target_name != "") # Mark as used. | 
| 1094 sources = invoker.actual_sources | 1077 sources = invoker.actual_sources | 
| 1095 assert( | 1078 assert( | 
| 1096 sources == invoker.actual_sources, | 1079 sources == invoker.actual_sources, | 
| 1097 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283") | 1080 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283") | 
| 1098 } | 1081 } | 
| 1099 | 1082 | 
| 1100 assert_valid_out_dir("_unused") { | 1083 assert_valid_out_dir("_unused") { | 
| 1101 actual_sources = [ "$root_build_dir/foo" ] | 1084 actual_sources = [ "$root_build_dir/foo" ] | 
| 1102 } | 1085 } | 
| OLD | NEW |