[compiler-rt] r279451 - [compiler-rt] Make cxxabi availability configurable in cmake
Francis Ricci via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 22 11:31:37 PDT 2016
Author: fjricci
Date: Mon Aug 22 13:31:37 2016
New Revision: 279451
URL: http://llvm.org/viewvc/llvm-project?rev=279451&view=rev
Log:
[compiler-rt] Make cxxabi availability configurable in cmake
Summary:
Allow for use of cxxabi to be disabled from cmake.
This will make sanitizers usable when c++ abi is unavailable.
Reviewers: pcc, rnk, samsonov, beanz, compnerd
Subscribers: llvm-commits, compnerd, dberris
Differential Revision: https://reviews.llvm.org/D23639
Modified:
compiler-rt/trunk/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=279451&r1=279450&r2=279451&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Mon Aug 22 13:31:37 2016
@@ -85,6 +85,19 @@ 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
#================================
@@ -204,17 +217,6 @@ append_list_if(COMPILER_RT_HAS_WD4800_FL
# 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)
More information about the llvm-commits
mailing list