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

Issue 11186038: Don't try to use -MMD / .o.d depfiles for ninja with .s files. (Closed)

Created:
8 years, 2 months ago by Ami GONE FROM CHROMIUM
Modified:
8 years, 2 months ago
Reviewers:
Nico
CC:
gyp-developer_googlegroups.com
Base URL:
http://git.chromium.org/external/gyp.git@master
Visibility:
Public.

Description

Don't try to use -MMD / .o.d depfiles for ninja with .s files. BUG=gyp:297 r1521

Patch Set 1 : . #

Patch Set 2 : with test #

Patch Set 3 : Create empty.s instead of relying on tools to be able to deal with empty files #

Patch Set 4 : Give win32/64 a free pass. #

Total comments: 6

Patch Set 5 : Clarify comment and include explicit empty.s file. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -3 lines) Patch
M pylib/gyp/generator/ninja.py View 2 chunks +8 lines, -1 line 0 comments Download
A test/ninja/s-needs-no-depfiles/empty.s View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A + test/ninja/s-needs-no-depfiles/s-needs-no-depfiles.gyp View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Ami GONE FROM CHROMIUM
8 years, 2 months ago (2012-10-18 00:31:11 UTC) #1
Nico
Needs test. Does Evan's suggestion work too?
8 years, 2 months ago (2012-10-18 00:32:12 UTC) #2
Ami GONE FROM CHROMIUM
On 2012/10/18 00:32:12, Nico wrote: > Needs test. Suggestions of copy/pasta source? > Does Evan's ...
8 years, 2 months ago (2012-10-18 00:43:05 UTC) #3
Ami GONE FROM CHROMIUM
Added a test. Trybots are all grey on rietveld (launched with: git cl try). Can ...
8 years, 2 months ago (2012-10-18 02:39:04 UTC) #4
Ami GONE FROM CHROMIUM
finally have all-green bot runs.
8 years, 2 months ago (2012-10-18 07:04:34 UTC) #5
Nico
lgtm https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py File test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py (right): https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py#newcode9 test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py:9: were used for them (since clang & gcc ...
8 years, 2 months ago (2012-10-18 18:09:39 UTC) #6
Ami GONE FROM CHROMIUM
https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py File test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py (right): https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py#newcode9 test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py:9: were used for them (since clang & gcc ignore ...
8 years, 2 months ago (2012-10-18 18:14:38 UTC) #7
Nico
8 years, 2 months ago (2012-10-18 18:30:21 UTC) #8
(still lgtm)

https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depf...
File test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py (right):

https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depf...
test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py:9: were used for
them (since clang & gcc ignore -MMD when building .s->.o).
On 2012/10/18 18:14:38, Ami Fischman wrote:
> On 2012/10/18 18:09:39, Nico wrote:
> > "when building .s->o on linux" (doesn't happen on os x)
> 
> Are you sure?

Pretty sure. See the ninja-build thread on this, where I checked.

> (does this test pass for you on osx without the corresponding change to
> ninja.py?)

Yes:

hummer:gyp-rw thakis$ python gyptest.py
test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py 
PYTHONPATH=/Volumes/MacintoshHD2/src/gyp-rw/test/lib
TESTGYP_FORMAT=make
/usr/bin/python test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
Invalid test for 'make' format; skipping test.
NO RESULT
TESTGYP_FORMAT=ninja
/usr/bin/python test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
PASSED
TESTGYP_FORMAT=xcode
/usr/bin/python test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
Invalid test for 'xcode' format; skipping test.
NO RESULT

No result from the following 2 tests:
	test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
	test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
hummer:gyp-rw thakis$ svn revert pylib/gyp/generator/ninja.py
Reverted 'pylib/gyp/generator/ninja.py'
^P^Phummer:gyp-rw thakpython gyptest.py
test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py -f ninja
PYTHONPATH=/Volumes/MacintoshHD2/src/gyp-rw/test/lib
TESTGYP_FORMAT=ninja
/usr/bin/python test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py
PASSED
hummer:gyp-rw thakis$

https://codereview.chromium.org/11186038/diff/2005/test/ninja/s-needs-no-depf...
test/ninja/s-needs-no-depfiles/gyptest-s-needs-no-depfiles.py:30:
test.write(os.path.join(test.workdir, 'empty.s'), '')
On 2012/10/18 18:14:38, Ami Fischman wrote:
> On 2012/10/18 18:09:39, Nico wrote:
> > Can't you just check in an empty 'empty.s'?
> 
> I did that with an earlier revision, but it made git try cry b/c one of the
> patching steps apparently can't cope with empty files...

"# This file intentionally left empty." Regular bots can handle empty files too
I think, so maybe that's not even necessary.

Powered by Google App Engine
This is Rietveld 408576698