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

Issue 24803004: Add an option to prune unwanted targets (Closed)

Created:
7 years, 2 months ago by Shezan Baig (Bloomberg)
Modified:
7 years, 2 months ago
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Add an option to prune targets Normally, when a target in file1.gyp depends on a target in file2.gyp, gyp will generate projects for all targets in file2.gyp, even if the target in file1.gyp does not depend on all of them. This patch adds a '--root-target' command-line option, which allows users to specify a list of "root" targets in the dependency tree. When this list is provided, gyp will only generate projects for targets that are deep dependencies of these root targets. As an example, when used in the chromium repository, running 'gyp_chromium' with 'content.gyp' generates 397 subninja files. With '--root-target=content' specified, this is reduced to just 260 subninja files. BUG= R=mark@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1745

Patch Set 1 #

Total comments: 3

Patch Set 2 : prune based on a set of root targets instead of build_files #

Total comments: 4

Patch Set 3 : incorporate review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -12 lines) Patch
M pylib/gyp/__init__.py View 1 2 3 chunks +6 lines, -2 lines 0 comments Download
M pylib/gyp/common.py View 1 1 chunk +8 lines, -0 lines 0 comments Download
M pylib/gyp/input.py View 1 3 chunks +27 lines, -1 line 0 comments Download
A test/prune_targets/gyptest-prune-targets.py View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A + test/prune_targets/lib1.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
A + test/prune_targets/lib2.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
A + test/prune_targets/lib3.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
A + test/prune_targets/lib_indirect.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download
A + test/prune_targets/program.cc View 1 1 chunk +1 line, -1 line 0 comments Download
A test/prune_targets/test1.gyp View 1 1 chunk +26 lines, -0 lines 0 comments Download
A test/prune_targets/test2.gyp View 1 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Shezan Baig (Bloomberg)
Adding a new option to reduce the number of subninja files generated.
7 years, 2 months ago (2013-09-26 21:40:01 UTC) #1
scottmg
Seems fine. I'll defer to Nico and Mark on whether they have any reservations about ...
7 years, 2 months ago (2013-09-26 22:11:07 UTC) #2
Mark Mentovai
We’ve got a couple of concepts here: files and targets. The existing architecture basically prunes ...
7 years, 2 months ago (2013-09-26 22:57:18 UTC) #3
Torne
So the Android generator already has a generator flag "limit_to_target_all" which I think does the ...
7 years, 2 months ago (2013-09-27 10:05:01 UTC) #4
Shezan Baig (Bloomberg)
On 2013/09/27 10:05:01, Torne wrote: > So the Android generator already has a generator flag ...
7 years, 2 months ago (2013-09-27 13:02:02 UTC) #5
Shezan Baig (Bloomberg)
PTAL. Instead of a boolean '--prune-targets', gyp now accepts a list of '--target=TARGET' arguments. These ...
7 years, 2 months ago (2013-09-27 15:08:26 UTC) #6
Torne
On 2013/09/27 15:08:26, Shezan Baig (Bloomberg) wrote: > PTAL. Instead of a boolean '--prune-targets', gyp ...
7 years, 2 months ago (2013-09-27 15:12:40 UTC) #7
Mark Mentovai
I’ll be out until Tuesday, I won’t be able to look again until then.
7 years, 2 months ago (2013-09-27 15:18:26 UTC) #8
Shezan Baig (Bloomberg)
On 2013/09/27 15:12:40, Torne wrote: > So if I were to change my config to ...
7 years, 2 months ago (2013-09-27 15:22:39 UTC) #9
Torne
On 2013/09/27 15:12:40, Torne wrote: > On 2013/09/27 15:08:26, Shezan Baig (Bloomberg) wrote: > > ...
7 years, 2 months ago (2013-09-27 15:23:29 UTC) #10
Torne
On 2013/09/27 15:22:39, Shezan Baig (Bloomberg) wrote: > On 2013/09/27 15:12:40, Torne wrote: > > ...
7 years, 2 months ago (2013-09-27 15:32:07 UTC) #11
Shezan Baig (Bloomberg)
On 2013/09/27 15:32:07, Torne wrote: > On 2013/09/27 15:22:39, Shezan Baig (Bloomberg) wrote: > > ...
7 years, 2 months ago (2013-09-27 15:54:51 UTC) #12
Mark Mentovai
https://codereview.chromium.org/24803004/diff/9001/pylib/gyp/__init__.py File pylib/gyp/__init__.py (right): https://codereview.chromium.org/24803004/diff/9001/pylib/gyp/__init__.py#newcode340 pylib/gyp/__init__.py:340: parser.add_option('-T', '--target', dest='root_targets', action='append', --target isn’t a descriptive enough ...
7 years, 2 months ago (2013-10-01 18:37:05 UTC) #13
Shezan Baig (Bloomberg)
On 2013/10/01 18:37:05, Mark Mentovai wrote: > https://codereview.chromium.org/24803004/diff/9001/pylib/gyp/__init__.py > File pylib/gyp/__init__.py (right): > > https://codereview.chromium.org/24803004/diff/9001/pylib/gyp/__init__.py#newcode340 ...
7 years, 2 months ago (2013-10-01 19:24:26 UTC) #14
Mark Mentovai
LGTM
7 years, 2 months ago (2013-10-01 20:49:37 UTC) #15
Shezan Baig (Bloomberg)
Committed patchset #3 manually as r1745 (presubmit successful).
7 years, 2 months ago (2013-10-01 20:58:57 UTC) #16
Shezan Baig (Bloomberg)
7 years, 2 months ago (2013-10-01 23:17:49 UTC) #17
Message was sent while issue was closed.
On 2013/10/01 20:58:57, Shezan Baig (Bloomberg) wrote:
> Committed patchset #3 manually as r1745 (presubmit successful).

There was a problem with the test on xcode.  I will revert this:
https://codereview.chromium.org/25398003/

Powered by Google App Engine
This is Rietveld 408576698