summaryrefslogtreecommitdiff
path: root/Makethird
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-01-28 19:28:10 +0000
committerRobin Watts <robin.watts@artifex.com>2016-01-29 14:35:55 +0000
commit773131e104d13718aaa3d47e56c50c75f04e8ee6 (patch)
treead2321b2a63a1113dc25078304cca7020c5b9711 /Makethird
parent52ed5832db9ea4bcc9dcfd2f0391af89f5aadd95 (diff)
downloadmupdf-773131e104d13718aaa3d47e56c50c75f04e8ee6.tar.xz
Force all harfbuzz allocations through our allocators.
Because of a shortcoming in harfbuzz, we can't easily force all its allocations through our allocators. We fudge it, with the addition of some macros to change malloc/free/calloc into hb_malloc/hb_free/hb_calloc. To prevent thread safety issues, we use our freetype lock around calls to harfbuzz. We stash the current context in a static var.
Diffstat (limited to 'Makethird')
-rw-r--r--Makethird4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makethird b/Makethird
index f6f0cbbe..facd0c8e 100644
--- a/Makethird
+++ b/Makethird
@@ -157,7 +157,9 @@ $(HARFBUZZ_OUT):
$(MKDIR_CMD)
$(HARFBUZZ_OUT)/%.o: $(HARFBUZZ_DIR)/src/%.cc | $(HARFBUZZ_OUT)
$(CC_CMD) -DHAVE_OT -DHAVE_UCDN -DHB_NO_MT $(FREETYPE_CFLAGS) \
- -fno-rtti -fno-exceptions -fvisibility-inlines-hidden --std=c++0x
+ -Dhb_malloc_impl=hb_malloc -Dhb_calloc_impl=hb_calloc \
+ -Dhb_free_impl=hb_free -Dhb_realloc_impl=hb_realloc \
+ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden --std=c++0x
HARFBUZZ_CFLAGS := -I$(HARFBUZZ_DIR)/src
else