Closed Bug 1319563 Opened 8 years ago Closed 7 years ago

Move command-line generation to the CommonBackend

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1362612

People

(Reporter: mshal, Assigned: mshal)

References

Details

Attachments

(3 files)

There is a lot of logic for generating compiler commandlines in CompileDB, but it would be useful to share that among all backends.
FWIW, I didn't want to do that because it's all mostly hacks. Instead, I'd rather add the right things to the common backend and/or emitter/elsewhere so that we don't need hacks.
Can you clarify what the right things would be? IMO the hacky bits are the Makefile-looking variable references that get expanded, though most of them can be just replaced in-line with the final values when the object is consumed. I think the only exception I found was LIBRARY_DEFINES, which needs to be propagated by the emitter first.

In any case I think it would be helpful to find a way to share what we have, and then make it better.
The first two patches should be no-ops as far as CompileDB is concerned. The last one just adds output filenames instead of using /dev/null - I'm not sure if that has unintended consequences.

This at least lets me get compiler command-lines usable by the tup backend.
If we're going to go with the hacky approach of reusing this, I'd prefer if it went in a new intermediate class rather than CommonBackend.
Attachment #8813905 - Flags: review?(mh+mozilla)
Attachment #8813906 - Flags: review?(mh+mozilla)
Attachment #8813907 - Flags: review?(mh+mozilla)
mshal and I discussed this, there's not much use for this after bug 1362612
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
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: