Bug 1411712 - Make a new variable for LDFLAGS to be set by Makefile.in that aren't intended to be handled by other backends.
These flags are only relevant on OS X, and will not be necessary soon, so this
commit moves them to a separate variable while we move the remainder of the
ldflags to mozbuild.
MozReview-Commit-ID: 1NDgz3HIYpT
--- a/config/config.mk
+++ b/config/config.mk
@@ -244,17 +244,17 @@ INCLUDES = \
-I$(srcdir) \
-I$(CURDIR) \
$(LOCAL_INCLUDES) \
-I$(ABS_DIST)/include \
$(NULL)
include $(MOZILLA_DIR)/config/static-checking-config.mk
-LDFLAGS = $(OS_LDFLAGS) $(MOZBUILD_LDFLAGS) $(MOZ_FIX_LINK_PATHS)
+LDFLAGS = $(OS_LDFLAGS) $(MOZBUILD_LDFLAGS) $(MOZ_FIX_LINK_PATHS) $(MK_LDFLAGS)
ifdef MOZ_OPTIMIZE
LDFLAGS += $(MOZ_OPTIMIZE_LDFLAGS)
endif # MOZ_OPTIMIZE
COMPILE_CFLAGS = $(COMPUTED_CFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
COMPILE_CXXFLAGS = $(COMPUTED_CXXFLAGS) $(PGO_CFLAGS) $(_DEPEND_CFLAGS) $(MK_COMPILE_DEFINES)
COMPILE_CMFLAGS = $(OS_COMPILE_CMFLAGS) $(MOZBUILD_CMFLAGS)
--- a/mozglue/build/replace_malloc.mk
+++ b/mozglue/build/replace_malloc.mk
@@ -1,13 +1,13 @@
# 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/.
ifeq (Darwin_1,$(OS_TARGET)_$(MOZ_REPLACE_MALLOC))
# Technically, ) is not a necessary delimiter in the awk call, but make
# doesn't like the opening ( there being alone...
-OS_LDFLAGS += \
+MK_LDFLAGS = \
$(shell awk -F'[(),]' '/^MALLOC_DECL/{print "-Wl,-U,_replace_" $$2}' $(topsrcdir)/memory/build/malloc_decls.h) \
$(NULL)
EXTRA_DEPS += $(topsrcdir)/memory/build/malloc_decls.h
endif