From e847c415b3fbdea0595cac51321bd8277beba028 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Fri, 17 Apr 2015 08:53:35 -0400 Subject: [PATCH] Bug 1155393 - Port the -Wno-inline-new-delete option from configure.in to the JS configure script; r=dholbert --- js/src/configure.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/src/configure.in b/js/src/configure.in index a968c5b15bbb..8a62df8482e1 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -1243,9 +1243,12 @@ if test "$GNU_CC"; then # Turn off the following warnings that -Wall turns on: # -Wno-unused - lots of violations in third-party code + # -Wno-inline-new-delete - we inline 'new' and 'delete' in mozalloc # _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-unused" + MOZ_CXX_SUPPORTS_WARNING(-Wno-, inline-new-delete, ac_cxx_has_wno_inline_new_delete) + if test -z "$INTEL_CC" -a -z "$CLANG_CC"; then # Don't use -Wcast-align with ICC or clang case "$CPU_ARCH" in @@ -1789,6 +1792,10 @@ ia64*-hpux*) # the same thing as C4244, we disable C4267, too. CFLAGS="$CFLAGS -wd4244 -wd4267" CXXFLAGS="$CXXFLAGS -wd4244 -wd4267 -wd4251" + 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"