Closed Bug 1478000 Opened 6 years ago Closed 6 years ago

nICEr and nrappkit should use the same warnings under clang-cl as with clang

Categories

(Core :: WebRTC: Networking, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: away, Assigned: dminor)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

nICEr and nrappkit are quite noisy under clang-cl, mostly because of 520 -Wparentheses complaints that are disabled on Linux and Mac.

https://searchfox.org/mozilla-central/rev/d160ac574a5798010eda4e33e91ee628aa268a33/media/mtransport/third_party/nICEr/nicer.gyp#209

and

https://searchfox.org/mozilla-central/rev/d160ac574a5798010eda4e33e91ee628aa268a33/media/mtransport/third_party/nrappkit/nrappkit.gyp#206

should be used in clang-cl as well.

I don't know how to say "if clang-cl" in gyp though...
Dan do you happen to know how to check for clang-cl in gyp?
Rank: 25
Flags: needinfo?(dminor)
Priority: -- → P3
It looks like we set a clang variable here: https://searchfox.org/mozilla-central/source/build/gyp.mozbuild#28. I'll have a look.
Assignee: nobody → dminor
Flags: needinfo?(dminor)
This adds a clangcl flag to gyp.mozbuild and then uses that to set the same
warnings flags for clang-cl as for clang.
Try run here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=925464261bfa3f1c24c8ca221d1b05de7e9ea36f

With these changes we go from 334 hits for "place parentheses" in the build log to 75.
Status: NEW → ASSIGNED
Comment on attachment 8995183 [details]
Bug 1478000 - nICEr and nrappkit should use the same warnings under clang-cl as with clang; r=dmajor

David Major [:dmajor] has approved the revision.

https://phabricator.services.mozilla.com/D2427
Attachment #8995183 - Flags: review+
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/22c01bee854b
nICEr and nrappkit should use the same warnings under clang-cl as with clang; r=dmajor
https://hg.mozilla.org/integration/mozilla-inbound/rev/22c01bee854b#l2.15
>+              # Windows, clang-cl build
>+              [ 'clang_cl == 1', {
>+                'cflags_mozilla': [
>+                    '-Wall',

Please prepend `-Xclang` to `-Wall`. Otherwise clang-cl will translate `-Wall` into `-Weverything`.
https://hg.mozilla.org/mozilla-central/rev/22c01bee854b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Apparently without -Xclang, -Wall is interpreted as -Weverything by clang-cl.
Comparing try jobs it looks like my original patch did increase the number of warnings reported by Perfherder from 1105 to 1390 . With the fix suggested by :emk this is reduced to 969. Thanks!
Comment on attachment 8995528 [details]
Bug 1478000 - Prepend -Xclang to -Wall; r=dmajor

David Major [:dmajor] has approved the revision.

https://phabricator.services.mozilla.com/D2468
Attachment #8995528 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: