[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
This commit is contained in:
parent
8e10380b73
commit
f1d4e44d61
|
@ -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
|
||||
|
|
|
@ -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++)
|
||||
|
|
Loading…
Reference in New Issue