[PATCH] D33216: Generate ubsan shared libraries.
Leo Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 21:01:10 PDT 2017
aoli updated this revision to Diff 99237.
aoli added a comment.
Have ubsan_standalone and ubsan_standalone_cxx separately.
https://reviews.llvm.org/D33216
Files:
lib/ubsan/CMakeLists.txt
Index: lib/ubsan/CMakeLists.txt
===================================================================
--- lib/ubsan/CMakeLists.txt
+++ lib/ubsan/CMakeLists.txt
@@ -34,6 +34,14 @@
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)
+
add_compiler_rt_component(ubsan)
if(APPLE)
@@ -144,6 +152,27 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33216.99237.patch
Type: text/x-patch
Size: 1608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170517/e86e1511/attachment-0001.bin>
More information about the llvm-commits
mailing list