29 lines · plain
1@LIT_SITE_CFG_IN_HEADER@2 3import os4import platform5import re6import shlex7 8# Load common config for all compiler-rt unit tests.9lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")10 11# Setup config name.12config.name = 'CtxProfile-Unit'13config.target_arch = "@arch@"14assert config.target_arch == 'x86_64'15 16config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@",17 "lib", "ctx_profile", "tests")18 19config.test_source_root = config.test_exec_root20 21# When LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on, the initial value of22# config.compiler_rt_libdir (COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR) has the23# host triple as the trailing path component. The value is incorrect for i38624# tests on x86_64 hosts and vice versa. But, since only x86_64 is enabled as25# target, and we don't support different environments for building and,26# respectively, running tests, we we only need to fix up the x86_64 case.27if config.enable_per_target_runtime_dir and config.target_arch != config.host_arch:28 config.compiler_rt_libdir = re.sub(r'/i386(?=-[^/]+$)', '/x86_64', config.compiler_rt_libdir)29