Chromium Code Reviews| Index: BUILD.gn |
| diff --git a/BUILD.gn b/BUILD.gn |
| index 5485277e5e62397efcd6ed768af2d9d361d9e8a3..75acd2a3b4c04bf5579a48bfc443d5a8fa246094 100644 |
| --- a/BUILD.gn |
| +++ b/BUILD.gn |
| @@ -24,21 +24,47 @@ declare_args() { |
| root_extra_deps = [] |
| } |
| -# The "gn_all" target should list every root target (target that |
| -# nothing else depends on) built by both GN and GYP. One should |
| -# be able to run 'ninja gn_all gn_only gn_groups' and then run |
| -# 'ninja' a second time and have the second ninja invocation do nothing. |
| +# This file defines the following four main targets: |
| # |
| -# In addition, the "gn_all" target serves to pull in all of the other |
| -# build files needed for the build. |
| +# "both_gn_and_gyp" should list every root target (target that nothing else |
| +# depends on) built by GN that is also built in the GYP build. |
| # |
| -# TODO(GYP): make sure that the above is true and there are scripts run |
| -# on the bots that enforce this. |
| +# "gn_all" should (transitively) cause everything to be built; if you run |
| +# 'ninja gn_all' and then 'ninja all', the second build should do no work. |
| +# |
| +# "gn_groups" should list any group targets that are not picked up by one of |
| +# the other targets; this is a separate target to ensure that when we build it, |
| +# only stamp files are updated and we don't actually pick up additional actual |
| +# targets that aren't listed in the above. |
| +# |
| +# "gn_only" should list every root target that is *not* intended to be built |
| +# in a GYP build. Because GN has different rules for deciding what an 'all' |
| +# build is, this may end up including targets that are actually defined in a |
| +# GYP build but not dependencies of GYP's "all" (and so not actually built). |
| +# |
| +# TODO(GYP): crbug.com/481694. Make sure that the above is true and there are |
| +# scripts run on the bots that enforce this. Once the GYP migration is over, |
| +# we can collapse all of these targets as desired. |
| group("gn_all") { |
| testonly = true |
| deps = [ |
| + ":both_gn_and_gyp", |
| + ":gn_only", |
| + ":gn_groups", |
| + ] |
| +} |
| + |
| +# The "both_gn_and_gyp" target should reflect every target that is built |
| +# in both the GN and GYP builds, and ideally it should match the |
| +# "both_gn_and_gyp" target in build/gn_migration.gypi line-for-line. |
| +# |
| +# TODO(GYP): Add build steps that check and enforce this on the bots. |
| +group("both_gn_and_gyp") { |
| + testonly = true |
| + |
| + deps = [ |
| "//base:base_unittests", |
| "//cc:cc_unittests", |
| "//chrome", |
| @@ -62,7 +88,6 @@ group("gn_all") { |
| "//ipc:ipc_tests", |
| "//ipc/mojo:ipc_mojo_unittests", |
| "//jingle:jingle_unittests", |
| - "//mandoline:mandoline_all", |
| "//media:media_unittests", |
| "//media/cast:cast_unittests", |
| "//mojo", |
| @@ -553,7 +578,9 @@ group("gn_all") { |
| group("gn_only") { |
| testonly = true |
| - deps = [] |
| + deps = [ |
| + "//mandoline:mandoline_all", |
| + ] |
| if (!is_android && !is_ios) { |
| deps += [ "//components/proximity_auth:proximity_auth_unittests" ] |
| @@ -677,6 +704,20 @@ group("gn_mojo_targets") { |
| } |
| } |
| +group("gn_groups") { |
|
brettw
2015/04/28 19:26:10
I don't understand why this exists.
|
| + testonly = true |
| + |
| + deps = [ |
| + ":gn_visibility", |
| + ] |
| + |
| + if (is_linux) { |
| + deps += [ ":linux_default_tests" ] |
| + } else if (is_win) { |
| + deps += [ ":win_default_tests" ] |
| + } |
| +} |
| + |
| group("gn_visibility") { |
| deps = [ |
| # "//build/config/sanitizers:options_sources", |