Closed Bug 1461774 Opened 7 years ago Closed 7 years ago

gyp_reader.py does not order flags specified in .gyp files optimally

Categories

(Firefox Build System :: General, defect)

3 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: tjr, Assigned: tjr)

Details

Attachments

(1 file)

Right now; nothing needs this patch - the thing I was doing that needed this is going to happen another way. But what I discovered was that if you had an included .gyp file at the top that set flags (like a --foo cflag) and then later in your gyp file you tried to override one of those flags (with -no-foo) - the --no-foo would come first and then the --foo would come later. So what you wound up with was flags specified later were being specified first. The attached patch reverses that ordering which, I think anyway, is more sane.
Attachment #8975905 - Flags: review?(core-build-config-reviews) → review?(ted)
Comment on attachment 8975905 [details] Bug 1461774 Have gyp_reder specify flags in the order they appear in .gyp files instead of the reverse https://reviewboard.mozilla.org/r/244110/#review251500 ::: python/mozbuild/mozbuild/frontend/gyp_reader.py:308 (Diff revision 1) > f = expand_variables(f, config.substs).split() > if not f: > continue > # the result may be a string or a list. > if isinstance(f, types.StringTypes): > - context[var].append(f) > + context[var].insert(0, f) This could stand a one-line comment explaining that flags come out of the gyp reader in reverse order.
Attachment #8975905 - Flags: review?(ted) → review+
Attachment #8975905 - Flags: review?(core-build-config-reviews)
Comment on attachment 8975905 [details] Bug 1461774 Have gyp_reder specify flags in the order they appear in .gyp files instead of the reverse https://reviewboard.mozilla.org/r/244110/#review251928
Attachment #8975905 - Flags: review+
Actually, while this did fix the problem I was trying to solve, it broke a bunch of other stuff. And since my problem isn't a problem anymore it's not worth trying to resolve. https://treeherder.mozilla.org/#/jobs?repo=try&revision=66a261d72f50d6fa35a4dcf7d786b96c0a641fad&selectedJob=179694772
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: