From bbde5328534a32f40414a1539c4e3fc6a99dadc9 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 12 Aug 2015 16:04:53 +0900 Subject: [PATCH] Bug 1142403 - Part 1: Don't build jemalloc4 with unified sources when built with --enable-debug. r=mshal When built with --enable-debug, jemalloc4 makes headers define functions that are normally inlined, and that prevents unified sources from working. --HG-- extra : rebase_source : 9490a0a8312e9be18e639384e3450a9c924e3daf extra : source : a67867200ec31a040bb6bf8320bde20beb34aa3e --- memory/jemalloc/moz.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/memory/jemalloc/moz.build b/memory/jemalloc/moz.build index b7e2b661f9286..ef70a0d5e7326 100644 --- a/memory/jemalloc/moz.build +++ b/memory/jemalloc/moz.build @@ -4,7 +4,14 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -UNIFIED_SOURCES += [ +# When built with --enable-debug, jemalloc4 makes headers define functions that +# are normally inlined, and that prevents unified sources from working. +if CONFIG['MOZ_DEBUG']: + maybe_unified_sources = SOURCES +else: + maybe_unified_sources = UNIFIED_SOURCES + +maybe_unified_sources += [ 'src/src/arena.c', 'src/src/atomic.c', 'src/src/base.c', @@ -42,7 +49,7 @@ SOURCES += [ # Only OSX needs the zone allocation implementation, # but only if replace-malloc is not enabled. if CONFIG['OS_TARGET'] == 'Darwin' and not CONFIG['MOZ_REPLACE_MALLOC']: - UNIFIED_SOURCES += [ + maybe_unified_sources += [ 'src/src/zone.c', ]