From c9bc2abdad47a5169ce6864f53df2c6ab2c60419 Mon Sep 17 00:00:00 2001 From: Etienne Bergeron Date: Wed, 29 Jun 2016 19:58:02 +0000 Subject: [compiler-rt] Fix passing debug information to unittest. Summary: On windows, the debug information was not present in the unittest executables, which make them hard to debug. The Sanitizer Unittests are compiled with a local clang build. The link pass is also done by calling clang. This pass is adding the appropriate flags to bring the right debug information to these executables. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D21838 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274153 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/asan/tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/asan/tests/CMakeLists.txt') diff --git a/lib/asan/tests/CMakeLists.txt b/lib/asan/tests/CMakeLists.txt index 67ccdc070..167e5ef4b 100644 --- a/lib/asan/tests/CMakeLists.txt +++ b/lib/asan/tests/CMakeLists.txt @@ -45,6 +45,10 @@ if(COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang") else() list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -g) endif() +if(MSVC) + list(APPEND SANITIZER_TEST_CFLAGS_COMMON -gcodeview) +endif() +list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -g) # Use -D instead of definitions to please custom compile command. list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -- cgit v1.2.3