[PATCH] D23376: [compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 17:24:54 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL278764: [compiler-rt] Allow c++ abi to be explictly disabled in cmake configuration (authored by fjricci).
Changed prior to commit:
https://reviews.llvm.org/D23376?vs=68054&id=68115#toc
Repository:
rL LLVM
https://reviews.llvm.org/D23376
Files:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
Index: compiler-rt/trunk/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/CMakeLists.txt
+++ compiler-rt/trunk/CMakeLists.txt
@@ -85,6 +85,19 @@
# 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
#================================
@@ -204,17 +217,6 @@
# 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)
Index: compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
===================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
+++ compiler-rt/trunk/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 && !SANITIZER_WINDOWS
+#if CAN_SANITIZE_UB && UBSAN_CAN_USE_CXXABI
#include "ubsan_type_hash.h"
#include "sanitizer_common/sanitizer_common.h"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23376.68115.patch
Type: text/x-patch
Size: 1952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160816/044063fc/attachment.bin>
More information about the llvm-commits
mailing list