diff options
author | Petr Hosek <phosek@chromium.org> | 2017-07-28 03:39:38 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-07-28 03:39:38 +0000 |
commit | d630c5dde1026eee0e5a1fb886791adf21ab95a6 (patch) | |
tree | d9521f5d3c1d37520280d14da296381d6ae837ec /lib/ubsan | |
parent | ab3ad40db18c65299f5c4dbcd0cec54a774e50cf (diff) |
Support compiler-rt builtins
This change adds support for compiler-rt builtins as an alternative
compiler runtime to libgcc.
Differential Revision: https://reviews.llvm.org/D35165
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan')
-rw-r--r-- | lib/ubsan/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ubsan/CMakeLists.txt b/lib/ubsan/CMakeLists.txt index cf4b30bd3..c7473bbed 100644 --- a/lib/ubsan/CMakeLists.txt +++ b/lib/ubsan/CMakeLists.txt @@ -34,10 +34,13 @@ set(UBSAN_CXXFLAGS ${SANITIZER_COMMON_CFLAGS}) append_rtti_flag(ON UBSAN_CXXFLAGS) append_list_if(SANITIZER_CAN_USE_CXXABI -DUBSAN_CAN_USE_CXXABI UBSAN_CXXFLAGS) +set(UBSAN_DYNAMIC_LIBS ${SANITIZER_COMMON_LINK_LIBS}) + 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_LIBRT rt 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) @@ -156,6 +159,7 @@ else() RTSanitizerCommonLibc RTUbsan CFLAGS ${UBSAN_CFLAGS} + LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS} LINK_LIBS ${UBSAN_DYNAMIC_LIBS} PARENT_TARGET ubsan) @@ -167,6 +171,7 @@ else() RTUbsan RTUbsan_cxx CFLAGS ${UBSAN_CXXFLAGS} + LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS} LINK_LIBS ${UBSAN_DYNAMIC_LIBS} PARENT_TARGET ubsan) |