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

Issue 784413004: Add support for a 'default' target to GN. (Closed)

Created:
6 years ago by Dirk Pranke
Modified:
6 years ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina, Nick Bray (chromium)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add support for a 'default' target to GN. Many build systems (including make and ninja) have the concept of a "default" target that should be built if you don't specify something explicitly to build: in make, it's the first target found in the Makefile; in ninja it is the target declared with the "default" directive, and if that isn't found, the first target in the ninja file. This CL adds the ability to set the "default" target in the GN file; if it isn't set, we use GN's prior behavior, which is to use "all" as the default target, and build everything. R=brettw@chromium.org BUG=440644 Committed: https://crrev.com/576ecade9157d40a85f5b7b8b724199dedd2a006 Cr-Commit-Position: refs/heads/master@{#307770}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M tools/gn/ninja_build_writer.cc View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Dirk Pranke
Brett, I think this is as we've discussed. I didn't add a test for this ...
6 years ago (2014-12-10 03:17:41 UTC) #1
brettw
lgtm
6 years ago (2014-12-10 18:02:26 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/784413004/1
6 years ago (2014-12-10 18:07:24 UTC) #4
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/5989)
6 years ago (2014-12-10 18:17:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/784413004/1
6 years ago (2014-12-10 20:49:59 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
6 years ago (2014-12-10 21:38:01 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/576ecade9157d40a85f5b7b8b724199dedd2a006 Cr-Commit-Position: refs/heads/master@{#307770}
6 years ago (2014-12-10 21:38:49 UTC) #10
Nico
Re CL description: """ in ninja it is the target declared with the "default" directive, ...
6 years ago (2014-12-10 23:14:32 UTC) #11
Dirk Pranke
6 years ago (2014-12-10 23:16:16 UTC) #12
Message was sent while issue was closed.
On 2014/12/10 23:14:32, Nico wrote:
> Re CL description:
> 
> """
>  in ninja
> it is the target declared with the "default" directive, and
> if that isn't found, the first target in the ninja file.
> """
> 
> This is not true. If there's no explicit "default", ninja builds all targets
> without out edges by default: that is, all targets that are "final products".
> That's equivalent to executing all edges in the build graph.

Oh, I guess I misremembered. Thanks for the correction. Too bad the patch
already landed :(.

Powered by Google App Engine
This is Rietveld 408576698