diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-02-14 14:45:13 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-02-14 14:45:13 +0000 |
commit | 9a70077b470d8b07ccf8ade46dcff9280ee7cda5 (patch) | |
tree | d21d9a35c711cd496eb02a61369ba3a5a2c27683 | |
parent | cbb2d5eee4661e607a8c139f6a448ceace438701 (diff) | |
download | bcm5719-llvm-9a70077b470d8b07ccf8ade46dcff9280ee7cda5.tar.gz bcm5719-llvm-9a70077b470d8b07ccf8ade46dcff9280ee7cda5.zip |
[ASan] Rename asan_runtime_libraries to asan. Re-enable tests on Android.
llvm-svn: 201417
-rw-r--r-- | compiler-rt/lib/asan/CMakeLists.txt | 17 | ||||
-rw-r--r-- | compiler-rt/lib/asan/tests/CMakeLists.txt | 8 | ||||
-rw-r--r-- | compiler-rt/test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | compiler-rt/test/asan/CMakeLists.txt | 2 | ||||
-rw-r--r-- | compiler-rt/test/lsan/CMakeLists.txt | 2 | ||||
-rw-r--r-- | compiler-rt/test/ubsan/CMakeLists.txt | 2 |
6 files changed, 15 insertions, 18 deletions
diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt index 6b194079f10..64239fe0018 100644 --- a/compiler-rt/lib/asan/CMakeLists.txt +++ b/compiler-rt/lib/asan/CMakeLists.txt @@ -69,7 +69,7 @@ else() endif() # Build ASan runtimes shipped with Clang. -set(ASAN_RUNTIME_LIBRARIES) +add_custom_target(asan) if(APPLE) foreach (os ${SANITIZER_COMMON_SUPPORTED_DARWIN_OS}) # Dynamic lookup is needed because shadow scale and offset are @@ -85,7 +85,7 @@ if(APPLE) CFLAGS ${ASAN_CFLAGS} DEFS ${ASAN_COMMON_DEFINITIONS} LINKFLAGS ${ASAN_RUNTIME_LDFLAGS}) - list(APPEND ASAN_RUNTIME_LIBRARIES clang_rt.asan_${os}_dynamic) + add_dependencies(asan clang_rt.asan_${os}_dynamic) endforeach() elseif(ANDROID) @@ -98,7 +98,7 @@ elseif(ANDROID) set_property(TARGET clang_rt.asan-arm-android APPEND PROPERTY COMPILE_DEFINITIONS ${ASAN_COMMON_DEFINITIONS}) target_link_libraries(clang_rt.asan-arm-android dl log) - list(APPEND ASAN_RUNTIME_LIBRARIES clang_rt.asan-arm-android) + add_dependencies(asan clang_rt.asan-arm-android) else() # Build separate libraries for each target. foreach(arch ${ASAN_SUPPORTED_ARCH}) @@ -116,10 +116,10 @@ else() SOURCES ${ASAN_RUNTIME_OBJECTS} CFLAGS ${ASAN_CFLAGS} DEFS ${ASAN_COMMON_DEFINITIONS}) - list(APPEND ASAN_RUNTIME_LIBRARIES clang_rt.asan-${arch}) + add_dependencies(asan clang_rt.asan-${arch}) if (UNIX AND NOT ${arch} STREQUAL "i386") add_sanitizer_rt_symbols(clang_rt.asan-${arch} asan.syms.extra) - list(APPEND ASAN_RUNTIME_LIBRARIES clang_rt.asan-${arch}-symbols) + add_dependencies(asan clang_rt.asan-${arch}-symbols) endif() if (WIN32) @@ -127,16 +127,13 @@ else() SOURCES asan_dll_thunk.cc CFLAGS ${ASAN_CFLAGS} -DASAN_DLL_THUNK DEFS ${ASAN_COMMON_DEFINITIONS}) - list(APPEND ASAN_RUNTIME_LIBRARIES clang_rt.asan_dll_thunk-${arch}) + add_dependencies(asan clang_rt.asan_dll_thunk-${arch}) endif() endforeach() endif() add_compiler_rt_resource_file(asan_blacklist asan_blacklist.txt) - -# All ASan runtime dependencies. -add_custom_target(asan_runtime_libraries - DEPENDS asan_blacklist ${ASAN_RUNTIME_LIBRARIES}) +add_dependencies(asan asan_blacklist) if(LLVM_INCLUDE_TESTS) add_subdirectory(tests) diff --git a/compiler-rt/lib/asan/tests/CMakeLists.txt b/compiler-rt/lib/asan/tests/CMakeLists.txt index b0363f3e005..8c6a0af646f 100644 --- a/compiler-rt/lib/asan/tests/CMakeLists.txt +++ b/compiler-rt/lib/asan/tests/CMakeLists.txt @@ -87,9 +87,9 @@ macro(asan_compile obj_list source arch) get_target_flags_for_arch(${arch} TARGET_CFLAGS) clang_compile(${output_obj} ${source} CFLAGS ${ARGN} ${TARGET_CFLAGS} - DEPS gtest asan_runtime_libraries - ${ASAN_UNITTEST_HEADERS} - ${ASAN_BLACKLIST_FILE}) + DEPS gtest asan + ${ASAN_UNITTEST_HEADERS} + ${ASAN_BLACKLIST_FILE}) list(APPEND ${obj_list} ${output_obj}) endmacro() @@ -98,7 +98,7 @@ endmacro() macro(add_asan_test test_suite test_name arch) parse_arguments(TEST "OBJECTS;LINKFLAGS" "WITH_TEST_RUNTIME" ${ARGN}) get_target_flags_for_arch(${arch} TARGET_LINK_FLAGS) - set(TEST_DEPS asan_runtime_libraries ${TEST_OBJECTS}) + set(TEST_DEPS asan ${TEST_OBJECTS}) if(TEST_WITH_TEST_RUNTIME) list(APPEND TEST_DEPS ${ASAN_TEST_RUNTIME}) list(APPEND TEST_OBJECTS lib${ASAN_TEST_RUNTIME}.a) diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt index 72f8aab30b2..c06174ce9bd 100644 --- a/compiler-rt/test/CMakeLists.txt +++ b/compiler-rt/test/CMakeLists.txt @@ -9,7 +9,7 @@ configure_lit_site_cfg( # Run sanitizer tests only if we're sure that clang would produce # working binaries. if(COMPILER_RT_CAN_EXECUTE_TESTS) - if(ASAN_SUPPORTED_ARCH) + if(ASAN_SUPPORTED_ARCH OR ANDROID) add_subdirectory(asan) endif() if(DFSAN_SUPPORTED_ARCH) diff --git a/compiler-rt/test/asan/CMakeLists.txt b/compiler-rt/test/asan/CMakeLists.txt index c47d048764d..4c4f33e5fee 100644 --- a/compiler-rt/test/asan/CMakeLists.txt +++ b/compiler-rt/test/asan/CMakeLists.txt @@ -49,7 +49,7 @@ endif() # Run ASan tests only if we're sure we may produce working binaries. set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS} - asan_runtime_libraries) + asan) set(ASAN_TEST_PARAMS asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg) # FIXME: support unit test in the android test runner diff --git a/compiler-rt/test/lsan/CMakeLists.txt b/compiler-rt/test/lsan/CMakeLists.txt index d84b1825521..c79c7121976 100644 --- a/compiler-rt/test/lsan/CMakeLists.txt +++ b/compiler-rt/test/lsan/CMakeLists.txt @@ -14,7 +14,7 @@ if(NOT APPLE AND NOT ANDROID) set(LSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS} lsan - asan_runtime_libraries) + asan) add_lit_testsuite(check-lsan "Running the LeakSanitizer tests" ${CMAKE_CURRENT_BINARY_DIR}/LsanConfig ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig diff --git a/compiler-rt/test/ubsan/CMakeLists.txt b/compiler-rt/test/ubsan/CMakeLists.txt index 1ae2b876089..da884aa3c43 100644 --- a/compiler-rt/test/ubsan/CMakeLists.txt +++ b/compiler-rt/test/ubsan/CMakeLists.txt @@ -11,7 +11,7 @@ configure_lit_site_cfg( set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS} ubsan - asan_runtime_libraries) + asan) add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests" ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig |