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

Issue 203303011: Fix None target type with Ninja build. (Closed)

Created:
6 years, 9 months ago by etienneb
Modified:
6 years, 8 months ago
Reviewers:
Torne, scottmg
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Fix None target type with Ninja build. GYP doesn't produce a valid Ninja rule for 'none' target type. These targets are used to make fake dependencies. Here is a minimal GYP file to show the issue: { 'targets': [ { 'target_name': 'dummy', 'type': 'none', 'sources': [ 'test.h', ], }, ], } There is a dummy.ninja file, but there is no rules named 'dummy'. When using the 'msvs-ninja' build, MSVS complains about a missing target and fails to compile the project. Patch from etienneb@chromium.org. BUG= R=scottmg@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1883

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix scottmg comments #

Patch Set 3 : fix nits #

Patch Set 4 : return to patch 1 #

Patch Set 5 : remove sources #

Total comments: 2

Patch Set 6 : fix nits #

Patch Set 7 : nits #

Patch Set 8 : fix unittests. #

Patch Set 9 : nits #

Patch Set 10 : fix unittests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -2 lines) Patch
M pylib/gyp/generator/ninja.py View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
A test/ninja/none-rules/gyptest-none-rules.py View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -0 lines 0 comments Download
A + test/ninja/none-rules/none-rules.gyp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
etienneb
PTAL. Could you launch the try bot. And if it's ok, commit it.
6 years, 9 months ago (2014-03-19 19:41:39 UTC) #1
scottmg
https://codereview.chromium.org/203303011/diff/1/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (left): https://codereview.chromium.org/203303011/diff/1/pylib/gyp/generator/ninja.py#oldcode1150 pylib/gyp/generator/ninja.py:1150: # TODO(evan): don't call this function for 'none' target ...
6 years, 9 months ago (2014-03-19 19:46:56 UTC) #2
etienneb
toughs? https://codereview.chromium.org/203303011/diff/1/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (left): https://codereview.chromium.org/203303011/diff/1/pylib/gyp/generator/ninja.py#oldcode1150 pylib/gyp/generator/ninja.py:1150: # TODO(evan): don't call this function for 'none' ...
6 years, 9 months ago (2014-03-19 19:53:34 UTC) #3
scottmg
https://codereview.chromium.org/203303011/diff/1/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (left): https://codereview.chromium.org/203303011/diff/1/pylib/gyp/generator/ninja.py#oldcode1150 pylib/gyp/generator/ninja.py:1150: # TODO(evan): don't call this function for 'none' target ...
6 years, 9 months ago (2014-03-19 20:04:43 UTC) #4
etienneb
Here is the second version like you may prefer it. I do not have any ...
6 years, 9 months ago (2014-03-19 20:21:10 UTC) #5
scottmg
On 2014/03/19 20:21:10, etienneb wrote: > Here is the second version like you may prefer ...
6 years, 9 months ago (2014-03-19 20:46:27 UTC) #6
etienneb
Revert to patch one. And I disagree with removing the sources. Here is the output ...
6 years, 9 months ago (2014-03-20 14:15:04 UTC) #7
scottmg
On 2014/03/20 14:15:04, etienneb wrote: > Revert to patch one. > And I disagree with ...
6 years, 9 months ago (2014-03-20 17:07:16 UTC) #8
etienneb
On 2014/03/20 17:07:16, scottmg wrote: > On 2014/03/20 14:15:04, etienneb wrote: > > Revert to ...
6 years, 9 months ago (2014-03-20 17:18:38 UTC) #9
etienneb
On 2014/03/20 17:18:38, etienneb wrote: > On 2014/03/20 17:07:16, scottmg wrote: > > On 2014/03/20 ...
6 years, 9 months ago (2014-03-20 18:09:43 UTC) #10
scottmg
otherwise, LGTM https://codereview.chromium.org/203303011/diff/80001/test/ninja/none-rules/none-rules.gyp File test/ninja/none-rules/none-rules.gyp (right): https://codereview.chromium.org/203303011/diff/80001/test/ninja/none-rules/none-rules.gyp#newcode10 test/ninja/none-rules/none-rules.gyp:10: 'sources': [ 'readme.cc' ], remove this and ...
6 years, 9 months ago (2014-03-20 19:14:20 UTC) #11
etienneb
done. But, you need to launch try bots, and commit when it's green. I'm not ...
6 years, 9 months ago (2014-03-20 20:15:38 UTC) #12
scottmg
Committed patchset #10 manually as r1883 (presubmit successful).
6 years, 9 months ago (2014-03-25 01:00:12 UTC) #13
Torne
The gyp-win32 bot has been failing two tests most of the time (but not 100% ...
6 years, 8 months ago (2014-04-09 11:24:25 UTC) #14
Torne
6 years, 8 months ago (2014-04-09 11:24:52 UTC) #15
Message was sent while issue was closed.
On 2014/04/09 11:24:25, Torne wrote:
> The gyp-win32 bot has been failing two tests most of the time (but not 100% of
> the time) since this CL landed, and the trybot results on the patch also show
> the same failure. I really need to roll gyp into chromium for unrelated
reasons,
> so I'm going to revert this change and see if it fixes the win32 tests.

Sorry, forgot to paste the failing tests:

Failed the following 2 tests:
	test\ninja\solibs_avoid_relinking\gyptest-solibs-avoid-relinking.py
	test\win\gyptest-link-restat-importlib.py

Powered by Google App Engine
This is Rietveld 408576698