summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/scudo/standalone/benchmarks/CMakeLists.txt
blob: 6eb0bd6a1e3e7c70fff44fb6f35ef88611e413e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# To build these benchmarks, build the target "ScudoBenchmarks.$ARCH", where
# $ARCH is the name of the target architecture. For example,
# ScudoBenchmarks.x86_64 for 64-bit x86. The benchmark executable is then
# available under projects/compiler-rt/lib/scudo/standalone/benchmarks/ in the
# build directory.

include(AddLLVM)

set(SCUDO_BENCHMARK_CFLAGS -I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone)
if(ANDROID)
  list(APPEND SCUDO_BENCHMARK_CFLAGS -fno-emulated-tls)
endif()
string(REPLACE ";" " " SCUDO_BENCHMARK_CFLAGS " ${SCUDO_BENCHMARK_CFLAGS}")

foreach(arch ${SCUDO_STANDALONE_SUPPORTED_ARCH})
  add_benchmark(ScudoBenchmarks.${arch}
                malloc_benchmark.cpp
                $<TARGET_OBJECTS:RTScudoStandalone.${arch}>)
  set_property(TARGET ScudoBenchmarks.${arch} APPEND_STRING PROPERTY
               COMPILE_FLAGS "${SCUDO_BENCHMARK_CFLAGS}")
endforeach()
OpenPOWER on IntegriCloud