Bug 1142403 - Don't build jemalloc3 with unified sources when built with --enable-debug. r=mshal
☠☠ backed out by e2021f179191 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 12 Aug 2015 16:04:53 +0900
changeset 293872 a67867200ec31a040bb6bf8320bde20beb34aa3e
parent 293871 4f59a368f15e79b5f2bb98657ba2ed0d7706cebc
child 293873 1b13dab24bd1a2694d30756a0daeca4c14525590
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1142403
milestone43.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 1142403 - Don't build jemalloc3 with unified sources when built with --enable-debug. r=mshal When built with --enable-debug, jemalloc3 makes headers define functions that are normally inlined, and that prevents unified sources from working.
memory/jemalloc/moz.build
--- a/memory/jemalloc/moz.build
+++ b/memory/jemalloc/moz.build
@@ -1,15 +1,22 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # 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, jemalloc3 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',
     'src/src/bitmap.c',
     'src/src/chunk.c',
     'src/src/chunk_dss.c',
     'src/src/chunk_mmap.c',
     'src/src/ckh.c',
@@ -34,17 +41,17 @@ UNIFIED_SOURCES += [
 SOURCES += [
     # This file cannot be built in unified mode because of symbol clash on arena_purge.
     'src/src/ctl.c',
 ]
 
 # 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',
     ]
 
 Library('jemalloc')
 
 FORCE_STATIC_LIB = True
 
 if CONFIG['MOZ_GLUE_IN_PROGRAM']: