Bug 1313280 - Suppress warnings from third-party sources. r=glandium
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Fri, 04 Nov 2016 22:51:17 +0900
changeset 351935 5ede191f17409904ce0ac34dd99696010e467922
parent 351934 7fec84d7667edab5c55dccc75eb312a06447d1aa
child 351936 fb8d5979d0f1e4f17416e5d027a46e7a2068e1c5
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1313280
milestone52.0a1
Bug 1313280 - Suppress warnings from third-party sources. r=glandium MozReview-Commit-ID: 4R6mPbWIrAm MozReview-Commit-ID: D15liHKGXHv MozReview-Commit-ID: KQj3wDLxRZI
dom/media/platforms/omx/moz.build
media/webrtc/moz.build
--- a/dom/media/platforms/omx/moz.build
+++ b/dom/media/platforms/omx/moz.build
@@ -43,8 +43,15 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
     EXTRA_DSO_LDOPTS += [
         '-libbinder',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['GNU_CXX']:
     CXXFLAGS += ['-Wno-error=shadow']
+
+if CONFIG['_MSC_VER']:
+    # Avoid warnings from third-party code that we can not modify.
+    if CONFIG['CLANG_CL']:
+        CXXFLAGS += ['-Wno-invalid-source-encoding']
+    else:
+        CXXFLAGS += ['-validate-charset-']
--- a/media/webrtc/moz.build
+++ b/media/webrtc/moz.build
@@ -89,16 +89,23 @@ if CONFIG['MOZ_WEBRTC_SIGNALING']:
         'signaling/src/sdp/sipcc/sdp_services_unix.c',
         'signaling/src/sdp/sipcc/sdp_token.c',
         'signaling/src/sdp/sipcc/sdp_utils.c',
     ]
 
     GYP_DIRS['signaling'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
     GYP_DIRS['signaling'].non_unified_sources += signaling_non_unified_sources
 
+    if CONFIG['_MSC_VER']:
+        # Avoid warnings from third-party code that we can not modify.
+        if CONFIG['CLANG_CL']:
+            CXXFLAGS += ['-Wno-invalid-source-encoding']
+        else:
+            CXXFLAGS += ['-validate-charset-']
+
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
     GYP_DIRS += ['trunk/testing']
     GYP_DIRS['trunk/testing'].input = 'trunk/testing/gtest.gyp'
     GYP_DIRS['trunk/testing'].variables = gyp_vars
     # We allow warnings for third-party code that can be updated from upstream.
     GYP_DIRS['trunk/testing'].sandbox_vars['ALLOW_COMPILER_WARNINGS'] = True
     GYP_DIRS['trunk/testing'].non_unified_sources += webrtc_non_unified_sources