[compiler-rt] r303276 - Generate ubsan shared libraries.

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 10:32:29 PDT 2017


Hi Leo,

I think Filipe had a question about something in here, --

> On May 17, 2017, at 10:17 AM, Leo Li via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Author: aoli
> Date: Wed May 17 12:17:41 2017
> New Revision: 303276
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=303276&view=rev
> Log:
> Generate ubsan shared libraries.
> 
> Summary: Those libraries are required by aosp (https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/Android.mk). Currenly the shared libraries are generated by aosp Makefile system. We are looking forward to using cmake to generate them.
> 
> Reviewers: llvm-commits, vsk
> 
> Reviewed By: vsk
> 
> Subscribers: filcab, vsk, srhines, kubamracek, mgorny, krytarowski
> 
> Differential Revision: https://reviews.llvm.org/D33216
> 
> 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=303276&r1=303275&r2=303276&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Wed May 17 12:17:41 2017
> @@ -34,6 +34,14 @@ set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CF
> append_rtti_flag(ON UBSAN_CXXFLAGS)
> append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI UBSAN_CXXFLAGS)
> 
> +append_list_if(COMPILER_RT_HAS_LIBDL dl UBSAN_DYNAMIC_LIBS)
> +append_list_if(COMPILER_RT_HAS_LIBLOG log UBSAN_DYNAMIC_LIBS)
> +append_list_if(COMPILER_RT_HAS_LIBC c UBSAN_DYNAMIC_LIBS)
> +append_list_if(COMPILER_RT_HAS_LIBRT rt UBSAN_DYNAMIC_LIBS)
> +append_list_if(COMPILER_RT_HAS_LIBM m UBSAN_DYNAMIC_LIBS)
> +append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread UBSAN_DYNAMIC_LIBS)
> +append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ UBSAN_DYNAMIC_LIBS)

^ "I wouldn't expect the non-c++ version of the lib to bring libstdc++ with it."

I agree. What do you think?

vedant

> + 
> add_compiler_rt_component(ubsan)
> 
> if(APPLE)
> @@ -144,6 +152,27 @@ else()
>       CFLAGS ${UBSAN_CXXFLAGS}
>       PARENT_TARGET ubsan)
> 
> +    add_compiler_rt_runtime(clang_rt.ubsan_standalone
> +      SHARED
> +      ARCHS ${UBSAN_SUPPORTED_ARCH}
> +      OBJECT_LIBS RTSanitizerCommon
> +              RTSanitizerCommonLibc
> +              RTUbsan
> +      CFLAGS ${UBSAN_CFLAGS}
> +      LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
> +      PARENT_TARGET ubsan)
> +
> +    add_compiler_rt_runtime(clang_rt.ubsan_standalone_cxx
> +      SHARED
> +      ARCHS ${UBSAN_SUPPORTED_ARCH}
> +      OBJECT_LIBS RTSanitizerCommon
> +              RTSanitizerCommonLibc
> +              RTUbsan
> +              RTUbsan_cxx
> +      CFLAGS ${UBSAN_CXXFLAGS}
> +      LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
> +      PARENT_TARGET ubsan)
> +
>     if (UNIX)
>       set(ARCHS_FOR_SYMBOLS ${UBSAN_SUPPORTED_ARCH})
>       list(REMOVE_ITEM ARCHS_FOR_SYMBOLS i386 i686)
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170517/5017ee8c/attachment.html>


More information about the llvm-commits mailing list