Bug 1396889 - don't warn about infinite recursion in mozalloc_abort; r=glandium
authorNathan Froyd <froydnj@mozilla.com>
Thu, 14 Sep 2017 09:52:50 -0400
changeset 430445 531247b23a5237309e5e79e0f29650eb58211b96
parent 430444 a36c26e1b55ec712213506c015802625834758af
child 430446 7d0893f1b6ce8494c9d73a0e7fe04ef3cf104b98
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1396889
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1396889 - don't warn about infinite recursion in mozalloc_abort; r=glandium mozalloc_abort is not marked as a noreturn function on ARM, so clang complains when abort calls mozalloc_abort, which calls MOZ_CRASH, which calls abort(). We know this is OK, so just disable the warning.
memory/mozalloc/moz.build
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -24,20 +24,26 @@ if CONFIG['WRAP_STL_INCLUDES']:
 if CONFIG['OS_TARGET'] == 'WINNT':
     # Keep this file separate to avoid #include'ing windows.h everywhere.
     SOURCES += [
         'winheap.cpp',
     ]
 
 UNIFIED_SOURCES += [
     'mozalloc.cpp',
-    'mozalloc_abort.cpp',
     'mozalloc_oom.cpp',
 ]
 
+SOURCES += [
+    'mozalloc_abort.cpp',
+]
+
+if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['CC_TYPE'] == 'clang':
+    SOURCES['mozalloc_abort.cpp'].flags += ['-Wno-infinite-recursion']
+
 FINAL_LIBRARY = 'mozglue'
 
 # The strndup declaration in string.h is in an ifdef __USE_GNU section
 DEFINES['_GNU_SOURCE'] = True
 
 DisableStlWrapping()
 
 DEFINES['IMPL_MFBT'] = True