From: Francis Ricci Date: Tue, 16 Aug 2016 13:58:56 +0000 (+0000) Subject: Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration" X-Git-Tag: llvmorg-4.0.0-rc1~12333 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d6aa8a4759a9d351e924f120b48025cab1ffee1;p=platform%2Fupstream%2Fllvm.git Revert "[compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration" This reverts commit cd5fa595648378f38cdad8b07e18433639c28a9c. llvm-svn: 278800 --- diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt index a121519..f72fb01 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -85,19 +85,6 @@ option(COMPILER_RT_EXTERNALIZE_DEBUGINFO # COMPILER_RT_DEBUG_PYBOOL is used by lit.common.configured.in. pythonize_bool(COMPILER_RT_DEBUG) -if(APPLE AND SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.9") - # Mac OS X prior to 10.9 had problems with exporting symbols from - # libc++/libc++abi. - set(use_cxxabi_default OFF) -elseif(MSVC) - set(use_cxxabi_default OFF) -else() - set(use_cxxabi_default ON) -endif() - -option(SANITIZER_CAN_USE_CXXABI "Sanitizers can use cxxabi" ${use_cxxabi_default}) -pythonize_bool(SANITIZER_CAN_USE_CXXABI) - #================================ # Setup Compiler Flags #================================ @@ -217,6 +204,17 @@ append_list_if(COMPILER_RT_HAS_WD4800_FLAG /wd4800 SANITIZER_COMMON_CFLAGS) # Warnings to turn off for all libraries, not just sanitizers. append_string_if(COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG -Wno-unused-parameter CMAKE_C_FLAGS CMAKE_CXX_FLAGS) +if(APPLE AND SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.9") + # Mac OS X prior to 10.9 had problems with exporting symbols from + # libc++/libc++abi. + set(SANITIZER_CAN_USE_CXXABI FALSE) +elseif(MSVC) + set(SANITIZER_CAN_USE_CXXABI FALSE) +else() + set(SANITIZER_CAN_USE_CXXABI TRUE) +endif() +pythonize_bool(SANITIZER_CAN_USE_CXXABI) + add_subdirectory(include) set(COMPILER_RT_LIBCXX_PATH ${LLVM_MAIN_SRC_DIR}/projects/libcxx) diff --git a/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc b/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc index f5b3cca..26272e3 100644 --- a/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc +++ b/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc @@ -13,7 +13,7 @@ #include "sanitizer_common/sanitizer_platform.h" #include "ubsan_platform.h" -#if CAN_SANITIZE_UB && UBSAN_CAN_USE_CXXABI +#if CAN_SANITIZE_UB && !SANITIZER_WINDOWS #include "ubsan_type_hash.h" #include "sanitizer_common/sanitizer_common.h"