Commit ddc17490 authored by dpranke's avatar dpranke Committed by Commit bot

Rework definitions of 'gn_all' and related targets.

The 'gn_all' target in src/BUILD.gn didn't actually build everything,
which could be confusing. This patch renames the target to 'both_gn_and_gyp'
which should make the intent clearer, and reworks the accompanyhing
targets in both the GN and GYP builds to match.

R=jam@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1104213005

Cr-Commit-Position: refs/heads/master@{#327411}
parent e59aa5de
......@@ -24,20 +24,40 @@ 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 three 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_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",
]
}
# 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",
......@@ -62,7 +82,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 +572,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" ]
......
......@@ -2,36 +2,40 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file defines three targets that we are using to
# track the progress of the GYP->GN migration:
# This file defines five targets that we are using to track the progress of the
# GYP->GN migration:
#
# If you run 'ninja gn_build gyp_remaining gyp_groups', and then
# run 'ninja', the second ninja invocation should do nothing. This
# indicates that everything built by a ninja build is in fact
# listed in one of these targets.
# 'both_gn_and_gyp' lists what GN is currently capable of building and should
# match the 'both_gn_and_gyp' target in //BUILD.gn.
#
# 'gn_all' lists what GN is currently capable of building and should
# match the 'gn_all' target in //BUILD.gn.
# 'gyp_all' Should include everything built when building "all"; i.e., if you
# type 'ninja gyp_all' and then 'ninja all', the second build should do
# nothing. 'gyp_all' should just depend on the other four targets.
#
# 'gyp_remaining' lists all of the targets that still need to be converted,
# i.e., all of the other (non-empty) targets that a GYP build
# will build.
# 'gyp_only' lists any targets that are not meant to be ported over to the GN
# build.
#
# 'gyp_groups' lists any empty (group) targets in the GYP build that
# are not picked up by gn_all or gyp_remaining; this is a
# separate target to ensure that when we build it, only
# stamp targets file are we don't accidentally pick up something
# not listed in one of the other two targets.
# 'gyp_remaining' lists all of the targets that still need to be converted,
# i.e., all of the other (non-empty) targets that a GYP build will build.
#
# TODO(GYP), TODO(dpranke) Add a build step to the bot that enforces the
# above contracts.
# TODO(GYP): crbug.com/481694. Add a build step to the bot that enforces the
# above contracts.
{
'targets': [
{
# This target should mirror the structure of //:gn_all
# as closely as possible, for ease of comparison.
'target_name': 'gn_all',
'target_name': 'gyp_all',
'type': 'none',
'dependencies': [
'both_gn_and_gyp',
'gyp_only',
'gyp_remaining',
]
},
{
# This target should mirror the structure of //:both_gn_and_gyp
# in src/BUILD.gn as closely as possible, for ease of comparison.
'target_name': 'both_gn_and_gyp',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_i18n_perftests',
......@@ -666,39 +670,6 @@
}],
],
},
{
# This target, when built, should cause no actual work
# to be done, just update a bunch of stamp files.
'target_name': 'gyp_groups',
'type': 'none',
'dependencies': [
'All',
'blink_tests',
'chromium_builder_asan',
'chromium_builder_chromedriver',
'chromium_builder_perf',
'chromium_builder_tests',
'chromium_builder_webrtc',
'chromium_gpu_builder',
'chromium_gpu_debug_builder',
],
'conditions': [
['use_aura==1', {
'dependencies': [
'aura_builder',
]
}],
['OS=="win"', {
'dependencies': [
'chromium_builder',
'chromium_builder_dbg_drmemory_win',
'chromium_builder_nacl_sdk',
'chromium_builder_lkgr_drmemory_win',
'chromium_builder_dbg_tsan_win',
],
}],
],
},
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment