| 1 |
@AUTO_GEN_COMMENT@ |
| 2 |
|
| 3 |
@SERIALIZED_LIT_PARAMS@ |
| 4 |
|
| 5 |
# |
| 6 |
# This file performs the bridge between the CMake configuration and the Lit |
| 7 |
# configuration files by setting up the LitConfig object and various Lit |
| 8 |
# substitutions from CMake variables. |
| 9 |
# |
| 10 |
# Individual configuration files can take advantage of this bridge by |
| 11 |
# loading the file and then setting up the remaining Lit substitutions. |
| 12 |
# |
| 13 |
|
| 14 |
import os, site |
| 15 |
site.addsitedir(os.path.join('@LIBCXXABI_LIBCXX_PATH@', 'utils')) |
| 16 |
site.addsitedir(os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test')) |
| 17 |
import libcxx.test.format |
| 18 |
|
| 19 |
# Basic configuration of the test suite |
| 20 |
config.name = os.path.basename('@LIBCXXABI_TEST_CONFIG@') |
| 21 |
config.test_source_root = os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test') |
| 22 |
config.test_format = libcxx.test.format.CxxStandardLibraryTest() |
| 23 |
config.recursiveExpansionLimit = 10 |
| 24 |
config.test_exec_root = os.path.join('@LIBCXXABI_BINARY_DIR@', 'test') |
| 25 |
|
| 26 |
# TODO: This is a non-standard Lit attribute and we should have another way of accessing this. |
| 27 |
config.host_triple = '@LLVM_HOST_TRIPLE@' |
| 28 |
|
| 29 |
config.substitutions.append(('%{libcxx}', '@LIBCXXABI_LIBCXX_PATH@')) |
| 30 |
config.substitutions.append(('%{libcxxabi}', '@LIBCXXABI_SOURCE_DIR@')) |
| 31 |
config.substitutions.append(('%{llvm}', '@LLVM_MAIN_SRC_DIR@')) |
| 32 |
config.substitutions.append(('%{install-prefix}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@')) |
| 33 |
config.substitutions.append(('%{include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include')) |
| 34 |
config.substitutions.append(('%{cxx-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_DIR@')) |
| 35 |
config.substitutions.append(('%{cxx-target-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_TARGET_DIR@')) |
| 36 |
config.substitutions.append(('%{lib}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_LIBRARY_DIR@')) |
| 37 |
config.substitutions.append(('%{benchmark_flags}', '')) |
| 38 |
|
| 39 |
if @LIBCXXABI_USE_LLVM_UNWINDER@: |
| 40 |
config.substitutions.append(('%{maybe-include-libunwind}', '-I "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"')) |
| 41 |
else: |
| 42 |
config.substitutions.append(('%{maybe-include-libunwind}', '')) |