replace_malloc.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # This Source Code Form is subject to the terms of the Mozilla Public
  2. # License, v. 2.0. If a copy of the MPL was not distributed with this
  3. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  4. ifeq (Darwin_1,$(OS_TARGET)_$(MOZ_REPLACE_MALLOC))
  5. OS_LDFLAGS += \
  6. -Wl,-U,_replace_init \
  7. -Wl,-U,_replace_get_bridge \
  8. -Wl,-U,_replace_malloc \
  9. -Wl,-U,_replace_posix_memalign \
  10. -Wl,-U,_replace_aligned_alloc \
  11. -Wl,-U,_replace_calloc \
  12. -Wl,-U,_replace_realloc \
  13. -Wl,-U,_replace_free \
  14. -Wl,-U,_replace_memalign \
  15. -Wl,-U,_replace_valloc \
  16. -Wl,-U,_replace_malloc_usable_size \
  17. -Wl,-U,_replace_malloc_good_size \
  18. -Wl,-U,_replace_jemalloc_stats \
  19. -Wl,-U,_replace_jemalloc_purge_freed_pages \
  20. -Wl,-U,_replace_jemalloc_free_dirty_pages \
  21. $(NULL)
  22. ifneq ($(MOZ_REPLACE_MALLOC_LINKAGE),compiler support)
  23. OS_LDFLAGS += -flat_namespace
  24. endif
  25. ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)
  26. OS_LDFLAGS += -Wl,-weak_library,$(DEPTH)/memory/replace/dummy/$(DLL_PREFIX)dummy_replace_malloc$(DLL_SUFFIX)
  27. endif
  28. EXTRA_DEPS += $(topsrcdir)/mozglue/build/replace_malloc.mk
  29. endif