Bug 1309573 - Part 2: Define MOZ_HAS_MOZGLUE in various places so that the crash reason gets used. r=glandium
--- a/build/gecko_templates.mozbuild
+++ b/build/gecko_templates.mozbuild
@@ -53,22 +53,24 @@ def GeckoBinary(linkage='dependent', msv
]
elif linkage != None:
error('`linkage` must be "dependent", "standalone" or None')
if mozglue:
LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
if mozglue == 'program':
USE_LIBS += ['mozglue']
+ DEFINES['MOZ_HAS_MOZGLUE'] = True
if CONFIG['MOZ_GLUE_IN_PROGRAM']:
if CONFIG['GNU_CC']:
LDFLAGS += ['-rdynamic']
if CONFIG['MOZ_MEMORY']:
USE_LIBS += ['memory']
elif mozglue == 'library':
+ LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
if not CONFIG['MOZ_GLUE_IN_PROGRAM']:
USE_LIBS += ['mozglue']
else:
error('`mozglue` must be "program" or "library"')
if not CONFIG['JS_STANDALONE']:
USE_LIBS += [
'fallible',
--- a/config/external/fdlibm/moz.build
+++ b/config/external/fdlibm/moz.build
@@ -1,14 +1,12 @@
# -*- Mode: python; 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/.
-Library('fdlibm')
-
with Files('**'):
BUG_COMPONENT = ('Core', 'JavaScript Engine')
DIRS += [
'../../../modules/fdlibm',
]
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -63,16 +63,18 @@ CONFIGURE_SUBST_FILES += [
'js-config',
'js.pc',
]
CONFIGURE_DEFINE_FILES += [
'js-confdefs.h',
]
if not CONFIG['JS_STANDALONE']:
+ LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
+
CONFIGURE_SUBST_FILES += [
'../../config/autoconf-js.mk',
'../../config/emptyvars-js.mk',
]
CONFIGURE_DEFINE_FILES += [
'js-config.h',
]
@@ -653,17 +655,16 @@ if CONFIG['ENABLE_INTL_API']:
# Linking 'icu' will pull in the stubdata library,
# which the shell doesn't want, so link the other bits.
USE_LIBS += [
'icui18n',
'icuuc',
]
USE_LIBS += [
- 'fdlibm',
'nspr',
'zlib',
]
if CONFIG['NIGHTLY_BUILD']:
DEFINES['ENABLE_BINARYDATA'] = True
if CONFIG['NIGHTLY_BUILD']:
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -4,16 +4,17 @@
# 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/.
EXPORTS += [
'mozmemory.h',
'mozmemory_wrap.h',
]
+DEFINES['MOZ_HAS_MOZGLUE'] = True
DEFINES['MOZ_MEMORY_IMPL'] = True
if CONFIG['MOZ_REPLACE_MALLOC']:
EXPORTS += [
'malloc_decls.h',
'replace_malloc.h',
'replace_malloc_bridge.h',
]
--- a/memory/jemalloc/moz.build
+++ b/memory/jemalloc/moz.build
@@ -63,16 +63,17 @@ if CONFIG['_MSC_VER']:
if CONFIG['OS_TARGET'] == 'Linux':
# For mremap
DEFINES['_GNU_SOURCE'] = True
if CONFIG['GNU_CC']:
CFLAGS += ['-std=gnu99']
DEFINES['abort'] = 'moz_abort'
+DEFINES['MOZ_HAS_MOZGLUE'] = True
LOCAL_INCLUDES += [
'!src/include',
'src/include',
]
# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
--- a/memory/mozjemalloc/moz.build
+++ b/memory/mozjemalloc/moz.build
@@ -23,16 +23,17 @@ if not CONFIG['MOZ_JEMALLOC4']:
# For non release/esr builds, enable (some) fatal jemalloc assertions. This
# helps us catch memory errors.
if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('release', 'esr'):
DEFINES['MOZ_JEMALLOC_HARD_ASSERTS'] = True
DEFINES['abort'] = 'moz_abort'
+DEFINES['MOZ_HAS_MOZGLUE'] = True
DEFINES['MOZ_JEMALLOC_IMPL'] = True
#XXX: PGO on Linux causes problems here
# See bug 419470
if CONFIG['OS_TARGET'] == 'Linux':
NO_PGO = True
LOCAL_INCLUDES += [
--- a/memory/replace/logalloc/replay/moz.build
+++ b/memory/replace/logalloc/replay/moz.build
@@ -3,16 +3,17 @@
# 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/.
Program('logalloc-replay')
SOURCES += [
'../FdPrintf.cpp',
+ '/mfbt/Assertions.cpp',
'Replay.cpp',
]
LOCAL_INCLUDES += [
'..',
]
# Link replace-malloc and the default allocator.
--- a/modules/fdlibm/src/moz.build
+++ b/modules/fdlibm/src/moz.build
@@ -3,17 +3,17 @@
# 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/.
EXPORTS += [
'fdlibm.h',
]
-FINAL_LIBRARY = 'fdlibm'
+FINAL_LIBRARY = 'js'
if CONFIG['GNU_CXX']:
CXXFLAGS += [
'-Wno-parentheses',
'-Wno-sign-compare',
]
if CONFIG['CLANG_CXX']:
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -86,16 +86,17 @@ if not CONFIG['JS_STANDALONE']:
'cpuacct.c',
]
USE_LIBS += [
'mfbt',
]
DEFINES['IMPL_MFBT'] = True
+LIBRARY_DEFINES['MOZ_HAS_MOZGLUE'] = True
LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
if CONFIG['OS_TARGET'] == 'Darwin':
# On OSX 10.10.3, a dead lock happens in some cases involving dynamic
# symbol resolution for symbols that jemalloc itself uses. While it
# might be possible to find a way to avoid all such symbol resolutions,
# it's currently not possible because at the very least there's a call
--- a/mozglue/linker/tests/moz.build
+++ b/mozglue/linker/tests/moz.build
@@ -7,16 +7,17 @@
DIST_INSTALL = False
SimplePrograms([
'TestZip',
])
LOCAL_INCLUDES += ['..']
USE_LIBS += [
'linker',
+ 'mfbt',
]
OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
DISABLE_STL_WRAPPING = True
PYTHON_UNIT_TESTS += ['run_test_zip.py']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-error=shadow']