[compiler-rt] r182177 - Fix the UBSan CMake build broken in r182118

David Blaikie dblaikie at gmail.com
Sun May 19 07:04:39 PDT 2013


On May 19, 2013 6:31 AM, "Peter Collingbourne" <peter at pcc.me.uk> wrote:
>
> On Fri, May 17, 2013 at 11:57:24PM -0000, David Blaikie wrote:
> > Author: dblaikie
> > Date: Fri May 17 18:57:24 2013
> > New Revision: 182177
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=182177&view=rev
> > Log:
> > Fix the UBSan CMake build broken in r182118
> >
> > Modified:
> >     compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
> >
> > Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
> > URL:
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=182177&r1=182176&r2=182177&view=diff
> >
==============================================================================
> > --- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
> > +++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Fri May 17
18:57:24 2013
> > @@ -83,7 +83,9 @@ else()
> >      add_compiler_rt_object_library(RTSanitizerCommonLibc ${arch}
> >        SOURCES ${SANITIZER_LIBCDEP_SOURCES} CFLAGS ${SANITIZER_CFLAGS})
> >      add_compiler_rt_static_runtime(clang_rt.san-${arch} ${arch}
> > -      SOURCES ${SANITIZER_SOURCES} CFLAGS ${SANITIZER_CFLAGS})
> > +      SOURCES ${SANITIZER_SOURCES}
> > +      $<TARGET_OBJECTS:RTSanitizerCommonLibc.${arch}> CFLAGS
> > +      ${SANITIZER_CFLAGS})
>
> So it looks like we're building most of sanitizer_common's
> objects twice here.  Is there any reason why we shouldn't use
> RTSanitizerCommon's objects when building clang_rt.san?

My very limited understanding is that this is using the objects
(target_objects) rather than the source, but I admit I haven't spent
much/any time understanding the cmake build system or our use of it (& had
some help from Richard smith with this change).

If you have better ideas/understanding about how to do this, I'm happy to
defer to that.

>
> Thanks,
> --
> Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130519/42b334a2/attachment.html>


More information about the llvm-commits mailing list