cxx/test/lit.site.cfg.in
Eric Fiselier 25a1516832 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215872 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 05:03:46 +00:00

13 lines
557 B
INI

@AUTO_GEN_COMMENT@
config.cxx_under_test = "@LIBCXX_COMPILER@"
config.std = "@LIBCXX_STD_VERSION@"
config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
config.python_executable = "@PYTHON_EXECUTABLE@"
config.enable_shared = @LIBCXX_ENABLE_SHARED@
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
# Let the main config do the real work.
lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")