[PATCH] D122498: [BOLT][test] Enable cross-target testing
Maksim Panchenko via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 25 12:11:46 PDT 2022
maksfb created this revision.
maksfb added reviewers: yota9, Amir, ayermolo, rafauler.
Herald added a project: All.
maksfb requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Check for supported target architecture instead of the host arch when
disabling non-runtime tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122498
Files:
bolt/test/AArch64/lit.local.cfg
bolt/test/X86/lit.local.cfg
bolt/test/lit.cfg.py
bolt/test/lit.site.cfg.py.in
Index: bolt/test/lit.site.cfg.py.in
===================================================================
--- bolt/test/lit.site.cfg.py.in
+++ 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.
Index: bolt/test/lit.cfg.py
===================================================================
--- bolt/test/lit.cfg.py
+++ 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())
Index: bolt/test/X86/lit.local.cfg
===================================================================
--- bolt/test/X86/lit.local.cfg
+++ 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
Index: bolt/test/AArch64/lit.local.cfg
===================================================================
--- bolt/test/AArch64/lit.local.cfg
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122498.418291.patch
Type: text/x-patch
Size: 1490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220325/b3b9cb45/attachment.bin>
More information about the llvm-commits
mailing list