Bug 1081414 - Suppress clang-cl warnings about inline 'new' and 'delete'; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 16 Oct 2014 09:11:31 -0400
changeset 210739 3ee039a4699934e561db26c9667ca446dda58af4
parent 210738 02072b137f983bbe688bc281eb66bd3b13b731b1
child 210740 4687c6761b0fdd11726b03ef892fd24036004203
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1081414, 928808
Bug 1081414 - Suppress clang-cl warnings about inline 'new' and 'delete'; r=glandium This is the clang-cl version of the fix to bug 928808.
--- a/configure.in
+++ b/configure.in
@@ -2201,16 +2201,20 @@ ia64*-hpux*)
         # MSVC warning C4800 warns when a value is implicitly cast to bool,
         # because this also forces narrowing to a single byte, which can be a
         # perf hit.  But this matters so little in practice (and often we want
         # that behavior) that it's better to turn it off.
         # MSVC warning C4819 warns some UTF-8 characters (e.g. copyright sign)
         # on non-Western system locales even if it is in a comment.
         CFLAGS="$CFLAGS -wd4244 -wd4267 -wd4819"
         CXXFLAGS="$CXXFLAGS -wd4251 -wd4244 -wd4267 -wd4345 -wd4351 -wd4482 -wd4800 -wd4819"
+        if test -n "$CLANG_CL"; then
+            # Suppress the clang-cl warning for the inline 'new' and 'delete' in mozalloc
+            CXXFLAGS="$CXXFLAGS -Wno-inline-new-delete"
+        fi
         # make 'foo == bar;' error out
         CFLAGS="$CFLAGS -we4553"
         CXXFLAGS="$CXXFLAGS -we4553"
         LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib netapi32.lib"
         MOZ_OPTIMIZE_FLAGS='-O1 -Oi'