Closed Bug 1445668 Opened 6 years ago Closed 6 years ago

Consider providing a flag to disable cl.py hiding output of -showIncludes on cl.exe

Categories

(Firefox Build System :: General, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: nika, Assigned: nika)

Details

Attachments

(1 file)

Currently when cl.py runs it will pass -showIncludes to cl.exe. The output is then parsed & used in order to generate the correct dependency information.

https://searchfox.org/mozilla-central/rev/8fa0b32c84f924c6809c690117dbd59591f79607/python/mozbuild/mozbuild/action/cl.py#74-89

cl.py then gobbles up the `Note: including file:` lines, to not clog up the output. 

Sometimes the output of -showIncludes is useful for debugging, unfortunately there is no easy way to disable this behaviour of consuming all of the command line outputs.

It would be nice if cl.py checked if -showIncludes was explicitly passed to cl.exe, and didn't hide those lines if it is, meaning this flag can be used for debugging.
For reference, sccache also implements -showIncludes parsing (we don't use cl.py in automation where we use sccache), and it has explicit handling for this case--if you pass `-showIncludes` it will pass that output along:
https://github.com/mozilla/sccache/blob/1efee847f22d740b784b1bff4e831a1887cb2ab9/src/compiler/msvc.rs#L253
https://github.com/mozilla/sccache/blob/1efee847f22d740b784b1bff4e831a1887cb2ab9/src/compiler/msvc.rs#L427
Assignee: nobody → nika
Attachment #8961890 - Flags: review?(gps) → review+
Pushed by nika@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb10a801252a
Don't hide includes when -showIncludes is explicitly passed to cl.exe, r=gps
https://hg.mozilla.org/mozilla-central/rev/bb10a801252a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Version: Version 3 → 3 Branch
You need to log in before you can comment on or make changes to this bug.