<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 25, 2015 at 2:24 PM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry for resurrecting such an old thread :-)<br>
<br>
On Thu, Nov 8, 2012 at 6:49 AM, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> wrote:<br>
> Author: samsonov<br>
> Date: Thu Nov  8 08:49:28 2012<br>
> New Revision: 167584<br>
><br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D167584-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=XzXH-de_WiMVTcHzqI44isSy_j8gW5BozFLNP19aZQY&s=JKbsKKPM_Lin-mJ7zmcOXjnouEExGjauWmLGRPpImWk&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=167584&view=rev</a><br>
> Log:<br>
> [Sanitizer] Build all sanitizer runtime libraries with debug info (with -gline-tables-only, if it's available)<br>
<br>
When trying to switch the release script to use CMake instead of<br>
Autoconf, I get binary diffs between Phase 2 and 3 in bootstrap builds<br>
for the sanitizer runtime. I looks like the diffs are in debug info,<br>
which the Autoconf build didn't have.<br>
<br>
Do you think we need debug info in the release binaries, or can we<br>
turn it off, possibly with some flag?<br></blockquote><div><br></div><div>Yes, I think we need to have at least -gmlt info in sanitizer runtimes in the release build. They are linked</div><div>into the user executable, and frames from them often appear in stack traces.</div><div><br></div><div>We can certainly add a CMake flag to disable debug info... but it should be off by default, so that</div><div>released binaries will have debug info.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Modified: compiler-rt/trunk/CMakeLists.txt<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_compiler-2Drt_trunk_CMakeLists.txt-3Frev-3D167584-26r1-3D167583-26r2-3D167584-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=XzXH-de_WiMVTcHzqI44isSy_j8gW5BozFLNP19aZQY&s=5_N01y91Wh1HN8WXvOAo0pxupLmM6rfqwGvHgidN0cU&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=167584&r1=167583&r2=167584&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/CMakeLists.txt (original)<br>
> +++ compiler-rt/trunk/CMakeLists.txt Thu Nov  8 08:49:28 2012<br>
> @@ -72,6 +72,14 @@<br>
>  if(NOT WIN32)<br>
>    list(APPEND SANITIZER_COMMON_CFLAGS -fvisibility=hidden)<br>
>  endif()<br>
> +# Build sanitizer runtimes with debug info.<br>
> +check_cxx_compiler_flag(-gline-tables-only SUPPORTS_GLINE_TABLES_ONLY_FLAG)<br>
> +if(SUPPORTS_GLINE_TABLES_ONLY_FLAG)<br>
> +  list(APPEND SANITIZER_COMMON_CFLAGS -gline-tables-only)<br>
> +else()<br>
> +  list(APPEND SANITIZER_COMMON_CFLAGS -g)<br>
> +endif()<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Alexey Samsonov, Mountain View, CA</div></div></div>
</div></div>