| import os |
| import sys |
| |
| # pylint: disable=invalid-name |
| |
| # Tell pylint that we know config and lit_config exist somewhere. |
| if 'PYLINT_IMPORT' in os.environ: |
| config = object() |
| lit_config = object() |
| lit_config.params = {} |
| |
| ndk_path = lit_config.params['ndk_path'] |
| libcxx_src = lit_config.params['libcxx_src'] |
| libcxx_install = lit_config.params['libcxx_install'] |
| |
| abi = lit_config.params["abi"] |
| host_tag = lit_config.params["host_tag"] |
| toolchain = lit_config.params["toolchain"] |
| triple = lit_config.params["triple"] |
| |
| config.cxx_under_test = os.path.join( |
| ndk_path, "toolchains/llvm/prebuilt", host_tag, "bin/clang++") |
| config.libcxx_src_root = libcxx_src |
| config.libcxx_obj_root = libcxx_install |
| config.test_source_root = os.path.join(libcxx_src, 'test') |
| config.test_exec_root = config.test_source_root |
| config.cxx_include = os.path.join(libcxx_install, "include") |
| config.cxx_library_root = os.path.join(libcxx_install, "libs", abi) |
| config.use_target = "True" |
| config.enable_exceptions = "True" |
| config.enable_rtti = "True" |
| config.enable_shared = "False" |
| config.enable_32bit = "False" |
| config.enable_threads = "True" |
| config.enable_monotonic_clock = "True" |
| config.cxx_abi = "libcxxabi" |
| config.use_sanitizer = "" |
| config.configuration_variant = "libcxx.ndk" |
| config.target_triple = triple |
| |
| # Let the main config do the real work. |
| config.loaded_site_config = True |
| lit_config.load_config( |
| config, os.path.join(libcxx_src, "test/lit.cfg")) |