From 748bff0a39e5c5aff291a9e128398eb851be3f46 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 11 Aug 2020 00:05:38 +0000 Subject: [PATCH] Bug 1658434 - Replace replace_malloc.mk with a mozbuild file. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D86639 --- config/config.mk | 2 +- memory/replace/logalloc/replay/Makefile.in | 2 -- memory/replace/logalloc/replay/moz.build | 2 ++ mozglue/build/Makefile.in | 2 -- mozglue/build/moz.build | 2 ++ mozglue/build/{replace_malloc.mk => replace_malloc.mozbuild} | 5 ++--- 6 files changed, 7 insertions(+), 8 deletions(-) rename mozglue/build/{replace_malloc.mk => replace_malloc.mozbuild} (64%) diff --git a/config/config.mk b/config/config.mk index 5df8bcacad64..6f62825a5009 100644 --- a/config/config.mk +++ b/config/config.mk @@ -175,7 +175,7 @@ MOZ_LTO_CFLAGS := MOZ_LTO_LDFLAGS := endif -LDFLAGS = $(MOZ_LTO_LDFLAGS) $(COMPUTED_LDFLAGS) $(PGO_LDFLAGS) $(MK_LDFLAGS) +LDFLAGS = $(MOZ_LTO_LDFLAGS) $(COMPUTED_LDFLAGS) $(PGO_LDFLAGS) COMPILE_CFLAGS = $(MOZ_LTO_CFLAGS) $(COMPUTED_CFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES) COMPILE_CXXFLAGS = $(MOZ_LTO_CFLAGS) $(COMPUTED_CXXFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES) diff --git a/memory/replace/logalloc/replay/Makefile.in b/memory/replace/logalloc/replay/Makefile.in index fd571fecc61a..8f5b5589b650 100644 --- a/memory/replace/logalloc/replay/Makefile.in +++ b/memory/replace/logalloc/replay/Makefile.in @@ -2,8 +2,6 @@ # 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/. -include $(topsrcdir)/mozglue/build/replace_malloc.mk - ifndef CROSS_COMPILE ifndef MOZ_CODE_COVERAGE diff --git a/memory/replace/logalloc/replay/moz.build b/memory/replace/logalloc/replay/moz.build index 30057ab985fd..eab7e74a5b27 100644 --- a/memory/replace/logalloc/replay/moz.build +++ b/memory/replace/logalloc/replay/moz.build @@ -60,3 +60,5 @@ if CONFIG['MOZ_NEEDS_LIBATOMIC']: OS_LIBS += ['atomic'] DisableStlWrapping() + +include('/mozglue/build/replace_malloc.mozbuild') diff --git a/mozglue/build/Makefile.in b/mozglue/build/Makefile.in index 83886f0f7083..558ceba0660b 100644 --- a/mozglue/build/Makefile.in +++ b/mozglue/build/Makefile.in @@ -13,5 +13,3 @@ ifeq (WINNT,$(OS_TARGET)) # here. EXTRA_DEPS += $(srcdir)/mozglue.dll.manifest endif - -include $(topsrcdir)/mozglue/build/replace_malloc.mk diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build index 3d19f4f8035a..7ea4ba57d990 100644 --- a/mozglue/build/moz.build +++ b/mozglue/build/moz.build @@ -116,3 +116,5 @@ if CONFIG['MOZ_LINKER'] and CONFIG['CPU_ARCH'] == 'arm': LDFLAGS += ['-Wl,-version-script,%s/arm-eabi-filter' % SRCDIR] DIST_INSTALL = True + +include('replace_malloc.mozbuild') diff --git a/mozglue/build/replace_malloc.mk b/mozglue/build/replace_malloc.mozbuild similarity index 64% rename from mozglue/build/replace_malloc.mk rename to mozglue/build/replace_malloc.mozbuild index 8fe0ffaa7313..16c8b7271f99 100644 --- a/mozglue/build/replace_malloc.mk +++ b/mozglue/build/replace_malloc.mozbuild @@ -2,6 +2,5 @@ # 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/. -ifeq (Darwin_1,$(OS_TARGET)_$(MOZ_REPLACE_MALLOC)) -MK_LDFLAGS = -Wl,-U,_replace_init -endif +if CONFIG['OS_TARGET'] == 'Darwin' and CONFIG['MOZ_REPLACE_MALLOC']: + LDFLAGS += ['-Wl,-U,_replace_init']