 Chromium Code Reviews
 Chromium Code Reviews Issue 1104213005:
  Rework definitions of 'gn_all' and related targets.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@mandoline_fix
    
  
    Issue 1104213005:
  Rework definitions of 'gn_all' and related targets.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@mandoline_fix| 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 | 
| 11 import("//build/config/crypto.gni") | 11 import("//build/config/crypto.gni") | 
| 12 import("//build/config/features.gni") | 12 import("//build/config/features.gni") | 
| 13 import("//build/config/ui.gni") | 13 import("//build/config/ui.gni") | 
| 14 import("//build/module_args/v8.gni") | 14 import("//build/module_args/v8.gni") | 
| 15 | 15 | 
| 16 if (is_android) { | 16 if (is_android) { | 
| 17 import("//build/config/android/config.gni") | 17 import("//build/config/android/config.gni") | 
| 18 } | 18 } | 
| 19 | 19 | 
| 20 declare_args() { | 20 declare_args() { | 
| 21 # A list of extra dependencies to add to the root target. This allows a | 21 # A list of extra dependencies to add to the root target. This allows a | 
| 22 # checkout to add additional targets without explicitly changing any checked- | 22 # checkout to add additional targets without explicitly changing any checked- | 
| 23 # in files. | 23 # in files. | 
| 24 root_extra_deps = [] | 24 root_extra_deps = [] | 
| 25 } | 25 } | 
| 26 | 26 | 
| 27 # The "gn_all" target should list every root target (target that | 27 # This file defines the following four main targets: | 
| 28 # nothing else depends on) built by both GN and GYP. One should | |
| 29 # be able to run 'ninja gn_all gn_only gn_groups' and then run | |
| 30 # 'ninja' a second time and have the second ninja invocation do nothing. | |
| 31 # | 28 # | 
| 32 # In addition, the "gn_all" target serves to pull in all of the other | 29 # "both_gn_and_gyp" should list every root target (target that nothing else | 
| 33 # build files needed for the build. | 30 # depends on) built by GN that is also built in the GYP build. | 
| 34 # | 31 # | 
| 35 # TODO(GYP): make sure that the above is true and there are scripts run | 32 # "gn_all" should (transitively) cause everything to be built; if you run | 
| 36 # on the bots that enforce this. | 33 # 'ninja gn_all' and then 'ninja all', the second build should do no work. | 
| 34 # | |
| 35 # "gn_groups" should list any group targets that are not picked up by one of | |
| 36 # the other targets; this is a separate target to ensure that when we build it, | |
| 37 # only stamp files are updated and we don't actually pick up additional actual | |
| 38 # targets that aren't listed in the above. | |
| 39 # | |
| 40 # "gn_only" should list every root target that is *not* intended to be built | |
| 41 # in a GYP build. Because GN has different rules for deciding what an 'all' | |
| 42 # build is, this may end up including targets that are actually defined in a | |
| 43 # GYP build but not dependencies of GYP's "all" (and so not actually built). | |
| 44 # | |
| 45 # TODO(GYP): crbug.com/481694. Make sure that the above is true and there are | |
| 46 # scripts run on the bots that enforce this. Once the GYP migration is over, | |
| 47 # we can collapse all of these targets as desired. | |
| 37 | 48 | 
| 38 group("gn_all") { | 49 group("gn_all") { | 
| 39 testonly = true | 50 testonly = true | 
| 40 | 51 | 
| 41 deps = [ | 52 deps = [ | 
| 53 ":both_gn_and_gyp", | |
| 54 ":gn_only", | |
| 55 ":gn_groups", | |
| 56 ] | |
| 57 } | |
| 58 | |
| 59 # The "both_gn_and_gyp" target should reflect every target that is built | |
| 60 # in both the GN and GYP builds, and ideally it should match the | |
| 61 # "both_gn_and_gyp" target in build/gn_migration.gypi line-for-line. | |
| 62 # | |
| 63 # TODO(GYP): Add build steps that check and enforce this on the bots. | |
| 64 group("both_gn_and_gyp") { | |
| 65 testonly = true | |
| 66 | |
| 67 deps = [ | |
| 42 "//base:base_unittests", | 68 "//base:base_unittests", | 
| 43 "//cc:cc_unittests", | 69 "//cc:cc_unittests", | 
| 44 "//chrome", | 70 "//chrome", | 
| 45 "//chrome/test:browser_tests", | 71 "//chrome/test:browser_tests", | 
| 46 "//chrome/test:interactive_ui_tests", | 72 "//chrome/test:interactive_ui_tests", | 
| 47 "//chrome/test:sync_integration_tests", | 73 "//chrome/test:sync_integration_tests", | 
| 48 "//chrome/test:unit_tests", | 74 "//chrome/test:unit_tests", | 
| 49 "//chrome/test/chromedriver:chromedriver_unittests", | 75 "//chrome/test/chromedriver:chromedriver_unittests", | 
| 50 "//components:components_browsertests", | 76 "//components:components_browsertests", | 
| 51 "//components:components_unittests", | 77 "//components:components_unittests", | 
| 52 "//content/shell:content_shell", | 78 "//content/shell:content_shell", | 
| 53 "//content/test:content_browsertests", | 79 "//content/test:content_browsertests", | 
| 54 "//content/test:content_perftests", | 80 "//content/test:content_perftests", | 
| 55 "//content/test:content_unittests", | 81 "//content/test:content_unittests", | 
| 56 "//crypto:crypto_unittests", | 82 "//crypto:crypto_unittests", | 
| 57 "//device:device_unittests", | 83 "//device:device_unittests", | 
| 58 "//extensions:extensions_browsertests", | 84 "//extensions:extensions_browsertests", | 
| 59 "//extensions:extensions_unittests", | 85 "//extensions:extensions_unittests", | 
| 60 "//google_apis/gcm:gcm_unit_tests", | 86 "//google_apis/gcm:gcm_unit_tests", | 
| 61 "//gpu:gpu_unittests", | 87 "//gpu:gpu_unittests", | 
| 62 "//ipc:ipc_tests", | 88 "//ipc:ipc_tests", | 
| 63 "//ipc/mojo:ipc_mojo_unittests", | 89 "//ipc/mojo:ipc_mojo_unittests", | 
| 64 "//jingle:jingle_unittests", | 90 "//jingle:jingle_unittests", | 
| 65 "//mandoline:mandoline_all", | |
| 66 "//media:media_unittests", | 91 "//media:media_unittests", | 
| 67 "//media/cast:cast_unittests", | 92 "//media/cast:cast_unittests", | 
| 68 "//mojo", | 93 "//mojo", | 
| 69 "//mojo/application", | 94 "//mojo/application", | 
| 70 "//mojo/common:mojo_common_unittests", | 95 "//mojo/common:mojo_common_unittests", | 
| 71 "//net:hpack_example_generator", | 96 "//net:hpack_example_generator", | 
| 72 "//net:hpack_fuzz_mutator", | 97 "//net:hpack_fuzz_mutator", | 
| 73 "//net:hpack_fuzz_wrapper", | 98 "//net:hpack_fuzz_wrapper", | 
| 74 "//net:net_perftests", | 99 "//net:net_perftests", | 
| 75 "//net:net_unittests", | 100 "//net:net_unittests", | 
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 546 "//net:net_unittests", # TODO(GYP) | 571 "//net:net_unittests", # TODO(GYP) | 
| 547 ] | 572 ] | 
| 548 } else if (!is_android) { | 573 } else if (!is_android) { | 
| 549 deps += [ "//breakpad:symupload" ] | 574 deps += [ "//breakpad:symupload" ] | 
| 550 } | 575 } | 
| 551 } | 576 } | 
| 552 | 577 | 
| 553 group("gn_only") { | 578 group("gn_only") { | 
| 554 testonly = true | 579 testonly = true | 
| 555 | 580 | 
| 556 deps = [] | 581 deps = [ | 
| 582 "//mandoline:mandoline_all", | |
| 583 ] | |
| 557 | 584 | 
| 558 if (!is_android && !is_ios) { | 585 if (!is_android && !is_ios) { | 
| 559 deps += [ "//components/proximity_auth:proximity_auth_unittests" ] | 586 deps += [ "//components/proximity_auth:proximity_auth_unittests" ] | 
| 560 } | 587 } | 
| 561 | 588 | 
| 562 if (is_linux && !is_chromeos) { | 589 if (is_linux && !is_chromeos) { | 
| 563 # TODO(GYP): Figure out if any of these should be in gn_all | 590 # TODO(GYP): Figure out if any of these should be in gn_all | 
| 564 # and figure out how cross-platform they are | 591 # and figure out how cross-platform they are | 
| 565 deps += [ | 592 deps += [ | 
| 566 ":gn_mojo_targets", | 593 ":gn_mojo_targets", | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 670 "//third_party/mojo/src/mojo/edk/js/test:js_integration_tests", | 697 "//third_party/mojo/src/mojo/edk/js/test:js_integration_tests", | 
| 671 "//third_party/mojo/src/mojo/edk/js/tests:js_to_cpp_bindings_python", | 698 "//third_party/mojo/src/mojo/edk/js/tests:js_to_cpp_bindings_python", | 
| 672 "//third_party/mojo/src/mojo/public/python:packaged_application", | 699 "//third_party/mojo/src/mojo/public/python:packaged_application", | 
| 673 "//third_party/mojo/src/mojo/public/python:packaged_bindings", | 700 "//third_party/mojo/src/mojo/public/python:packaged_bindings", | 
| 674 "//third_party/mojo/src/mojo/public/cpp/application:test_support_standalon e", | 701 "//third_party/mojo/src/mojo/public/cpp/application:test_support_standalon e", | 
| 675 "//third_party/mojo_services/src/accessibility/public/interfaces:interface s_python", | 702 "//third_party/mojo_services/src/accessibility/public/interfaces:interface s_python", | 
| 676 ] | 703 ] | 
| 677 } | 704 } | 
| 678 } | 705 } | 
| 679 | 706 | 
| 707 group("gn_groups") { | |
| 
brettw
2015/04/28 19:26:10
I don't understand why this exists.
 | |
| 708 testonly = true | |
| 709 | |
| 710 deps = [ | |
| 711 ":gn_visibility", | |
| 712 ] | |
| 713 | |
| 714 if (is_linux) { | |
| 715 deps += [ ":linux_default_tests" ] | |
| 716 } else if (is_win) { | |
| 717 deps += [ ":win_default_tests" ] | |
| 718 } | |
| 719 } | |
| 720 | |
| 680 group("gn_visibility") { | 721 group("gn_visibility") { | 
| 681 deps = [ | 722 deps = [ | 
| 682 # "//build/config/sanitizers:options_sources", | 723 # "//build/config/sanitizers:options_sources", | 
| 683 # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility? | 724 # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility? | 
| 684 # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility? | 725 # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility? | 
| 685 # "//ui/resources:repack_ui_test_mac_locale_pack", | 726 # "//ui/resources:repack_ui_test_mac_locale_pack", | 
| 686 # "//v8:v8_snapshot", # TODO(GYP): visibility? | 727 # "//v8:v8_snapshot", # TODO(GYP): visibility? | 
| 687 # "//v8:postmortem-metadata", # TODO(GYP): visibility? | 728 # "//v8:postmortem-metadata", # TODO(GYP): visibility? | 
| 688 ] | 729 ] | 
| 689 } | 730 } | 
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 820 "//url:url_unittests", # PASSES 4/17/2015 | 861 "//url:url_unittests", # PASSES 4/17/2015 | 
| 821 | 862 | 
| 822 # TODO(GYP) installer_util_unittests | 863 # TODO(GYP) installer_util_unittests | 
| 823 # TODO(GYP) app_installer_unittests | 864 # TODO(GYP) app_installer_unittests | 
| 824 # TODO(GYP) nacl_integration | 865 # TODO(GYP) nacl_integration | 
| 825 # TODO(GYP) telemetry_perf_unittests | 866 # TODO(GYP) telemetry_perf_unittests | 
| 826 # TODO(GYP) telemetry_unittests | 867 # TODO(GYP) telemetry_unittests | 
| 827 ] | 868 ] | 
| 828 } | 869 } | 
| 829 } | 870 } | 
| OLD | NEW |