Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: BUILD.gn

Issue 2692273008: Hacky slashy (Closed)
Patch Set: wip Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | PRESUBMIT.py » ('j') | base/command_line.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 # in files. 31 # in files.
32 root_extra_deps = [] 32 root_extra_deps = []
33 } 33 }
34 34
35 if (is_official_build) { 35 if (is_official_build) {
36 # An official (maximally optimized!) component (optimized for build times) 36 # An official (maximally optimized!) component (optimized for build times)
37 # build doesn't make sense and usually doesn't work. 37 # build doesn't make sense and usually doesn't work.
38 assert(!is_component_build) 38 assert(!is_component_build)
39 } 39 }
40 40
41 is_fuchsia = current_os == "fuchsia"
jamesr 2017/02/17 00:47:35 ideally this would be in https://cs.chromium.org/c
scottmg 2017/02/17 00:50:45 Agreed, I wasn't sure what the general feeling was
42
41 # This file defines the following five main targets: 43 # This file defines the following five main targets:
42 # 44 #
43 # "both_gn_and_gyp" should list every root target (target that nothing else 45 # "both_gn_and_gyp" should list every root target (target that nothing else
44 # depends on) built by GN that is also built in the GYP build. 46 # depends on) built by GN that is also built in the GYP build.
45 # 47 #
46 # "gn_all" should (transitively) cause everything to be built; if you run 48 # "gn_all" should (transitively) cause everything to be built; if you run
47 # 'ninja gn_all' and then 'ninja all', the second build should do no work. 49 # 'ninja gn_all' and then 'ninja all', the second build should do no work.
48 # 50 #
49 # "gn_only" should list every root target that is *not* intended to be built in 51 # "gn_only" should list every root target that is *not* intended to be built in
50 # a GYP build. Because GN has different rules for deciding what an 'all' build 52 # a GYP build. Because GN has different rules for deciding what an 'all' build
(...skipping 21 matching lines...) Expand all
72 74
73 group("gn_all") { 75 group("gn_all") {
74 testonly = true 76 testonly = true
75 77
76 deps = [ 78 deps = [
77 ":both_gn_and_gyp", 79 ":both_gn_and_gyp",
78 ":gn_only", 80 ":gn_only",
79 ":gn_visibility", 81 ":gn_visibility",
80 ] 82 ]
81 83
82 if (!is_ios) { 84 if (!is_ios && !is_fuchsia) {
83 deps += [ "//v8:gn_all" ] 85 deps += [ "//v8:gn_all" ]
84 } 86 }
85 } 87 }
86 88
87 # TODO(GYP_GONE): This target exists for compatibility with GYP, specifically 89 # TODO(GYP_GONE): This target exists for compatibility with GYP, specifically
88 # for the iOS bots and the official builders. 90 # for the iOS bots and the official builders.
89 group("All") { 91 group("All") {
90 testonly = true 92 testonly = true
91 93
92 deps = [ 94 deps = [
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 198 }
197 199
198 # The "both_gn_and_gyp" target should reflect every target that is built 200 # 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 201 # 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. 202 # "both_gn_and_gyp" target in build/gn_migration.gypi line-for-line.
201 group("both_gn_and_gyp") { 203 group("both_gn_and_gyp") {
202 testonly = true 204 testonly = true
203 deps = [ 205 deps = [
204 "//base:base_unittests", 206 "//base:base_unittests",
205 "//chrome/installer", 207 "//chrome/installer",
206 "//components:components_unittests",
207 "//net:net_unittests", 208 "//net:net_unittests",
208 "//skia:skia_unittests",
209 "//sql:sql_unittests", 209 "//sql:sql_unittests",
210 "//tools/ipc_fuzzer:ipc_fuzzer_all", 210 "//tools/ipc_fuzzer:ipc_fuzzer_all",
211 "//ui/base:ui_base_unittests",
212 "//ui/gfx:gfx_unittests",
213 "//url:url_unittests", 211 "//url:url_unittests",
214 ] 212 ]
215 213
216 if (!is_android && !is_chromecast) { 214 if (!is_fuchsia) {
215 deps += [
216 "//components:components_unittests",
217 "//skia:skia_unittests",
218 "//ui/base:ui_base_unittests",
219 "//ui/gfx:gfx_unittests",
220 ]
221 }
222
223 if (!is_android && !is_chromecast && !is_fuchsia) {
217 deps += [ 224 deps += [
218 "//crypto:crypto_unittests", 225 "//crypto:crypto_unittests",
219 "//google_apis/gcm:gcm_unit_tests", 226 "//google_apis/gcm:gcm_unit_tests",
220 ] 227 ]
221 } 228 }
222 229
223 if (!is_ios && !is_android && !is_chromecast) { 230 if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
224 deps += [ 231 deps += [
225 "//chrome", 232 "//chrome",
226 "//chrome/test:browser_tests", 233 "//chrome/test:browser_tests",
227 "//chrome/test:interactive_ui_tests", 234 "//chrome/test:interactive_ui_tests",
228 "//chrome/test:sync_integration_tests", 235 "//chrome/test:sync_integration_tests",
229 "//chrome/test/chromedriver:chromedriver_unittests", 236 "//chrome/test/chromedriver:chromedriver_unittests",
230 "//components/sync/tools:sync_client", 237 "//components/sync/tools:sync_client",
231 "//components/sync/tools:sync_listen_notifications", 238 "//components/sync/tools:sync_listen_notifications",
232 "//extensions:extensions_browsertests", 239 "//extensions:extensions_browsertests",
233 "//extensions:extensions_unittests", 240 "//extensions:extensions_unittests",
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 "//third_party/webrtc/tools:frame_analyzer", 279 "//third_party/webrtc/tools:frame_analyzer",
273 "//tools/battor_agent", 280 "//tools/battor_agent",
274 "//tools/battor_agent:battor_agent_unittests", 281 "//tools/battor_agent:battor_agent_unittests",
275 "//tools/gn", 282 "//tools/gn",
276 "//tools/gn:gn_unittests", 283 "//tools/gn:gn_unittests",
277 "//tools/perf/clear_system_cache", 284 "//tools/perf/clear_system_cache",
278 "//ui/accessibility:accessibility_unittests", 285 "//ui/accessibility:accessibility_unittests",
279 ] 286 ]
280 } 287 }
281 288
282 if (!is_ios) { 289 if (!is_ios && !is_fuchsia) {
283 # TODO(GYP): Figure out which of these should actually build on iOS, 290 # TODO(GYP): Figure out which of these should actually build on iOS,
284 # and whether there should be other targets that are iOS-only and missing. 291 # and whether there should be other targets that are iOS-only and missing.
285 deps += [ 292 deps += [
286 "//cc:cc_unittests", 293 "//cc:cc_unittests",
287 "//chrome/test:telemetry_perf_unittests", 294 "//chrome/test:telemetry_perf_unittests",
288 "//chrome/test:unit_tests", 295 "//chrome/test:unit_tests",
289 "//components:components_browsertests", 296 "//components:components_browsertests",
290 "//components/policy:policy_templates", 297 "//components/policy:policy_templates",
291 "//content/shell:content_shell", 298 "//content/shell:content_shell",
292 "//content/test:content_browsertests", 299 "//content/test:content_browsertests",
(...skipping 23 matching lines...) Expand all
316 "//third_party/angle/src/tests:angle_unittests", 323 "//third_party/angle/src/tests:angle_unittests",
317 "//third_party/catapult/telemetry:bitmaptools($host_toolchain)", 324 "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
318 "//third_party/smhasher:pmurhash", 325 "//third_party/smhasher:pmurhash",
319 "//tools/imagediff($host_toolchain)", 326 "//tools/imagediff($host_toolchain)",
320 "//ui/display:display_unittests", 327 "//ui/display:display_unittests",
321 "//ui/events:events_unittests", 328 "//ui/events:events_unittests",
322 "//ui/gl:gl_unittests", 329 "//ui/gl:gl_unittests",
323 "//ui/touch_selection:ui_touch_selection_unittests", 330 "//ui/touch_selection:ui_touch_selection_unittests",
324 "//url/ipc:url_ipc_unittests", 331 "//url/ipc:url_ipc_unittests",
325 ] 332 ]
326 } else { 333 } else if (is_ios) {
327 deps += [ "//ios:all" ] 334 deps += [ "//ios:all" ]
335 } else if (is_fuchsia) {
336 deps += [ "//fuchsia" ]
328 } 337 }
329 338
330 deps += root_extra_deps 339 deps += root_extra_deps
331 340
332 if (enable_extensions) { 341 if (enable_extensions) {
333 deps += [ "//extensions/shell:app_shell_unittests" ] 342 deps += [ "//extensions/shell:app_shell_unittests" ]
334 } 343 }
335 344
336 if (enable_media_router) { 345 if (enable_media_router) {
337 deps += [ "//chrome/browser/media/router" ] 346 deps += [ "//chrome/browser/media/router" ]
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 "//google_apis:google_apis_unittests", 524 "//google_apis:google_apis_unittests",
516 ] 525 ]
517 } 526 }
518 527
519 if ((is_win || is_mac || is_linux) && 528 if ((is_win || is_mac || is_linux) &&
520 (target_cpu == "x86" || target_cpu == "x64")) { 529 (target_cpu == "x86" || target_cpu == "x64")) {
521 deps += [ "//third_party/swiftshader" ] 530 deps += [ "//third_party/swiftshader" ]
522 } 531 }
523 532
524 # TODO(GYP): Figure out which of these should (and can) build 533 # TODO(GYP): Figure out which of these should (and can) build
525 # for chromeos/ios. 534 # for chromeos/ios/fuchsia.
526 if (!is_chromeos && !is_ios) { 535 if (!is_chromeos && !is_ios && !is_fuchsia) {
527 deps += [ 536 deps += [
528 "//base:build_utf8_validator_tables", 537 "//base:build_utf8_validator_tables",
529 "//base:check_example", 538 "//base:check_example",
530 "//cc:cc_perftests", 539 "//cc:cc_perftests",
531 "//cc/blink:cc_blink_unittests", 540 "//cc/blink:cc_blink_unittests",
532 "//components:components_perftests", 541 "//components:components_perftests",
533 "//components/sync:run_sync_testserver", 542 "//components/sync:run_sync_testserver",
534 "//device:device_unittests", 543 "//device:device_unittests",
535 "//gin:gin_shell", 544 "//gin:gin_shell",
536 "//gin:gin_unittests", 545 "//gin:gin_unittests",
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 ] 687 ]
679 deps -= [ 688 deps -= [
680 "//crypto:crypto_unittests", # TODO(GYP) 689 "//crypto:crypto_unittests", # TODO(GYP)
681 "//net:net_unittests", # TODO(GYP) 690 "//net:net_unittests", # TODO(GYP)
682 ] 691 ]
683 692
684 if (!(is_component_build && is_debug && target_cpu == "x86")) { 693 if (!(is_component_build && is_debug && target_cpu == "x86")) {
685 deps += 694 deps +=
686 [ "//chrome/installer/mini_installer:next_version_mini_installer" ] 695 [ "//chrome/installer/mini_installer:next_version_mini_installer" ]
687 } 696 }
688 } else if (!is_android && !is_ios) { 697 } else if (!is_android && !is_ios && !is_fuchsia) {
689 deps += [ "//breakpad:symupload($host_toolchain)" ] 698 deps += [ "//breakpad:symupload($host_toolchain)" ]
690 } 699 }
691 700
692 if (is_chromecast) { 701 if (is_chromecast) {
693 deps += [ "//chromecast:cast_shell" ] 702 deps += [ "//chromecast:cast_shell" ]
694 } 703 }
695 704
696 if (is_mac || is_win) { 705 if (is_mac || is_win) {
697 deps += [ 706 deps += [
698 "//third_party/crashpad/crashpad/handler:crashpad_handler", 707 "//third_party/crashpad/crashpad/handler:crashpad_handler",
699 "//third_party/crashpad/crashpad/tools:crashpad_database_util", 708 "//third_party/crashpad/crashpad/tools:crashpad_database_util",
700 ] 709 ]
701 } 710 }
702 711
703 if (use_openh264) { 712 if (use_openh264) {
704 deps += [ 713 deps += [
705 "//third_party/openh264:common", 714 "//third_party/openh264:common",
706 "//third_party/openh264:encoder", 715 "//third_party/openh264:encoder",
707 "//third_party/openh264:processing", 716 "//third_party/openh264:processing",
708 ] 717 ]
709 } 718 }
710 } 719 }
711 720
712 group("gn_only") { 721 group("gn_only") {
713 testonly = true 722 testonly = true
714 723
715 deps = [] 724 deps = []
716 725
717 if (!is_ios) { 726 if (!is_ios && !is_fuchsia) {
718 deps += [ 727 deps += [
719 "//media/mojo:media_mojo_unittests", 728 "//media/mojo:media_mojo_unittests",
720 "//services:service_unittests", 729 "//services:service_unittests",
721 ] 730 ]
722 } 731 }
723 732
724 if (!is_android && !is_ios) { 733 if (!is_android && !is_ios && !is_fuchsia) {
725 deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ] 734 deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ]
726 } 735 }
727 736
728 if (!is_android && !is_ios && !is_chromeos) { 737 if (!is_android && !is_ios && !is_chromeos && !is_fuchsia) {
729 deps += [ "//components/proximity_auth:proximity_auth_unittests" ] 738 deps += [ "//components/proximity_auth:proximity_auth_unittests" ]
730 } 739 }
731 740
732 if (is_win || is_linux) { 741 if (is_win || is_linux) {
733 deps += [ 742 deps += [
734 "//mash:all", 743 "//mash:all",
735 "//media/mojo/services:media_service_unittests", 744 "//media/mojo/services:media_service_unittests",
736 "//mojo", 745 "//mojo",
737 "//services/navigation", 746 "//services/navigation",
738 "//services/preferences:tests", 747 "//services/preferences:tests",
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 } 880 }
872 } 881 }
873 882
874 group("gn_visibility") { 883 group("gn_visibility") {
875 deps = [ 884 deps = [
876 "//build/config/sanitizers:options_sources", 885 "//build/config/sanitizers:options_sources",
877 # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility? 886 # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility?
878 # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility? 887 # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility?
879 ] 888 ]
880 889
881 if (!is_ios) { 890 if (!is_ios && !is_fuchsia) {
882 deps += [ 891 deps += [
883 "//v8:postmortem-metadata", 892 "//v8:postmortem-metadata",
884 "//v8:v8_snapshot", 893 "//v8:v8_snapshot",
885 ] 894 ]
886 } 895 }
887 } 896 }
888 897
889 if (!is_ios) { 898 if (!is_ios && !is_fuchsia) {
890 # This group includes all of the targets needed to build and test Blink, 899 # This group includes all of the targets needed to build and test Blink,
891 # including running the layout tests (see below). 900 # including running the layout tests (see below).
892 group("blink_tests") { 901 group("blink_tests") {
893 testonly = true 902 testonly = true
894 903
895 deps = [ 904 deps = [
896 ":webkit_layout_tests", 905 ":webkit_layout_tests",
897 "//third_party/WebKit/public:all_blink", 906 "//third_party/WebKit/public:all_blink",
898 ] 907 ]
899 } 908 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 } 964 }
956 } 965 }
957 966
958 # Add a dummy target for compatibility w/ GYP 967 # Add a dummy target for compatibility w/ GYP
959 group("chromium_swarm_tests") { 968 group("chromium_swarm_tests") {
960 } 969 }
961 970
962 group("chromium_builder_perf") { 971 group("chromium_builder_perf") {
963 testonly = true 972 testonly = true
964 973
965 if (!is_ios && !is_android && !is_chromecast) { 974 if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
966 data_deps = [ 975 data_deps = [
967 "//cc:cc_perftests", 976 "//cc:cc_perftests",
968 "//chrome/test:load_library_perf_tests", 977 "//chrome/test:load_library_perf_tests",
969 "//chrome/test:telemetry_perf_tests", 978 "//chrome/test:telemetry_perf_tests",
970 "//components/tracing:tracing_perftests", 979 "//components/tracing:tracing_perftests",
971 "//gpu:gpu_perftests", 980 "//gpu:gpu_perftests",
972 "//media:media_perftests", 981 "//media:media_perftests",
973 "//tools/perf/chrome_telemetry_build:telemetry_chrome_test", 982 "//tools/perf/chrome_telemetry_build:telemetry_chrome_test",
974 ] 983 ]
975 984
(...skipping 15 matching lines...) Expand all
991 data_deps += [ 1000 data_deps += [
992 "//chrome/installer/mini_installer:mini_installer", 1001 "//chrome/installer/mini_installer:mini_installer",
993 "//chrome/test:angle_perftests", 1002 "//chrome/test:angle_perftests",
994 ] 1003 ]
995 } else { 1004 } else {
996 data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ] 1005 data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
997 } 1006 }
998 } 1007 }
999 } 1008 }
1000 1009
1001 if (!is_ios && !is_android && !is_chromecast) { 1010 if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
1002 group("chromium_builder_asan") { 1011 group("chromium_builder_asan") {
1003 testonly = true 1012 testonly = true
1004 1013
1005 deps = [ 1014 deps = [
1006 "//chrome:chrome", 1015 "//chrome:chrome",
1007 "//content/shell:content_shell", 1016 "//content/shell:content_shell",
1008 "//v8:d8", 1017 "//v8:d8",
1009 ] 1018 ]
1010 if (!is_win) { 1019 if (!is_win) {
1011 deps += [ 1020 deps += [
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 assert(target_name != "") # Mark as used. 1086 assert(target_name != "") # Mark as used.
1078 sources = invoker.actual_sources 1087 sources = invoker.actual_sources
1079 assert( 1088 assert(
1080 sources == invoker.actual_sources, 1089 sources == invoker.actual_sources,
1081 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283") 1090 "Do not use a platform name in your output directory (found \"$root_build_ dir\"). http://crbug.com/548283")
1082 } 1091 }
1083 1092
1084 assert_valid_out_dir("_unused") { 1093 assert_valid_out_dir("_unused") {
1085 actual_sources = [ "$root_build_dir/foo" ] 1094 actual_sources = [ "$root_build_dir/foo" ]
1086 } 1095 }
OLDNEW
« no previous file with comments | « no previous file | PRESUBMIT.py » ('j') | base/command_line.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698