lit.site.cfg.in 2.81 KB
@AUTO_GEN_COMMENT@

import os
import site

config.cxx_under_test           = "@CMAKE_CXX_COMPILER@"
config.project_obj_root         = "@CMAKE_BINARY_DIR@"
config.libcxxabi_src_root       = "@LIBCXXABI_SOURCE_DIR@"
config.libcxxabi_obj_root       = "@LIBCXXABI_BINARY_DIR@"
config.abi_library_path         = "@LIBCXXABI_LIBRARY_DIR@"
config.libcxx_src_root          = "@LIBCXXABI_LIBCXX_PATH@"
config.cxx_headers              = "@LIBCXXABI_LIBCXX_INCLUDES@"
config.libunwind_headers        = "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"
config.cxx_library_root         = "@LIBCXXABI_LIBCXX_LIBRARY_PATH@"
config.llvm_unwinder            = @LIBCXXABI_USE_LLVM_UNWINDER@
config.builtins_library         = "@LIBCXXABI_BUILTINS_LIBRARY@"
config.enable_threads           = @LIBCXXABI_ENABLE_THREADS@
config.use_sanitizer            = "@LLVM_USE_SANITIZER@"
config.sanitizer_library        = "@LIBCXXABI_SANITIZER_LIBRARY@"
config.enable_32bit             = @LIBCXXABI_BUILD_32_BITS@
config.target_info              = "@LIBCXXABI_TARGET_INFO@"
config.executor                 = "@LIBCXXABI_EXECUTOR@"
config.libcxxabi_shared         = @LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI@
config.enable_shared            = @LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX@
config.enable_exceptions        = @LIBCXXABI_ENABLE_EXCEPTIONS@
config.host_triple              = "@LLVM_HOST_TRIPLE@"
config.target_triple            = "@TARGET_TRIPLE@"
config.sysroot                  = "@LIBCXXABI_SYSROOT@"
config.gcc_toolchain            = "@LIBCXXABI_GCC_TOOLCHAIN@"
config.cxx_ext_threads          = @LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY@

config.pstl_src_root            = "@ParallelSTL_SOURCE_DIR@" if @LIBCXX_ENABLE_PARALLEL_ALGORITHMS@ else None
config.pstl_obj_root            = "@ParallelSTL_BINARY_DIR@" if @LIBCXX_ENABLE_PARALLEL_ALGORITHMS@ else None

# Code signing
config.llvm_codesign_identity   = "@LLVM_CODESIGNING_IDENTITY@"

site.addsitedir(os.path.join(config.libcxxabi_src_root, 'test'))
site.addsitedir(os.path.join(config.libcxx_src_root, 'utils'))

# name: The name of this test suite.
config.name = 'libc++abi'

# 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.libcxxabi_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.libcxxabi_obj_root, 'test')

import libcxx.test.format
config.test_format = libcxx.test.format.CxxStandardLibraryTest()

lit_config.note('Using configuration variant: libcxxabi')
import libcxxabi.test.config
configuration = libcxxabi.test.config.Configuration(lit_config, config)
configuration.configure()
configuration.print_config_info()