build malloc_bench_shared_full only when full tcmalloc is built

I.e. because otherwise, when --enable-minimal is given, we're building
empty libtcmalloc.la and linking it to malloc_bench_shared_full. Which
has no effect at all and actually breaks builds on OSX.

Should fix issue #869.
This commit is contained in:
Aliaksey Kandratsenka 2017-02-20 14:25:18 -08:00
parent b8f9d0d44f
commit 069e3b1655
1 changed files with 5 additions and 1 deletions

View File

@ -858,7 +858,6 @@ librun_benchmark_la_SOURCES = \
benchmark/run_benchmark.c benchmark/run_benchmark.h benchmark/run_benchmark.c benchmark/run_benchmark.h
noinst_PROGRAMS += malloc_bench malloc_bench_shared \ noinst_PROGRAMS += malloc_bench malloc_bench_shared \
malloc_bench_shared_full \
binary_trees binary_trees_shared binary_trees binary_trees_shared
malloc_bench_SOURCES = benchmark/malloc_bench.cc malloc_bench_SOURCES = benchmark/malloc_bench.cc
@ -871,11 +870,16 @@ malloc_bench_shared_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXX
malloc_bench_shared_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) malloc_bench_shared_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
malloc_bench_shared_LDADD = librun_benchmark.la libtcmalloc_minimal.la $(PTHREAD_LIBS) malloc_bench_shared_LDADD = librun_benchmark.la libtcmalloc_minimal.la $(PTHREAD_LIBS)
if WITH_HEAP_PROFILER_OR_CHECKER
noinst_PROGRAMS += malloc_bench_shared_full
malloc_bench_shared_full_SOURCES = benchmark/malloc_bench.cc malloc_bench_shared_full_SOURCES = benchmark/malloc_bench.cc
malloc_bench_shared_full_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS) malloc_bench_shared_full_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
malloc_bench_shared_full_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) malloc_bench_shared_full_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS)
malloc_bench_shared_full_LDADD = librun_benchmark.la libtcmalloc.la $(PTHREAD_LIBS) malloc_bench_shared_full_LDADD = librun_benchmark.la libtcmalloc.la $(PTHREAD_LIBS)
endif WITH_HEAP_PROFILER_OR_CHECKER
binary_trees_SOURCES = benchmark/binary_trees.cc binary_trees_SOURCES = benchmark/binary_trees.cc
binary_trees_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS) binary_trees_CXXFLAGS = $(PTHREAD_CFLAGS) $(AM_CXXFLAGS) $(NO_BUILTIN_CXXFLAGS)
binary_trees_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) -static binary_trees_LDFLAGS = $(PTHREAD_CFLAGS) $(TCMALLOC_FLAGS) -static