[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: [libcxx] r243574 - Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLV
From:       Alexey Samsonov <vonosmas () gmail ! com>
Date:       2015-07-31 1:00:56
Message-ID: CAFBZoY-v7sZQpr+FRykjwsu-vfmM9E=02y2SoQ9aoiP9F4smYw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Some of this is caused by -Werror: when we boostrap LLVM with just-built
Clang, we pass LLVM_ENABLE_WERROR, and looks like it fires a warning for
libc++:

/mnt/b/sanitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/projects/libcxx/include/locale:1879:29:
error: 'std::__1::__time_get_c_storage<char>' has virtual functions
but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
class _LIBCPP_TYPE_VIS_ONLY __time_get_c_storage


On Thu, Jul 30, 2015 at 5:35 PM, Eric Fiselier <eric@efcs.ca> wrote:

> Looks like the updated commit broke the sanitizer build again. I'm
> looking into it but I'm having trouble reproducing.
> If anybody has access to the logs I would like to see them.
>
> On Thu, Jul 30, 2015 at 6:33 PM, Eric Fiselier <eric@efcs.ca> wrote:
> > FYI I recommitted the working parts of this patch as r243698. I
> > removed the "HandleLLVMOptions.cmake" include which was causing all of
> > the problems. Please let me know if anything comes up.
> >
> > /Eric
> >
> >
> > On Thu, Jul 30, 2015 at 4:26 PM, Eric Fiselier <eric@efcs.ca> wrote:
> >>> What would/does `-DLLVM_USE_SANITIZER=Thread` do differently than
> `-DCMAKE_CXX_FLAGS=-
> >>> fsanitize=thread` here?
> >>
> >> Using LLVM_USE_SANITIZER will prevent LLVM from adding certain link
> >> flags such as '-Wl,-z,defs', '-ffunction-sections' and
> >> '-fdata-sections' and it will force LLVM to provide some level of
> >> debug information in RELEASE mode.
> >>
> >> For sanitizers other than Thread, LLVM_USE_SANITIZER will add extra
> >> flags such as '-fsanitize-no-recover'.
> >>
> >> Also, for libc++, using LLVM_USE_SANITIZER sets the testsuite up to
> >> run with the sanitizers as well.
> >>
> >> On Thu, Jul 30, 2015 at 4:09 PM, Jonathan Roelofs
> >> <jonathan@codesourcery.com> wrote:
> >>>
> >>>
> >>> On 7/30/15 12:47 PM, Alexey Samsonov wrote:
> >>>>
> >>>> I actually support the idea of including LLVM CMake modules from
> >>>> libc++ CMake: the logic for building instrumented LLVM and building
> >>>> instrumented libc++ should better be listed in a single place, and be
> >>>> controlled by LLVM_USE_SANITIZER options: i.e. when we configure
> >>>> libc++ from compiler-rt, we should pass -DLLVM_USE_SANITIZER=Thread
> >>>> rather than -DCMAKE_CXX_FLAGS=-fsanitize=thread. It's not possible to
> >>>> do this right now, though (for instance we build two different
> >>>> versions of MSan-libc++), but I think I'd be able to work on that
> >>>> once your patch lands and the dust settles.
> >>>>
> >>>
> >>> What would/does `-DLLVM_USE_SANITIZER=Thread` do differently than
> >>> `-DCMAKE_CXX_FLAGS=-fsanitize=thread` here?
> >>>
> >>>
> >>> Jon
> >>>
> >>>
> >>> --
> >>> Jon Roelofs
> >>> jonathan@codesourcery.com
> >>> CodeSourcery / Mentor Embedded
>



-- 
Alexey Samsonov
vonosmas@gmail.com

[Attachment #5 (text/html)]

<div dir="ltr">Some of this is caused by -Werror: when we boostrap LLVM with \
just-built Clang, we pass LLVM_ENABLE_WERROR, and looks like it fires a warning for \
libc++:<div><br></div><div><pre style="font-family:&#39;Courier \
New&#39;,courier,monotype,monospace;color:rgb(0,0,0);font-size:medium"><span>/mnt/b/sa \
nitizer-buildbot1/sanitizer-x86_64-linux/build/llvm/projects/libcxx/include/locale:1879:29: \
error: &#39;std::__1::__time_get_c_storage&lt;char&gt;&#39; has virtual functions but \
non-virtual destructor [-Werror,-Wnon-virtual-dtor] class _LIBCPP_TYPE_VIS_ONLY \
__time_get_c_storage</span></pre></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Thu, Jul 30, 2015 at 5:35 PM, Eric Fiselier <span \
dir="ltr">&lt;<a href="mailto:eric@efcs.ca" \
target="_blank">eric@efcs.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looks like the \
updated commit broke the sanitizer build again. I&#39;m<br> looking into it but \
I&#39;m having trouble reproducing.<br> If anybody has access to the logs I would \
like to see them.<br> <div class="HOEnZb"><div class="h5"><br>
On Thu, Jul 30, 2015 at 6:33 PM, Eric Fiselier &lt;<a \
href="mailto:eric@efcs.ca">eric@efcs.ca</a>&gt; wrote:<br> &gt; FYI I recommitted the \
working parts of this patch as r243698. I<br> &gt; removed the \
&quot;HandleLLVMOptions.cmake&quot; include which was causing all of<br> &gt; the \
problems. Please let me know if anything comes up.<br> &gt;<br>
&gt; /Eric<br>
&gt;<br>
&gt;<br>
&gt; On Thu, Jul 30, 2015 at 4:26 PM, Eric Fiselier &lt;<a \
href="mailto:eric@efcs.ca">eric@efcs.ca</a>&gt; wrote:<br> &gt;&gt;&gt; What \
would/does `-DLLVM_USE_SANITIZER=Thread` do differently than `-DCMAKE_CXX_FLAGS=-<br> \
&gt;&gt;&gt; fsanitize=thread` here?<br> &gt;&gt;<br>
&gt;&gt; Using LLVM_USE_SANITIZER will prevent LLVM from adding certain link<br>
&gt;&gt; flags such as &#39;-Wl,-z,defs&#39;, &#39;-ffunction-sections&#39; and<br>
&gt;&gt; &#39;-fdata-sections&#39; and it will force LLVM to provide some level \
of<br> &gt;&gt; debug information in RELEASE mode.<br>
&gt;&gt;<br>
&gt;&gt; For sanitizers other than Thread, LLVM_USE_SANITIZER will add extra<br>
&gt;&gt; flags such as &#39;-fsanitize-no-recover&#39;.<br>
&gt;&gt;<br>
&gt;&gt; Also, for libc++, using LLVM_USE_SANITIZER sets the testsuite up to<br>
&gt;&gt; run with the sanitizers as well.<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Jul 30, 2015 at 4:09 PM, Jonathan Roelofs<br>
&gt;&gt; &lt;<a href="mailto:jonathan@codesourcery.com">jonathan@codesourcery.com</a>&gt; \
wrote:<br> &gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 7/30/15 12:47 PM, Alexey Samsonov wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I actually support the idea of including LLVM CMake modules from<br>
&gt;&gt;&gt;&gt; libc++ CMake: the logic for building instrumented LLVM and \
building<br> &gt;&gt;&gt;&gt; instrumented libc++ should better be listed in a single \
place, and be<br> &gt;&gt;&gt;&gt; controlled by LLVM_USE_SANITIZER options: i.e. \
when we configure<br> &gt;&gt;&gt;&gt; libc++ from compiler-rt, we should pass \
-DLLVM_USE_SANITIZER=Thread<br> &gt;&gt;&gt;&gt; rather than \
-DCMAKE_CXX_FLAGS=-fsanitize=thread. It&#39;s not possible to<br> &gt;&gt;&gt;&gt; do \
this right now, though (for instance we build two different<br> &gt;&gt;&gt;&gt; \
versions of MSan-libc++), but I think I&#39;d be able to work on that<br> \
&gt;&gt;&gt;&gt; once your patch lands and the dust settles.<br> &gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; What would/does `-DLLVM_USE_SANITIZER=Thread` do differently than<br>
&gt;&gt;&gt; `-DCMAKE_CXX_FLAGS=-fsanitize=thread` here?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Jon<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; --<br>
&gt;&gt;&gt; Jon Roelofs<br>
&gt;&gt;&gt; <a href="mailto:jonathan@codesourcery.com">jonathan@codesourcery.com</a><br>
 &gt;&gt;&gt; CodeSourcery / Mentor Embedded<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a \
href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div> \
</div>



_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic