Bug 1411712 - Move symbol version script flags for arm in mozglue to moz.build. draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 02 Nov 2017 14:14:58 -0700
changeset 692247 6c8064bab196bf1aad430e1a99188abea90cf02c
parent 692246 06765f655f6bbe0fa759a73539443c78e28a49e9
child 692248 42005cd3f33aced7c8cf65b301ab408704e0ed31
push id87463
push userbmo:cmanchester@mozilla.com
push dateThu, 02 Nov 2017 21:50:29 +0000
bugs1411712
milestone58.0a1
Bug 1411712 - Move symbol version script flags for arm in mozglue to moz.build. MozReview-Commit-ID: II250cfTmip
mozglue/build/Makefile.in
mozglue/build/moz.build
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -9,15 +9,8 @@ include $(topsrcdir)/config/config.mk
 ifeq (WINNT,$(OS_TARGET))
 mozglue.def: mozglue.def.in $(GLOBAL_DEPS)
 	$(call py_action,preprocessor,$(if $(MOZ_REPLACE_MALLOC),-DMOZ_REPLACE_MALLOC) $(ACDEFINES) $< -o $@)
 
 GARBAGE += mozglue.def
 endif
 
 include $(topsrcdir)/mozglue/build/replace_malloc.mk
-
-ifdef MOZ_LINKER
-ifeq (arm, $(TARGET_CPU))
-OS_LDFLAGS += -Wl,-version-script,$(srcdir)/arm-eabi-filter
-endif
-
-endif
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -93,9 +93,12 @@ if CONFIG['OS_TARGET'] == 'Darwin':
     # 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']
 
+if CONFIG['MOZ_LINKER'] and CONFIG['TARGET_CPU'] == 'arm':
+    LDFLAGS += ['-Wl,-version-script,%s/arm-eabi-filter' % SRCDIR]
+
 DIST_INSTALL = True