Louis Dionne 3ee0cec88e [runtimes] Remove FOO_TARGET_TRIPLE, FOO_SYSROOT and FOO_GCC_TOOLCHAIN
Instead, folks can use the equivalent variables provided by CMake
to set those. This removal aims to reduce complexity and potential
for confusion when setting the target triple for building the runtimes,
and make it correct when `CMAKE_OSX_ARCHITECTURES` is used (right now
both `-arch` and `--target=` will end up being passed, which is downright
incorrect).

Differential Revision: https://reviews.llvm.org/D112155
2022-03-01 08:39:42 -05:00

65 lines
2.8 KiB
INI

@AUTO_GEN_COMMENT@
@SERIALIZED_LIT_PARAMS@
import os
import site
config.cxx_headers = "@LIBCXX_GENERATED_INCLUDE_DIR@"
config.cxx_under_test = "@CMAKE_CXX_COMPILER@"
config.project_obj_root = "@CMAKE_BINARY_DIR@"
config.install_root = "@CMAKE_BINARY_DIR@"
config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
config.abi_library_root = "@LIBCXX_CXX_ABI_LIBRARY_PATH@"
config.enable_shared = @LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX@
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
config.configuration_variant = "@LIBCXX_LIT_VARIANT@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.sysroot = "@CMAKE_SYSROOT@"
config.gcc_toolchain = "@CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN@"
config.generate_coverage = @LIBCXX_GENERATE_COVERAGE@
config.target_info = "@LIBCXX_TARGET_INFO@"
config.test_linker_flags = "@LIBCXX_TEST_LINKER_FLAGS@"
config.test_compiler_flags = "@LIBCXX_TEST_COMPILER_FLAGS@"
config.executor = "@LIBCXX_EXECUTOR@"
config.llvm_unwinder = @LIBCXXABI_USE_LLVM_UNWINDER@
config.builtins_library = "@LIBCXX_BUILTINS_LIBRARY@"
config.has_libatomic = @LIBCXX_HAS_ATOMIC_LIB@
config.debug_build = @LIBCXX_DEBUG_BUILD@
config.libcxxabi_shared = @LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI@
config.cxx_ext_threads = @LIBCXX_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.libcxx_src_root, 'utils'))
# name: The name of this test suite.
config.name = 'libc++'
# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.pass.cpp', '.fail.cpp', '.sh.cpp', '.pass.mm']
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.join(config.libcxx_src_root, 'test')
# Allow expanding substitutions that are based on other substitutions
config.recursiveExpansionLimit = 10
# Infer the test_exec_root from the libcxx_object root.
config.test_exec_root = os.path.join(config.libcxx_obj_root, 'test')
import libcxx.test.format
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
lit_config.note('Using configuration variant: {}'.format(config.configuration_variant))
import libcxx.test.config
configuration = libcxx.test.config.Configuration(lit_config, config)
configuration.configure()
configuration.print_config_info()