Closed Bug 1496746 Opened 6 years ago Closed 5 years ago

Remove VPATH

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mshal, Assigned: mshal)

References

Details

Attachments

(1 file)

We got rid of the per-directory manual VPATH definitions in bug 875013, but we still generate a VPATH entry for the srcdir in the Makefiles created in the objdir.

Since issues with VPATH can be tricky (eg: https://bugzilla.mozilla.org/show_bug.cgi?id=1461714#c55), we should consider removing this. We have enough information in moz.build to point directly to source files, and the fact that we can build the tree in an alternate build system without VPATH should be confirmation of this.
Is referring to source files via full paths going to do weird things with debug info/crash-stats links/etc.?
(In reply to Nathan Froyd [:froydnj] from comment #1)
> Is referring to source files via full paths going to do weird things with
> debug info/crash-stats links/etc.?

I don't think so, but we could presumably diff the list of source files in the generated .sym files before and after if someone writes the patch. The code in dump_syms already builds full paths using the compile dir + the source filename.
With :kmoir's consent, I'm reviewing the backlog for bugs in FFx Build System to see if we can do some things to clean up the backlog.

This bug appears to be an enhancement or feature request. If so, please set the bug's severity to `enhancement` and/or add the `feature` keyword depending on if this is an improvement to an existing thing, or a new feature/tool/system.
Flags: needinfo?(mshal)
Severity: normal → enhancement
Flags: needinfo?(mshal)
Blocks: 1575680
Assignee: nobody → mshal

Having a full VPATH for the srcdir sometimes causes make to grab the
wrong prerequisite for a rule, in particular if we have a file in the
srcdir and also generate a file of the same name in the objdir. We don't
really need VPATH anymore though, since most of the information comes
from mozbuild, where we can explicitly list the path to the srcdir or
objdir as necessary.

There are some spots where a more targetted vpath directive makes sense.
First is for the RCFILE, since this is either a file we generate in the
objdir (module.rc), or a file in a PassthruVariable from moz.build in
the srcdir. Adding a vpath here to look in the srcdir for the
PassthruVariable version seems reasonable, though we could also consider
making RCFILE a Path object instead.

The other targetted vpath is needed for pattern rules with directory
components, since make separates the directory from the stem and
prepends it to the path for some reason, which results in a non-sensical
path. See the comment in media/libvpx/Makefile.in for details.

Attachment #9087218 - Attachment description: Bug 1496746 - Remove VPATH; r?#firefox-build-system-reviewers → Bug 1496746 - Remove VPATH; r?glandium
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Regressions: 1593948
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: