Closed Bug 1417658 Opened 2 years ago Closed 2 years ago
Consider unifying export
_suffixes for Generated Files
59 bytes, text/x-review-board-request
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.
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/6f8cc047e7e4 Move export_suffixes into GeneratedFile; r=nalexander
You need to log in before you can comment on or make changes to this bug.