Bug 1139036 - Bind all symbols from libmozglue.dylib when it is loaded. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 04 Mar 2015 21:11:32 +0900
changeset 231858 cf2a5c5edfdf306d05937765acf7a4be002c9bf4
parent 231857 73bddae4f2660b8f757b7ecc2bf237afc58288f6
child 231859 69e80cc9576380c71f612fda10158223fe1ede0c
push id28362
push userryanvm@gmail.com
push dateWed, 04 Mar 2015 21:35:51 +0000
treeherdermozilla-central@56492f7244a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1139036
milestone39.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 1139036 - Bind all symbols from libmozglue.dylib when it is loaded. r=ted
mozglue/build/moz.build
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -83,8 +83,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk
     ]
 
 DEFINES['IMPL_MFBT'] = True
 
 LDFLAGS += CONFIG['MOZ_GLUE_WRAP_LDFLAGS']
 
 if not CONFIG['_MSC_VER']:
     FAIL_ON_WARNINGS = True
+
+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
+    # to pthread_self from tsd_init_check_recursion, which is necessary
+    # because somehow clang doesn't want to accept the __thread keyword
+    # for TLS.
+    LDFLAGS += ['-Wl,-bind_at_load']