-
Notifications
You must be signed in to change notification settings - Fork 255
Suppress Windows specific Clang warnings and treat the rest as errors. #381
Conversation
This should also eliminate the pages and pages of warnings generated when compiling using Clang on Windows.
stuartmorgan-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should make most of these changes.
flutter/flutter#59199 tracks the status, and all but a very small number have fixes in flight.
| ] | ||
| # Warns when a source file doesn't have a newline at end-of-file. | ||
| # This is to match Fuchsia, which enables this warning. | ||
| "-Wnewline-eof", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a fix for this landed in ANGLE, I just need to find time to update the licenses to roll it (flutter/engine#19105)
| if (!is_win) { | ||
| cflags = [ | ||
| # Warns when a const char[] is converted to bool. | ||
| "-Wstring-conversion", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually hit this on Windows?
| "/FS", # Preserve previous PDB behavior. | ||
| ] | ||
|
|
||
| ldflags += [ "/ignore:4217" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a comment; I'm not sure what it is, or why we need to suppress it instead of fix it.
| "_HAS_EXCEPTIONS=0", | ||
| "_SCL_SECURE_NO_DEPRECATE", | ||
| "_CRT_NONSTDC_NO_WARNINGS", | ||
| "_CRT_NONSTDC_NO_DEPRECATE", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should't blank-suppress these. They are almost all from Dart, and they have an in-progress PR to fix them.
| "-Wno-unknown-argument", | ||
|
|
||
| "-Wno-nonportable-include-path", | ||
| "-Wno-nonportable-system-include-path", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you turning these on more often? The are working around a goma bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into these on my non-corp workstation without goma setup.
|
Great. I didn't realize you were already working on it. It was quite painful working on Windows with all the warnings so added |
This should also eliminate the pages and pages of warnings generated when
compiling using Clang on Windows.