From c9d4cbb70a514c343ffdec83f2fbe59ee2853ff5 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 31 Jan 2018 18:42:09 +0100 Subject: [PATCH] Makefile: add support for gperftools --- Makefile | 4 ++++ configure | 1 + 2 files changed, 5 insertions(+) diff --git a/Makefile b/Makefile index a6629bd30..a9763ea91 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,10 @@ ifeq ($(CONFIG_ANDROID),no) LDFLAGS += -lrt endif endif +ifeq ($(CONFIG_GPERFTOOLS),yes) +CFLAGS += -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free +LDFLAGS += -lprofiler -ltcmalloc +endif ifeq ($(COMPILER), clang) CFLAGS += -Wno-microsoft -Qunused-arguments -Wno-unused-function diff --git a/configure b/configure index d26ae5bec..f13864a9c 100755 --- a/configure +++ b/configure @@ -77,6 +77,7 @@ OPTIONS=( "bintray_cache:yes" "ddci:yes" "cclang_threadsan:no" + "gperftools:no" ) # -- 2.47.3