[PATCH] [compiler-rt] Change the CMake build to generate full debugging info when COMPILER_RT_DEBUG=ON

Kuba Brecka kuba.brecka at gmail.com
Mon Dec 22 15:37:16 PST 2014


The compiler-rt CMake build currently uses `-gline-tables-only` for all builds. While this makes the debugger correctly map source files, debugging of the runtime libraries in general is pretty tough, because you don't see any local variables, parameters, etc. Let's allow emitting full debugging info by setting COMPILER_RT_DEBUG=ON.

http://reviews.llvm.org/D6764

Files:
  CMakeLists.txt

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -256,7 +256,7 @@
 endif()
 
 # Build sanitizer runtimes with debug info.
-if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG)
+if(COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG AND NOT COMPILER_RT_DEBUG)
   list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only)
 elseif(COMPILER_RT_HAS_G_FLAG)
   list(APPEND SANITIZER_COMMON_CFLAGS -g)

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6764.17575.patch
Type: text/x-patch
Size: 452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141222/25303d6c/attachment.bin>


More information about the llvm-commits mailing list