[Sanitizer] Don't implicitly add object files to the list of dependencies when building compiler_rt unittests. Fix sanitizer_common and asan build rules accordingly. This also fixes check-sanitizer command on Ninja.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170870 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/Modules/CompilerRTUnittests.cmake b/cmake/Modules/CompilerRTUnittests.cmake
index b50272c..dbf1480 100644
--- a/cmake/Modules/CompilerRTUnittests.cmake
+++ b/cmake/Modules/CompilerRTUnittests.cmake
@@ -24,7 +24,7 @@
OUTPUT ${output_bin}
COMMAND clang ${TEST_OBJECTS} -o "${output_bin}"
${TEST_LINK_FLAGS}
- DEPENDS clang ${TEST_DEPS} ${TEST_OBJECTS})
+ DEPENDS clang ${TEST_DEPS})
add_custom_target(${test_name} DEPENDS ${output_bin})
# Make the test suite depend on the binary.
add_dependencies(${test_suite} ${test_name})