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

Issue 23916002: ninja/mac: Don't write an empty binary into sourceless bundles. (Closed)

Created:
7 years, 3 months ago by Nico
Modified:
7 years, 3 months ago
CC:
gyp-developer_googlegroups.com, Evan Martin
Visibility:
Public.

Description

ninja/mac: Don't write an empty binary into sourceless bundles. I fixed this issue once in https://codereview.chromium.org/9121011/ but added the test in the wrong way so that it's not run automatically, and https://codereview.chromium.org/9107028 broke that again. Rename the test from .gyp to .py to make sure the bots run it, so that it doesn't break again. BUG=chromium:280718 R=mark@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1709

Patch Set 1 #

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -49 lines) Patch
M pylib/gyp/generator/ninja.py View 1 3 chunks +8 lines, -4 lines 2 comments Download
D test/mac/gyptest-sourceless-module.gyp View 1 chunk +0 lines, -46 lines 0 comments Download
A + test/mac/gyptest-sourceless-module.py View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Nico
I'd send this to Scott, but he's out until tomorrow. It's mostly a no-op change. ...
7 years, 3 months ago (2013-09-03 19:47:20 UTC) #1
Mark Mentovai
LGTM
7 years, 3 months ago (2013-09-03 20:00:48 UTC) #2
Nico
Committed patchset #2 manually as r1709 (presubmit successful).
7 years, 3 months ago (2013-09-03 20:03:14 UTC) #3
justincohen
https://codereview.chromium.org/23916002/diff/7001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/23916002/diff/7001/pylib/gyp/generator/ninja.py#newcode482 pylib/gyp/generator/ninja.py:482: is_empty_bundle = not link_deps and not mac_bundle_depends This breaks ...
7 years, 3 months ago (2013-09-06 14:06:05 UTC) #4
Nico
7 years, 3 months ago (2013-09-06 14:10:16 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/23916002/diff/7001/pylib/gyp/generator/ninja.py
File pylib/gyp/generator/ninja.py (right):

https://codereview.chromium.org/23916002/diff/7001/pylib/gyp/generator/ninja....
pylib/gyp/generator/ninja.py:482: is_empty_bundle = not link_deps and not
mac_bundle_depends
On 2013/09/06 14:06:05, justincohen wrote:
> This breaks some bundles we depend on that are only mac_bundle_resources.  In
> this case, mac_bundle_depends is not nil, but since line 478 evaluates to
False,
> this will never run.  Is there a reason this is nested inside #478?  Why not
> just check for not link_deps and not mac_bundle_depends on line 477?

Sounds reasonable.

> This CL breaks ninja for iOS builds.  Perhaps one of the bundles we depend on
is
> doing something wrong?

Not sure, this CL explicitly is about supporting sourceless bundles (i.e. just
mac_bundle_resources) better, see the tests. I'm guessing your sourceless
bundles look slightly different? I suggest adding a demo of your problem to
test/mac/sourceless-bundle/test.gyp / test/mac/gyptest-sourceless-bundle.py and
then sending a CL with that test and your proposed fix.

Powered by Google App Engine
This is Rietveld 408576698