[llvm-commits] [compiler-rt] r167584 - /compiler-rt/trunk/CMakeLists.txt

Alexey Samsonov samsonov at google.com
Thu Jun 25 14:32:02 PDT 2015


On Thu, Jun 25, 2015 at 2:24 PM, Hans Wennborg <hans at chromium.org> wrote:

> Sorry for resurrecting such an old thread :-)
>
> On Thu, Nov 8, 2012 at 6:49 AM, Alexey Samsonov <samsonov at google.com>
> wrote:
> > Author: samsonov
> > Date: Thu Nov  8 08:49:28 2012
> > New Revision: 167584
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=167584&view=rev
> > Log:
> > [Sanitizer] Build all sanitizer runtime libraries with debug info (with
> -gline-tables-only, if it's available)
>
> When trying to switch the release script to use CMake instead of
> Autoconf, I get binary diffs between Phase 2 and 3 in bootstrap builds
> for the sanitizer runtime. I looks like the diffs are in debug info,
> which the Autoconf build didn't have.
>
> Do you think we need debug info in the release binaries, or can we
> turn it off, possibly with some flag?
>

Yes, I think we need to have at least -gmlt info in sanitizer runtimes in
the release build. They are linked
into the user executable, and frames from them often appear in stack traces.

We can certainly add a CMake flag to disable debug info... but it should be
off by default, so that
released binaries will have debug info.


>
> > Modified: compiler-rt/trunk/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=167584&r1=167583&r2=167584&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/CMakeLists.txt (original)
> > +++ compiler-rt/trunk/CMakeLists.txt Thu Nov  8 08:49:28 2012
> > @@ -72,6 +72,14 @@
> >  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()
>



-- 
Alexey Samsonov, Mountain View, CA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150625/ee4d2349/attachment.html>


More information about the llvm-commits mailing list