diff options
author | Etienne Bergeron <etienneb@google.com> | 2016-06-29 19:58:02 +0000 |
---|---|---|
committer | Etienne Bergeron <etienneb@google.com> | 2016-06-29 19:58:02 +0000 |
commit | f1d4e44d61b07bd48726c7e253096664e043a422 (patch) | |
tree | 634ae2638a9fe8366a9c54395549f860800472ab | |
parent | 8e10380b734ca3435b1d30e8cc7dbf23c01b8e3e (diff) | |
download | bcm5719-llvm-f1d4e44d61b07bd48726c7e253096664e043a422.tar.gz bcm5719-llvm-f1d4e44d61b07bd48726c7e253096664e043a422.zip |
[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
llvm-svn: 274153
-rw-r--r-- | compiler-rt/lib/asan/tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/tests/CMakeLists.txt b/compiler-rt/lib/asan/tests/CMakeLists.txt index 67ccdc07051..167e5ef4bf1 100644 --- a/compiler-rt/lib/asan/tests/CMakeLists.txt +++ b/compiler-rt/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 diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt index 0e2871f6fac..259c10316eb 100644 --- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt @@ -65,6 +65,10 @@ if(COMPILER_RT_TEST_COMPILER_ID MATCHES "Clang") else() list(APPEND SANITIZER_TEST_CFLAGS_COMMON -g) endif() +if(MSVC) + list(APPEND SANITIZER_TEST_CFLAGS_COMMON -gcodeview) +endif() +list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -g) if(NOT MSVC) list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON --driver-mode=g++) |