2014-07-10 10:20:11 +08:00
|
|
|
@AUTO_GEN_COMMENT@
|
2015-01-22 07:06:22 +08:00
|
|
|
config.cxx_under_test = "@LIBCXXABI_COMPILER@"
|
2015-10-15 02:20:48 +08:00
|
|
|
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
2015-01-22 07:06:22 +08:00
|
|
|
config.libcxxabi_src_root = "@LIBCXXABI_SOURCE_DIR@"
|
2015-02-11 09:07:48 +08:00
|
|
|
config.libcxxabi_obj_root = "@LIBCXXABI_BINARY_DIR@"
|
2015-03-18 03:45:21 +08:00
|
|
|
config.abi_library_path = "@LIBCXXABI_LIBRARY_DIR@"
|
2015-01-23 04:00:06 +08:00
|
|
|
config.libcxx_src_root = "@LIBCXXABI_LIBCXX_PATH@"
|
2015-01-22 07:06:22 +08:00
|
|
|
config.cxx_headers = "@LIBCXXABI_LIBCXX_INCLUDES@"
|
2017-04-04 22:03:54 +08:00
|
|
|
config.libunwind_headers = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"
|
2015-03-18 02:58:14 +08:00
|
|
|
config.cxx_library_root = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.llvm_unwinder = @LIBCXXABI_USE_LLVM_UNWINDER@
|
2019-02-06 03:50:47 +08:00
|
|
|
config.builtins_library = "@LIBCXXABI_BUILTINS_LIBRARY@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.enable_threads = @LIBCXXABI_ENABLE_THREADS@
|
2015-01-22 07:06:22 +08:00
|
|
|
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
|
2018-10-11 06:00:58 +08:00
|
|
|
config.sanitizer_library = "@LIBCXXABI_SANITIZER_LIBRARY@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.enable_32bit = @LIBCXXABI_BUILD_32_BITS@
|
2015-02-26 23:55:01 +08:00
|
|
|
config.target_info = "@LIBCXXABI_TARGET_INFO@"
|
|
|
|
config.executor = "@LIBCXXABI_EXECUTOR@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.libcxxabi_shared = @LIBCXXABI_ENABLE_SHARED@
|
|
|
|
config.enable_shared = @LIBCXX_ENABLE_SHARED@
|
|
|
|
config.enable_exceptions = @LIBCXXABI_ENABLE_EXCEPTIONS@
|
2016-11-13 22:44:41 +08:00
|
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
|
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
[CMake] Support CMake variables for setting target, sysroot and toolchain
CMake has a standard way of setting target triple, sysroot and external
toolchain through CMAKE_<LANG>_COMPILER_TARGET, CMAKE_SYSROOT and
CMAKE_<LANG>_COMPILER_EXTERNAL_TOOLCHAIN. These are turned into
corresponding --target=, --sysroot= and --gcc-toolchain= variables add
included appended to CMAKE_<LANG>_FLAGS.
libunwind, libc++abi, libc++ provides their own mechanism through
<PROJECT>_TARGET_TRIPLE, <PROJECT>_SYSROOT and <PROJECT>_GCC_TOOLCHAIN
variables. These are also passed to lit via lit.site.cfg, and lit config
uses these to set the corresponding compiler flags when building tessts.
This means that there are two different ways of setting target, sysroot
and toolchain, but only one is properly supported in lit. This change
extends CMake build for libunwind, libc++abi and libc++ to also support
the CMake variables in addition to project specific ones in lit.
Differential Revision: https://reviews.llvm.org/D57670
llvm-svn: 353084
2019-02-05 04:02:26 +08:00
|
|
|
config.use_target = bool("@LIBCXXABI_TARGET_TRIPLE@")
|
2017-12-12 09:20:37 +08:00
|
|
|
config.sysroot = "@LIBCXXABI_SYSROOT@"
|
|
|
|
config.gcc_toolchain = "@LIBCXXABI_GCC_TOOLCHAIN@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.cxx_ext_threads = @LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY@
|
2014-07-10 10:20:11 +08:00
|
|
|
|
|
|
|
# Let the main config do the real work.
|
|
|
|
lit_config.load_config(config, "@LIBCXXABI_SOURCE_DIR@/test/lit.cfg")
|