summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-08-18 05:03:46 +0000
committerEric Fiselier <eric@efcs.ca>2014-08-18 05:03:46 +0000
commit0058c80cc7b08deaaad5eb22f8903d367bf592f8 (patch)
treeb807170b8d164de29cd0a97ed29987208356b540 /libcxx/cmake
parent9e7b17b0d484861350c4b818697b81e1bc8ac96a (diff)
downloadbcm5719-llvm-0058c80cc7b08deaaad5eb22f8903d367bf592f8.tar.gz
bcm5719-llvm-0058c80cc7b08deaaad5eb22f8903d367bf592f8.zip
[libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree
Summary: This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. This patch does the following things: 1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it. 2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake. 3. Add config.llvm_use_sanitizer to lit.site.cfg.in 4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg. Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4949 llvm-svn: 215872
Diffstat (limited to 'libcxx/cmake')
-rw-r--r--libcxx/cmake/config-ix.cmake43
1 files changed, 22 insertions, 21 deletions
diff --git a/libcxx/cmake/config-ix.cmake b/libcxx/cmake/config-ix.cmake
index 6aa4fa2da75..2596787a3d3 100644
--- a/libcxx/cmake/config-ix.cmake
+++ b/libcxx/cmake/config-ix.cmake
@@ -2,27 +2,28 @@ include(CheckLibraryExists)
include(CheckCXXCompilerFlag)
# Check compiler flags
-check_cxx_compiler_flag(-std=c++11 LIBCXX_HAS_STDCXX11_FLAG)
-check_cxx_compiler_flag(-std=c++1y LIBCXX_HAS_STDCXX1Y_FLAG)
-check_cxx_compiler_flag(-fPIC LIBCXX_HAS_FPIC_FLAG)
-check_cxx_compiler_flag(-nodefaultlibs LIBCXX_HAS_NODEFAULTLIBS_FLAG)
-check_cxx_compiler_flag(-nostdinc++ LIBCXX_HAS_NOSTDINCXX_FLAG)
-check_cxx_compiler_flag(-Wall LIBCXX_HAS_WALL_FLAG)
-check_cxx_compiler_flag(-W LIBCXX_HAS_W_FLAG)
-check_cxx_compiler_flag(-Wno-unused-parameter LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG)
-check_cxx_compiler_flag(-Wwrite-strings LIBCXX_HAS_WWRITE_STRINGS_FLAG)
-check_cxx_compiler_flag(-Wno-long-long LIBCXX_HAS_WNO_LONG_LONG_FLAG)
-check_cxx_compiler_flag(-pedantic LIBCXX_HAS_PEDANTIC_FLAG)
-check_cxx_compiler_flag(-Werror LIBCXX_HAS_WERROR_FLAG)
-check_cxx_compiler_flag(-Wno-error LIBCXX_HAS_WNO_ERROR_FLAG)
-check_cxx_compiler_flag(-fno-exceptions LIBCXX_HAS_FNO_EXCEPTIONS_FLAG)
-check_cxx_compiler_flag(-fno-rtti LIBCXX_HAS_FNO_RTTI_FLAG)
-check_cxx_compiler_flag(/WX LIBCXX_HAS_WX_FLAG)
-check_cxx_compiler_flag(/WX- LIBCXX_HAS_NO_WX_FLAG)
-check_cxx_compiler_flag(/EHsc LIBCXX_HAS_EHSC_FLAG)
-check_cxx_compiler_flag(/EHs- LIBCXX_HAS_NO_EHS_FLAG)
-check_cxx_compiler_flag(/EHa- LIBCXX_HAS_NO_EHA_FLAG)
-check_cxx_compiler_flag(/GR- LIBCXX_HAS_NO_GR_FLAG)
+check_cxx_compiler_flag(-std=c++11 LIBCXX_HAS_STDCXX11_FLAG)
+check_cxx_compiler_flag(-std=c++1y LIBCXX_HAS_STDCXX1Y_FLAG)
+check_cxx_compiler_flag(-fPIC LIBCXX_HAS_FPIC_FLAG)
+check_cxx_compiler_flag(-fno-omit-frame-pointer LIBCXX_HAS_NO_OMIT_FRAME_POINTER_FLAG)
+check_cxx_compiler_flag(-nodefaultlibs LIBCXX_HAS_NODEFAULTLIBS_FLAG)
+check_cxx_compiler_flag(-nostdinc++ LIBCXX_HAS_NOSTDINCXX_FLAG)
+check_cxx_compiler_flag(-Wall LIBCXX_HAS_WALL_FLAG)
+check_cxx_compiler_flag(-W LIBCXX_HAS_W_FLAG)
+check_cxx_compiler_flag(-Wno-unused-parameter LIBCXX_HAS_WNO_UNUSED_PARAMETER_FLAG)
+check_cxx_compiler_flag(-Wwrite-strings LIBCXX_HAS_WWRITE_STRINGS_FLAG)
+check_cxx_compiler_flag(-Wno-long-long LIBCXX_HAS_WNO_LONG_LONG_FLAG)
+check_cxx_compiler_flag(-pedantic LIBCXX_HAS_PEDANTIC_FLAG)
+check_cxx_compiler_flag(-Werror LIBCXX_HAS_WERROR_FLAG)
+check_cxx_compiler_flag(-Wno-error LIBCXX_HAS_WNO_ERROR_FLAG)
+check_cxx_compiler_flag(-fno-exceptions LIBCXX_HAS_FNO_EXCEPTIONS_FLAG)
+check_cxx_compiler_flag(-fno-rtti LIBCXX_HAS_FNO_RTTI_FLAG)
+check_cxx_compiler_flag(/WX LIBCXX_HAS_WX_FLAG)
+check_cxx_compiler_flag(/WX- LIBCXX_HAS_NO_WX_FLAG)
+check_cxx_compiler_flag(/EHsc LIBCXX_HAS_EHSC_FLAG)
+check_cxx_compiler_flag(/EHs- LIBCXX_HAS_NO_EHS_FLAG)
+check_cxx_compiler_flag(/EHa- LIBCXX_HAS_NO_EHA_FLAG)
+check_cxx_compiler_flag(/GR- LIBCXX_HAS_NO_GR_FLAG)
# Check libraries
check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
OpenPOWER on IntegriCloud