summaryrefslogtreecommitdiff
path: root/lib/asan/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-06-29 19:58:02 +0000
committerEtienne Bergeron <etienneb@google.com>2016-06-29 19:58:02 +0000
commitc9bc2abdad47a5169ce6864f53df2c6ab2c60419 (patch)
treef1dac4408e14277f4aa1901e33511a60dc080d19 /lib/asan/tests/CMakeLists.txt
parentf7e391c2db76a63ba41379f9c450d9a4c94b8809 (diff)
[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
Diffstat (limited to 'lib/asan/tests/CMakeLists.txt')
-rw-r--r--lib/asan/tests/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
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