mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-29 20:57:43 -10:00
For obscure linkage reasons, we need all the replace-malloc symbols being passed to the linker to tell it to allow them being undefined. That list actually duplicates what's in malloc_decls.h somehow, and every time we add an entry point, we end up having to modify those two files (and others, addressed in different bugs), which is suboptimal. So we generate the list of those symbols from malloc_decls.h.
14 lines
576 B
Makefile
14 lines
576 B
Makefile
# 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 += \
|
|
$(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
|