[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / scudo / standalone / benchmarks / CMakeLists.txt
blob26d023c79585926951a5ab8e47bc50d209cf660e
1 # To build these benchmarks, build the target "ScudoBenchmarks.$ARCH", where
2 # $ARCH is the name of the target architecture. For example,
3 # ScudoBenchmarks.x86_64 for 64-bit x86. The benchmark executable is then
4 # available under projects/compiler-rt/lib/scudo/standalone/benchmarks/ in the
5 # build directory.
7 include(AddLLVM)
9 set(SCUDO_BENCHMARK_CFLAGS -I${COMPILER_RT_SOURCE_DIR}/lib/scudo/standalone)
10 if(ANDROID)
11   list(APPEND SCUDO_BENCHMARK_CFLAGS -fno-emulated-tls)
12 endif()
13 string(REPLACE ";" " " SCUDO_BENCHMARK_CFLAGS " ${SCUDO_BENCHMARK_CFLAGS}")
15 foreach(arch ${SCUDO_STANDALONE_SUPPORTED_ARCH})
16   add_benchmark(ScudoBenchmarks.${arch}
17                 malloc_benchmark.cpp
18                 $<TARGET_OBJECTS:RTScudoStandalone.${arch}>)
19   set_property(TARGET ScudoBenchmarks.${arch} APPEND_STRING PROPERTY
20                COMPILE_FLAGS "${SCUDO_BENCHMARK_CFLAGS}")
22   if (COMPILER_RT_HAS_GWP_ASAN)
23     add_benchmark(
24       ScudoBenchmarksWithGwpAsan.${arch} malloc_benchmark.cpp
25       $<TARGET_OBJECTS:RTScudoStandalone.${arch}>
26       $<TARGET_OBJECTS:RTGwpAsan.${arch}>
27       $<TARGET_OBJECTS:RTGwpAsanBacktraceLibc.${arch}>
28       $<TARGET_OBJECTS:RTGwpAsanSegvHandler.${arch}>)
29     set_property(
30       TARGET ScudoBenchmarksWithGwpAsan.${arch} APPEND_STRING PROPERTY
31       COMPILE_FLAGS "${SCUDO_BENCHMARK_CFLAGS} -DGWP_ASAN_HOOKS")
32   endif()
33 endforeach()