From 834763c1a4849df24fd4f9b466d0c160cf7ed44b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 17 May 2017 20:22:58 +0000 Subject: Vendor import of compiler-rt trunk r303291: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303291 --- lib/asan/tests/asan_test_utils.h | 2 +- lib/builtins/floatdidf.c | 2 +- lib/ubsan/CMakeLists.txt | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lib/asan/tests/asan_test_utils.h b/lib/asan/tests/asan_test_utils.h index f16d939c94aa..c292467220d4 100644 --- a/lib/asan/tests/asan_test_utils.h +++ b/lib/asan/tests/asan_test_utils.h @@ -30,11 +30,11 @@ #include #include #include +#include #if !defined(_WIN32) # include # include -# include #endif #ifdef __linux__ diff --git a/lib/builtins/floatdidf.c b/lib/builtins/floatdidf.c index fccb29072407..681fecef9682 100644 --- a/lib/builtins/floatdidf.c +++ b/lib/builtins/floatdidf.c @@ -104,7 +104,7 @@ __floatdidf(di_int a) } #endif -#if defined(__AEABI__) +#if defined(__ARM_EABI__) AEABI_RTABI double __aeabi_l2d(di_int a) { return __floatdidf(a); } diff --git a/lib/ubsan/CMakeLists.txt b/lib/ubsan/CMakeLists.txt index 7e10456e3142..457a6b47525d 100644 --- a/lib/ubsan/CMakeLists.txt +++ b/lib/ubsan/CMakeLists.txt @@ -34,6 +34,10 @@ 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) +append_list_if(COMPILER_RT_HAS_LIBDL dl 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) + add_compiler_rt_component(ubsan) if(APPLE) @@ -144,6 +148,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) -- cgit v1.2.3