[llvm-commits] [compiler-rt] r163201 - /compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
Alexey Samsonov
samsonov at google.com
Wed Sep 5 01:07:18 PDT 2012
Author: samsonov
Date: Wed Sep 5 03:07:18 2012
New Revision: 163201
URL: http://llvm.org/viewvc/llvm-project?rev=163201&view=rev
Log:
[ASan] Add CMake support for building ASan benchmarks
Modified:
compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
Modified: compiler-rt/trunk/lib/asan/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/CMakeLists.txt?rev=163201&r1=163200&r2=163201&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/tests/CMakeLists.txt Wed Sep 5 03:07:18 2012
@@ -48,10 +48,8 @@
-mllvm "-asan-blacklist=${CMAKE_CURRENT_SOURCE_DIR}/asan_test.ignore"
)
-add_custom_target(AsanUnitTests)
-set_target_properties(AsanUnitTests PROPERTIES FOLDER "ASan unit tests")
-function(add_asan_test testname)
- add_unittest(AsanUnitTests ${testname} ${ARGN})
+function(add_asan_test testsuite testname)
+ add_unittest(${testsuite} ${testname} ${ARGN})
if (APPLE)
# Darwin-specific linker flags.
set_property(TARGET ${testname} APPEND PROPERTY
@@ -114,7 +112,16 @@
list(APPEND ASAN_INST_TEST_OBJECTS asan_mac_test.mm.asan.o)
endif()
+ # Build benchmarks test instrumented with AddressSanitizer.
+ add_asan_compile_command(asan_benchmarks_test.cc "")
+ add_custom_target(AsanBenchmarks)
+ set_target_properties(AsanBenchmarks PROPERTIES FOLDER "Asan benchmarks")
+ add_asan_test(AsanBenchmarks AsanBenchmark asan_break_optimization.cc
+ asan_benchmarks_test.cc.asan.o)
endif()
-add_asan_test(AsanTest ${ASAN_NOINST_TEST_SOURCES}
- ${ASAN_INST_TEST_OBJECTS})
+# Main AddressSanitizer unit tests.
+add_custom_target(AsanUnitTests)
+set_target_properties(AsanUnitTests PROPERTIES FOLDER "ASan unit tests")
+add_asan_test(AsanUnitTests AsanTest ${ASAN_NOINST_TEST_SOURCES}
+ ${ASAN_INST_TEST_OBJECTS})
More information about the llvm-commits
mailing list