mgorny created this revision. Herald added subscribers: dberris, kubamracek.
Unify the ASAN dynamic test logic to use generate_asan_tests() in both MSVC and non-MSVC branch. It is unclear why this particular branch used add_compiler_rt_test() directly. However, it skipped the COMPILE_DEPS/DEPS logic which resulted in 'gtest' target being included in standalone builds, causing build failures due to missing target. https://reviews.llvm.org/D38840 Files: lib/asan/tests/CMakeLists.txt Index: lib/asan/tests/CMakeLists.txt =================================================================== --- lib/asan/tests/CMakeLists.txt +++ lib/asan/tests/CMakeLists.txt @@ -202,9 +202,9 @@ else() # Otherwise, reuse ASAN_INST_TEST_OBJECTS. - add_compiler_rt_test(AsanDynamicUnitTests "${dynamic_test_name}" "${arch}" + generate_asan_tests(ASAN_INST_TEST_OBJECTS + AsanDynamicUnitTests "${dynamic_test_name}" SUBDIR "dynamic" - OBJECTS ${ASAN_INST_TEST_OBJECTS} DEPS gtest asan ${ASAN_INST_TEST_OBJECTS} LINK_FLAGS ${ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS} )
Index: lib/asan/tests/CMakeLists.txt =================================================================== --- lib/asan/tests/CMakeLists.txt +++ lib/asan/tests/CMakeLists.txt @@ -202,9 +202,9 @@ else() # Otherwise, reuse ASAN_INST_TEST_OBJECTS. - add_compiler_rt_test(AsanDynamicUnitTests "${dynamic_test_name}" "${arch}" + generate_asan_tests(ASAN_INST_TEST_OBJECTS + AsanDynamicUnitTests "${dynamic_test_name}" SUBDIR "dynamic" - OBJECTS ${ASAN_INST_TEST_OBJECTS} DEPS gtest asan ${ASAN_INST_TEST_OBJECTS} LINK_FLAGS ${ASAN_DYNAMIC_UNITTEST_INSTRUMENTED_LINK_FLAGS} )
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits