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

Issue 164023009: Support for custom NM/readelf binaries in your toolchain. (Closed)

Created:
6 years, 10 months ago by Dimi Shahbaz
Modified:
6 years, 3 months ago
CC:
gyp-developer_googlegroups.com, yukawa
Visibility:
Public.

Description

Support for custom NM/readelf binaries in your toolchain. Background: nm and readelf are used by ninja.py to generate .TOC files. These .TOC files are what determine when something needs rebuilding. ninja.py uses distinct commands for host vs target tools for most things in the toolchain (cc, c++, ld,), via make_global_settings, but it fails to do so for nm & readelf. This is not by design, but it has worked thus far by chance: The default 'nm' and 'readelf' in most people's PATH are the system variants, and the Linux versions of these tools happen to work. However, the project I'm working on has engineers on Macs developing for android. The system-supplied 'nm' and 'readelf' on Mac do NOT work for e.g. Android arm binaries, which leads me to this fix. This fix allows for specifying NM and READELF via make_global_settings, so we can point those variables to the correct ones for the given toolchain/target. BUG= R=thakis@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1971

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : bringing up to speed #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 10

Patch Set 11 : addressed comments. #

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Patch Set 15 : #

Total comments: 2

Patch Set 16 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -40 lines) Patch
M pylib/gyp/generator/ninja.py View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +26 lines, -2 lines 1 comment Download
D test/compiler-override/compiler.gyp View 1 chunk +0 lines, -16 lines 0 comments Download
A + test/compiler-override/compiler-exe.gyp View 0 chunks +-1 lines, --1 lines 0 comments Download
A + test/compiler-override/compiler-shared-lib.gyp View 1 chunk +2 lines, -2 lines 0 comments Download
M test/compiler-override/gyptest-compiler-env.py View 1 2 3 4 5 6 7 8 9 10 6 chunks +6 lines, -9 lines 0 comments Download
A test/compiler-override/gyptest-compiler-env-toolchain.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +78 lines, -0 lines 1 comment Download
A + test/compiler-override/my_nm.py View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
A + test/compiler-override/my_readelf.py View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
A test/make_global_settings/full-toolchain/bar.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A test/make_global_settings/full-toolchain/foo.c View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
A test/make_global_settings/full-toolchain/gyptest-make_global_settings.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +47 lines, -0 lines 0 comments Download
A test/make_global_settings/full-toolchain/make_global_settings.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -0 lines 0 comments Download
A + test/make_global_settings/full-toolchain/my_nm.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download
A + test/make_global_settings/full-toolchain/my_readelf.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Dimi Shahbaz
PTAL.
6 years, 10 months ago (2014-02-19 21:08:27 UTC) #1
Nico
What's this for? I'm not sure we want this. gyp doesn't support custom binaries well ...
6 years, 10 months ago (2014-02-19 21:17:09 UTC) #2
Dimi Shahbaz
On 2014/02/19 21:17:09, Nico wrote: > What's this for? With gyp, it's possible to override ...
6 years, 10 months ago (2014-02-19 22:01:24 UTC) #3
Nico
You're only using the target stuff then, not the host stuff? Hm, I wonder how ...
6 years, 10 months ago (2014-02-20 03:32:11 UTC) #4
Dimi Shahbaz
On 2014/02/20 03:32:11, Nico wrote: > You're only using the target stuff then, not the ...
6 years, 10 months ago (2014-02-21 01:26:21 UTC) #5
Ami GONE FROM CHROMIUM
Nico/Mark: I think there's been some confusion in this reviewlog. The core issue is that ...
6 years, 4 months ago (2014-08-20 18:07:41 UTC) #6
Mark Mentovai
Not gonna read the review log, then, but yes, I agree that the distinction between ...
6 years, 4 months ago (2014-08-20 18:29:06 UTC) #7
yukawa
On 2014/08/20 18:07:41, Ami GONE FROM CHROMIUM wrote: > Nico/Mark: I think there's been some ...
6 years, 4 months ago (2014-08-20 20:25:49 UTC) #8
Nico
Re-reading the thread, it sounds like I didn't understand what this was for, and then ...
6 years, 4 months ago (2014-08-20 20:31:47 UTC) #9
Ami GONE FROM CHROMIUM
On 2014/08/20 20:31:47, Nico (afk vacation til Aug 24) wrote: > Re-reading the thread, it ...
6 years, 4 months ago (2014-08-21 18:49:49 UTC) #10
Dimi Shahbaz
Thanks for championing this CL, Ami, and explaining it better than I did. :) I'll ...
6 years, 4 months ago (2014-08-22 08:17:54 UTC) #11
Dimi Shahbaz
Brought this patch up to date. This trybot run should succeed. Also updated the description ...
6 years, 4 months ago (2014-08-26 03:46:35 UTC) #12
Nico
Looks basically fine, but the test won't pass on OS X (and maybe shouldn't), and ...
6 years, 3 months ago (2014-08-27 14:27:05 UTC) #13
Dimi Shahbaz
https://codereview.chromium.org/164023009/diff/520001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/164023009/diff/520001/pylib/gyp/generator/ninja.py#newcode1836 pylib/gyp/generator/ninja.py:1836: 'readelf', GetEnvironFallback(['READELF_target', 'READELF'], readelf)) On 2014/08/27 14:27:05, Nico (hiding) ...
6 years, 3 months ago (2014-08-27 18:25:52 UTC) #14
Nico
https://codereview.chromium.org/164023009/diff/520001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/164023009/diff/520001/pylib/gyp/generator/ninja.py#newcode1836 pylib/gyp/generator/ninja.py:1836: 'readelf', GetEnvironFallback(['READELF_target', 'READELF'], readelf)) On 2014/08/27 18:25:51, Dimi Shahbaz ...
6 years, 3 months ago (2014-08-27 18:52:22 UTC) #15
yukawa
yukawa@chromium.org changed reviewers: + yukawa@chromium.org
6 years, 3 months ago (2014-08-27 22:54:40 UTC) #16
yukawa
https://codereview.chromium.org/164023009/diff/620001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/164023009/diff/620001/pylib/gyp/generator/ninja.py#newcode1948 pylib/gyp/generator/ninja.py:1948: if flavor != 'mac' and flavor != 'win': Nico, ...
6 years, 3 months ago (2014-08-27 22:54:40 UTC) #17
yukawa
yukawa@chromium.org changed reviewers: - yukawa@chromium.org
6 years, 3 months ago (2014-08-27 22:55:21 UTC) #18
Nico
https://codereview.chromium.org/164023009/diff/620001/pylib/gyp/generator/ninja.py File pylib/gyp/generator/ninja.py (right): https://codereview.chromium.org/164023009/diff/620001/pylib/gyp/generator/ninja.py#newcode1948 pylib/gyp/generator/ninja.py:1948: if flavor != 'mac' and flavor != 'win': On ...
6 years, 3 months ago (2014-08-27 22:59:49 UTC) #19
Dimi Shahbaz
OK, addressed the last comment about polluting the ninja master with extra variables. Also, added ...
6 years, 3 months ago (2014-08-27 23:50:04 UTC) #20
Nico
Thanks, ninja.py now looks good. If the try runs are green, the whole patch lgtm. ...
6 years, 3 months ago (2014-08-27 23:53:06 UTC) #21
Nico
They did. Do you need me to land this, or are you a committer?
6 years, 3 months ago (2014-08-28 01:05:35 UTC) #22
Dimi Shahbaz
On 2014/08/28 01:05:35, Nico (hiding) wrote: > They did. Do you need me to land ...
6 years, 3 months ago (2014-08-28 01:31:31 UTC) #23
Torne
On 2014/08/27 22:59:49, Nico (hiding) wrote: > https://codereview.chromium.org/164023009/diff/620001/pylib/gyp/generator/ninja.py > File pylib/gyp/generator/ninja.py (right): > > https://codereview.chromium.org/164023009/diff/620001/pylib/gyp/generator/ninja.py#newcode1948 ...
6 years, 3 months ago (2014-08-28 09:47:18 UTC) #24
Dimi Shahbaz
6 years, 3 months ago (2014-08-28 21:13:08 UTC) #25
Message was sent while issue was closed.
Committed patchset #16 manually as 1971 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698