Closed Bug 1417658 Opened 8 years ago Closed 8 years ago

Consider unifying export_suffixes for GeneratedFiles

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mshal, Assigned: mshal)

References

Details

Attachments

(1 file)

The RecursiveMake backend has a list of export_suffixes, which is how it determines whether or not a particular GeneratedFile object needs to be built before compilation, or if it can be built after. The tup backend is starting to use a similar list, and any other backend is likely to need a similar list. If this is the same across backends, we should probably move it somewhere in the GeneratedFile object itself so that it has a way of self-identifying that it's needed before/after compilation.
Blocks: 1319222
Assignee: nobody → mshal
Comment on attachment 8931127 [details] Bug 1417658 - Move export_suffixes into GeneratedFile; https://reviewboard.mozilla.org/r/202206/#review207568 Both me and ted are active in this area of the code, so I'm happy to see an abstraction grow around this warty bit. ::: python/mozbuild/mozbuild/backend/recursivemake.py:523 (Diff revision 1) > self._process_defines(obj, backend_file, which='HOST_DEFINES') > elif isinstance(obj, Defines): > self._process_defines(obj, backend_file) > > elif isinstance(obj, GeneratedFile): > - export_suffixes = ( > + tier = 'export' if obj.required_for_compilation else 'misc' nit: slight preference for "compile" rather than "compilation", for string matching.
Attachment #8931127 - Flags: review+
Comment on attachment 8931127 [details] Bug 1417658 - Move export_suffixes into GeneratedFile; https://reviewboard.mozilla.org/r/202206/#review207574 ::: python/mozbuild/mozbuild/frontend/data.py:1070 (Diff revision 2) > self.method = method > self.outputs = outputs if isinstance(outputs, tuple) else (outputs,) > self.inputs = inputs > self.flags = flags > > + export_suffixes = ( There isn't much sense in calling these `export_suffixes` now.
(In reply to Chris Manchester (:chmanchester) from comment #4) > > + export_suffixes = ( > > There isn't much sense in calling these `export_suffixes` now. Yeah, I guess it's a little make specific. Any preferences? It is just a local variable, so I'm not tied to it.
Pushed by mshal@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f8cc047e7e4 Move export_suffixes into GeneratedFile; r=nalexander
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: