2017-07-06 23:20:12 +08:00
|
|
|
@AUTO_GEN_COMMENT@
|
|
|
|
config.cxx_under_test = "@LIBUNWIND_COMPILER@"
|
|
|
|
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
|
|
|
config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
|
|
|
|
config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
|
|
|
|
config.abi_library_path = "@LIBUNWIND_LIBRARY_DIR@"
|
|
|
|
config.libcxx_src_root = "@LIBUNWIND_LIBCXX_PATH@"
|
|
|
|
config.libunwind_headers = "@LIBUNWIND_SOURCE_DIR@/include"
|
|
|
|
config.cxx_library_root = "@LIBUNWIND_LIBCXX_LIBRARY_PATH@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.llvm_unwinder = True
|
2019-02-06 03:50:47 +08:00
|
|
|
config.builtins_library = "@LIBUNWIND_BUILTINS_LIBRARY@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.enable_threads = @LIBUNWIND_ENABLE_THREADS@
|
2017-07-06 23:20:12 +08:00
|
|
|
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.enable_32bit = @LIBUNWIND_BUILD_32_BITS@
|
2017-07-06 23:20:12 +08:00
|
|
|
config.target_info = "@LIBUNWIND_TARGET_INFO@"
|
2018-02-28 02:40:04 +08:00
|
|
|
config.test_linker_flags = "@LIBUNWIND_TEST_LINKER_FLAGS@"
|
|
|
|
config.test_compiler_flags = "@LIBUNWIND_TEST_COMPILER_FLAGS@"
|
2017-07-06 23:20:12 +08:00
|
|
|
config.executor = "@LIBUNWIND_EXECUTOR@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.libunwind_shared = @LIBUNWIND_ENABLE_SHARED@
|
|
|
|
config.enable_shared = @LIBCXX_ENABLE_SHARED@
|
|
|
|
config.enable_exceptions = @LIBUNWIND_ENABLE_EXCEPTIONS@
|
2017-07-06 23:20:12 +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("@LIBUNWIND_TARGET_TRIPLE@")
|
2017-12-06 04:22:10 +08:00
|
|
|
config.sysroot = "@LIBUNWIND_SYSROOT@"
|
|
|
|
config.gcc_toolchain = "@LIBUNWIND_GCC_TOOLCHAIN@"
|
2019-02-05 12:44:03 +08:00
|
|
|
config.cxx_ext_threads = @LIBUNWIND_BUILD_EXTERNAL_THREAD_LIBRARY@
|
2017-07-06 23:20:12 +08:00
|
|
|
|
|
|
|
# Let the main config do the real work.
|
|
|
|
lit_config.load_config(config, "@LIBUNWIND_SOURCE_DIR@/test/lit.cfg")
|