2017-07-06 23:20:12 +08:00
|
|
|
@AUTO_GEN_COMMENT@
|
2020-06-26 00:02:43 +08:00
|
|
|
|
|
|
|
import os
|
|
|
|
import site
|
|
|
|
|
2020-07-16 18:03:00 +08:00
|
|
|
config.cxx_under_test = "@CMAKE_CXX_COMPILER@"
|
2017-07-06 23:20:12 +08:00
|
|
|
config.project_obj_root = "@CMAKE_BINARY_DIR@"
|
|
|
|
config.libunwind_src_root = "@LIBUNWIND_SOURCE_DIR@"
|
|
|
|
config.libunwind_obj_root = "@LIBUNWIND_BINARY_DIR@"
|
2020-07-09 04:38:54 +08:00
|
|
|
config.abi_library_root = "@LIBUNWIND_LIBRARY_DIR@"
|
2017-07-06 23:20:12 +08:00
|
|
|
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@
|
2019-12-06 22:26:35 +08:00
|
|
|
config.arm_ehabi = @LIBUNWIND_USES_ARM_EHABI@
|
2017-07-06 23:20:12 +08:00
|
|
|
config.host_triple = "@LLVM_HOST_TRIPLE@"
|
|
|
|
config.target_triple = "@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
|
|
|
|
2020-06-26 00:02:43 +08:00
|
|
|
site.addsitedir(os.path.join(config.libunwind_src_root, 'test'))
|
|
|
|
site.addsitedir(os.path.join(config.libcxx_src_root, 'utils'))
|
|
|
|
|
|
|
|
# name: The name of this test suite.
|
|
|
|
config.name = 'libunwind'
|
|
|
|
|
|
|
|
# suffixes: A list of file extensions to treat as test files.
|
|
|
|
config.suffixes = ['.cpp', '.s']
|
|
|
|
|
|
|
|
# test_source_root: The root path where tests are located.
|
|
|
|
config.test_source_root = os.path.join(config.libunwind_src_root, 'test')
|
|
|
|
|
|
|
|
# Allow expanding substitutions that are based on other substitutions
|
|
|
|
config.recursiveExpansionLimit = 10
|
|
|
|
|
|
|
|
# Infer the test_exec_root from the build directory.
|
|
|
|
config.test_exec_root = os.path.join(config.libunwind_obj_root, 'test')
|
|
|
|
|
2020-06-30 22:10:30 +08:00
|
|
|
import libcxx.test.format
|
|
|
|
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
|
2020-06-26 12:55:29 +08:00
|
|
|
|
2020-06-26 00:02:43 +08:00
|
|
|
lit_config.note('Using configuration variant: libunwind')
|
|
|
|
import libunwind.test.config
|
|
|
|
configuration = libunwind.test.config.Configuration(lit_config, config)
|
|
|
|
configuration.configure()
|
|
|
|
configuration.print_config_info()
|