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

Issue 157583011: Fix generation for ninja of multiarch executable targets (Closed)

Created:
6 years, 10 months ago by sdefresne
Modified:
6 years, 10 months ago
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Fix generation for ninja of multiarch executable targets Chromium includes some targets that should only be compiled on specific platform and end up with an empty 'sources' list. This works when generating for a single architecture, but fails with the following callstack when building for multiarch: Traceback (most recent call last): File "./gyp/gyp_main.py", line 18, in <module> sys.exit(gyp.script_main()) File "./gyp/pylib/gyp/__init__.py", line 534, in script_main return main(sys.argv[1:]) File "./gyp/pylib/gyp/__init__.py", line 527, in main return gyp_main(args) File "./gyp/pylib/gyp/__init__.py", line 512, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "./gyp/pylib/gyp/generator/ninja.py", line 2160, in GenerateOutput config_name) File "./gyp/pylib/gyp/generator/ninja.py", line 2078, in GenerateOutputForConfig target = writer.WriteSpec(spec, config_name, generator_flags) File "./gyp/pylib/gyp/generator/ninja.py", line 488, in WriteSpec self.target.actions_stamp or actions_depends) File "./gyp/pylib/gyp/generator/ninja.py", line 1180, in WriteTarget self.target.binary = self.WriteLink(spec, config_name, config, link_deps) File "./gyp/pylib/gyp/generator/ninja.py", line 972, in WriteLink for arch in self.archs] TypeError: list indices must be integers, not str This is because |link_deps| must be a dictionary keying |arch| to a list of link dependencies when building for multiarch, but if 'sources' is empty, |link_deps| keep its default value (empty list). BUG=314720 R=justincohen@chromium.org, mark@chromium.org, justincohen, mark Committed: https://code.google.com/p/gyp/source/detail?r=1852

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
M pylib/gyp/generator/ninja.py View 2 chunks +3 lines, -0 lines 0 comments Download
M test/mac/archs/test-archs-multiarch.gyp View 1 chunk +12 lines, -0 lines 1 comment Download
M test/mac/gyptest-archs.py View 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
sdefresne
PTAL
6 years, 10 months ago (2014-02-12 14:31:13 UTC) #1
sdefresne
+mark
6 years, 10 months ago (2014-02-12 15:29:17 UTC) #2
justincohen
lgtm
6 years, 10 months ago (2014-02-12 15:30:57 UTC) #3
Mark Mentovai
LGTM
6 years, 10 months ago (2014-02-12 15:44:55 UTC) #4
sdefresne
Committed patchset #1 manually as r1852 (presubmit successful).
6 years, 10 months ago (2014-02-12 15:56:56 UTC) #5
Nico
6 years, 10 months ago (2014-02-17 21:41:11 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/157583011/diff/1/test/mac/archs/test-archs-mu...
File test/mac/archs/test-archs-multiarch.gyp (right):

https://codereview.chromium.org/157583011/diff/1/test/mac/archs/test-archs-mu...
test/mac/archs/test-archs-multiarch.gyp:64: ':static_32_64',
(No leading ':' on local targets.)

Powered by Google App Engine
This is Rietveld 408576698