43 lines · plain
1@AUTO_GEN_COMMENT@2 3@SERIALIZED_LIT_PARAMS@4 5#6# This file performs the bridge between the CMake configuration and the Lit7# configuration files by setting up the LitConfig object and various Lit8# substitutions from CMake variables.9#10# Individual configuration files can take advantage of this bridge by11# loading the file and then setting up the remaining Lit substitutions.12#13 14import os, site15site.addsitedir(os.path.join('@LIBCXXABI_LIBCXX_PATH@', 'utils'))16site.addsitedir(os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test'))17import libcxx.test.format18 19# Basic configuration of the test suite20config.name = os.path.basename('@LIBCXXABI_TEST_CONFIG@')21config.test_source_root = os.path.join('@LIBCXXABI_SOURCE_DIR@', 'test')22config.test_format = libcxx.test.format.CxxStandardLibraryTest()23config.recursiveExpansionLimit = 1024config.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.27config.host_triple = '@LLVM_HOST_TRIPLE@'28 29config.substitutions.append(('%{libcxx}', '@LIBCXXABI_LIBCXX_PATH@'))30config.substitutions.append(('%{libcxxabi}', '@LIBCXXABI_SOURCE_DIR@'))31config.substitutions.append(('%{llvm}', '@LLVM_MAIN_SRC_DIR@'))32config.substitutions.append(('%{install-prefix}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@'))33config.substitutions.append(('%{include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/include'))34config.substitutions.append(('%{cxx-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_DIR@'))35config.substitutions.append(('%{cxx-target-include}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_INCLUDE_TARGET_DIR@'))36config.substitutions.append(('%{lib}', '@LIBCXXABI_TESTING_INSTALL_PREFIX@/@LIBCXXABI_INSTALL_LIBRARY_DIR@'))37config.substitutions.append(('%{benchmark_flags}', ''))38 39if @LIBCXXABI_USE_LLVM_UNWINDER@:40 config.substitutions.append(('%{maybe-include-libunwind}', '-I "@LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL@"'))41else:42 config.substitutions.append(('%{maybe-include-libunwind}', ''))43