[PATCH] D38840: [compiler-rt] [cmake] [asan] Reuse generate_asan_tests for dynamic tests

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 12 01:50:17 PDT 2017


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}
         )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38840.118755.patch
Type: text/x-patch
Size: 642 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171012/62deb832/attachment.bin>


More information about the cfe-commits mailing list