[compiler-rt] r262723 - [ubsan/cmake] Make sure we end up adding -frtti to ubsan_type_hash_itanium.cc, even if -fno-rtti is the default for the platform

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 11:33:32 PST 2016


I think that you should at least add -frtti to UBSAN_CXX_SOURCES for
consistency (currently, on the platforms
where -frtti is the default, we build all UBSAN_CXX_SOURCES with RTTI
enabled), but this means you'd need to
add a different flag for ubsan_type_hash_win.cc

On Fri, Mar 4, 2016 at 11:25 AM, Filipe Cabecinhas <me at filcab.net> wrote:

> Not sure it's worth it for just one case, though. Let me know if you'd
> really like to have it anyway.
>
> Thank you,
>
>   Filipe
>
> On Fri, Mar 4, 2016 at 7:08 PM, Alexey Samsonov via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Note that we have append_no_rtti_flag() macro. Maybe, we can use more
> > generic version of force_rtti() or smth. like that?
> >
> > On Fri, Mar 4, 2016 at 9:02 AM, Filipe Cabecinhas via llvm-commits
> > <llvm-commits at lists.llvm.org> wrote:
> >>
> >> Author: filcab
> >> Date: Fri Mar  4 11:02:06 2016
> >> New Revision: 262723
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=262723&view=rev
> >> Log:
> >> [ubsan/cmake] Make sure we end up adding -frtti to
> >> ubsan_type_hash_itanium.cc, even if -fno-rtti is the default for the
> >> platform
> >>
> >> Modified:
> >>     compiler-rt/trunk/lib/ubsan/CMakeLists.txt
> >>
> >> Modified: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/CMakeLists.txt?rev=262723&r1=262722&r2=262723&view=diff
> >>
> >>
> ==============================================================================
> >> --- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
> >> +++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Fri Mar  4 11:02:06 2016
> >> @@ -31,6 +31,9 @@ append_list_if(SANITIZER_CAN_USE_CXXABI
> >>
> >>  set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CFLAGS})
> >>  append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI
> >> UBSAN_CXXFLAGS)
> >> +# Make sure we end with -frtti on type_hash
> >> +set_property(SOURCE ubsan_type_hash_itanium.cc APPEND_STRING PROPERTY
> >> +  COMPILE_FLAGS " -frtti")
> >>
> >>  add_custom_target(ubsan)
> >>
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> >
> >
> >
> > --
> > Alexey Samsonov
> > vonosmas at gmail.com
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160304/12ebcb35/attachment.html>


More information about the llvm-commits mailing list