diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-11-08 14:49:28 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-11-08 14:49:28 +0000 |
commit | 275ca01c181dd04ac504971e300ccc92d334a61d (patch) | |
tree | b88b1faf89cb02430d4d64c5d1baedadf83015e0 | |
parent | 1a9cd8ddea1985ab4941a8bd2f6e20822d1e9c1d (diff) | |
download | compiler-rt-275ca01c181dd04ac504971e300ccc92d334a61d.tar.gz |
[Sanitizer] Build all sanitizer runtime libraries with debug info (with -gline-tables-only, if it's available)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@167584 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d5f669649..44f116e08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,14 @@ set(SANITIZER_COMMON_CFLAGS if(NOT WIN32) list(APPEND SANITIZER_COMMON_CFLAGS -fvisibility=hidden) endif() +# Build sanitizer runtimes with debug info. +check_cxx_compiler_flag(-gline-tables-only SUPPORTS_GLINE_TABLES_ONLY_FLAG) +if(SUPPORTS_GLINE_TABLES_ONLY_FLAG) + list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only) +else() + list(APPEND SANITIZER_COMMON_CFLAGS -g) +endif() +# Warnings suppressions. check_cxx_compiler_flag(-Wno-variadic-macros SUPPORTS_NO_VARIADIC_MACROS_FLAG) if(SUPPORTS_NO_VARIADIC_MACROS_FLAG) list(APPEND SANITIZER_COMMON_CFLAGS -Wno-variadic-macros) |