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,2 +1,2 @@ -if config.host_arch not in ['aarch64']: +if 'AArch64' not in config.root.targets: config.unsupported = True 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,2 +1,2 @@ -if config.host_arch not in ['x86', 'X86', 'x86_64']: +if not 'X86' in config.root.targets: config.unsupported = True 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@" # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time.