Bug 1393216 Disable unknown pragma warnings when compiling for Windows with gcc r?froydnj draft
authorTom Ritter <tom@mozilla.com>
Wed, 23 Aug 2017 16:18:28 -0500
changeset 655120 8d0c7e2d39876535b9a458ac51390f50609d662d
parent 655119 aa4fde4fc6ad8896797bd5c8d7335ae142a614b5
child 655121 859677a7632708001e8c56eb5e8564bc61ee9c16
push id76778
push userbmo:tom@mozilla.com
push dateTue, 29 Aug 2017 17:35:26 +0000
reviewersfroydnj
bugs1393216
milestone57.0a1
Bug 1393216 Disable unknown pragma warnings when compiling for Windows with gcc r?froydnj MozReview-Commit-ID: 6cZ96xe4h8C
build/moz.configure/warnings.configure
old mode 100644
new mode 100755
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -104,16 +104,21 @@ check_and_add_gcc_warning('-Wno-error=fr
 # catches format/argument mismatches with printf
 check_and_add_gcc_warning('-Wformat')
 
 # We use mix of both POSIX and Win32 printf format across the tree, so format
 # warnings are useless on mingw.
 check_and_add_gcc_warning('-Wno-format',
                           when=depends(target)(lambda t: t.kernel == 'WINNT'))
 
+# When compiling for Windows with gcc, we encounter lots of "#pragma warning"'s
+# which is an MSVC-only pragma that GCC does not recognize.
+check_and_add_gcc_warning('-Wno-unknown-pragmas',
+                          when=depends(target)(lambda t: t.kernel == 'WINNT'))
+
 # We hit this all over the place with the gtest INSTANTIATE_TEST_CASE_P macro
 check_and_add_gcc_warning('-Wno-gnu-zero-variadic-macro-arguments')
 
 # Add compile-time warnings for unprotected functions and format functions
 # that represent possible security problems
 check_and_add_gcc_warning('-Wformat-security')
 check_and_add_gcc_warning('-Wformat-overflow=2')