diff --git a/bolt/test/AArch64/lit.local.cfg b/bolt/test/AArch64/lit.local.cfg --- a/bolt/test/AArch64/lit.local.cfg +++ b/bolt/test/AArch64/lit.local.cfg @@ -1,4 +1,4 @@ -if config.host_arch not in ['aarch64']: +if 'AArch64' not in config.root.targets: config.unsupported = True config.substitutions.insert( diff --git a/bolt/test/X86/lit.local.cfg b/bolt/test/X86/lit.local.cfg --- a/bolt/test/X86/lit.local.cfg +++ b/bolt/test/X86/lit.local.cfg @@ -1,4 +1,4 @@ -if config.host_arch not in ['x86', 'X86', 'x86_64']: +if not 'X86' in config.root.targets: config.unsupported = True config.substitutions.insert( diff --git a/bolt/test/lit.cfg.py b/bolt/test/lit.cfg.py --- a/bolt/test/lit.cfg.py +++ b/bolt/test/lit.cfg.py @@ -102,3 +102,5 @@ ('--cxxflags', {r'-D_GLIBCXX_DEBUG\b': 'libstdcxx-safe-mode'}), ('--targets-built', calculate_arch_features) ]) + +config.targets = frozenset(config.targets_to_build.split()) diff --git a/bolt/test/lit.site.cfg.py.in b/bolt/test/lit.site.cfg.py.in --- a/bolt/test/lit.site.cfg.py.in +++ b/bolt/test/lit.site.cfg.py.in @@ -21,6 +21,7 @@ config.python_executable = "@PYTHON_EXECUTABLE@" config.bolt_clang = "@BOLT_CLANG_EXE@" config.bolt_lld = "@BOLT_LLD_EXE@" +config.targets_to_build = "@TARGETS_TO_BUILD@" import lit.llvm lit.llvm.initialize(lit_config, config)