Closed Bug 1222166 Opened 4 years ago Closed 4 years ago

use gcc/clang warning flags for clang-cl in moz.build files

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox46 fixed)

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

Details

Attachments

(1 file, 1 obsolete file)

This patch turns off a number of gcc/clang-specific warnings for
clang-cl as well, as clang-cl understands all the warning flags that
clang understands.  We currently don't turn on all the gcc/clang
warnings for clang-cl in configure, but that can be done separately, and
this patch addresses some pain points (particularly for cairo).
Attachment #8683854 - Flags: review?(mh+mozilla)
Comment on attachment 8683854 [details] [diff] [review]
use gcc/clang warning flags for clang-cl in moz.build files

Review of attachment 8683854 [details] [diff] [review]:
-----------------------------------------------------------------

I think it would be simpler if you did something like:

if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
  CFLAGS += [ flags for gcc that clang/clang-cl can take ]
if CONFIG['GNU_CC'] and not CONFIG['CLANG_CXX']:
  CXXFLAGS += [ flags for gcc only ]
if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
  CXXFLAGS += [ flags for clang/clang-cl only ]
Attachment #8683854 - Flags: review?(mh+mozilla)
This patch turns off a number of gcc/clang-specific warnings for
clang-cl as well, as clang-cl understands all the warning flags that
clang understands.  We currently don't turn on all the gcc/clang
warnings for clang-cl in configure, but that can be done separately, and
this patch addresses some pain points (particularly for cairo).

This revision addresses previous review comments and also includes some flags
for gfx/angle/, which I believe need to go "upstream" as well.  I'll take care
of that if this patch is accepted.

I didn't get everything; media/gmp-clearkey/, for instance, has some small
amount of warnings.  This patch at least helps get things down to a manageable
number.
Attachment #8699029 - Flags: review?(mh+mozilla)
Attachment #8683854 - Attachment is obsolete: true
Attachment #8699029 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/ed04f4dc86b1
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.