Reduce verbiage of lit.local.cfg files

We can just split targets_to_build in one place and make it immutable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alp Toker 2014-06-09 22:42:55 +00:00
parent 78b4fd3a4b
commit 8aeca44558
94 changed files with 98 additions and 186 deletions

View File

@ -304,8 +304,7 @@ For instance, on ``test/CodeGen/ARM``, the ``lit.local.cfg`` is:
.. code-block:: python
config.suffixes = ['.ll', '.c', '.cpp', '.test']
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True
Other platform-specific tests are those that depend on a specific feature

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,5 +1,4 @@
targets = set(config.root.targets_to_build.split())
if not "X86" in targets:
if not "X86" in config.root.targets:
config.unsupported = True
if not "ARM" in targets:
if not "ARM" in config.root.targets:
config.unsupported = True

View File

@ -2,8 +2,7 @@ import re
config.suffixes = ['.ll']
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True
# For now we don't test arm64-win32.

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'CppBackend' in targets:
if not 'CppBackend' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Hexagon' in targets:
if not 'Hexagon' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'MSP430' in targets:
if not 'MSP430' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
if not 'Mips' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'NVPTX' in targets:
if not 'NVPTX' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'R600' in targets:
if not 'R600' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Sparc' in targets:
if not 'Sparc' in config.root.targets:
config.unsupported = True

View File

@ -5,6 +5,5 @@ config.suffixes = ['.py']
if config.root.host_arch not in ['SystemZ']:
config.unsupported = True
targets = set(config.root.targets_to_build.split())
if not 'SystemZ' in targets:
if not 'SystemZ' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'SystemZ' in targets:
if not 'SystemZ' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -6,7 +6,6 @@
# cleanly.
config.suffixes = ['.ll', '.test', '.txt']
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'XCore' in targets:
if not 'XCore' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
if not 'Mips' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'Sparc' in targets:
if not 'Sparc' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'SystemZ' in targets:
if not 'SystemZ' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,5 +1,5 @@
root = config.root
targets = set(root.targets_to_build.split())
targets = root.targets
if ('X86' in targets) | ('AArch64' in targets) | ('ARM' in targets) | \
('Mips' in targets) | ('PowerPC' in targets) | ('SystemZ' in targets):
config.unsupported = False

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if 'AArch64' not in targets:
if 'AArch64' not in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if 'AArch64' not in targets:
if 'AArch64' not in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
if not 'Mips' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Sparc' in targets:
if not 'Sparc' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'SystemZ' in targets:
if not 'SystemZ' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'XCore' in targets:
if not 'XCore' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
# We have to reset config.unsupported here because the parent directory is
# predicated on 'X86'.
config.unsupported = not 'ARM' in targets
config.unsupported = not 'ARM' in config.root.targets

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
if not 'Mips' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Sparc' in targets:
if not 'Sparc' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'SystemZ' in targets:
if not 'SystemZ' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'Mips' in targets:
if not 'Mips' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,5 +1,4 @@
config.suffixes = ['.ll']
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,6 +1,5 @@
config.suffixes = ['.ll']
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'PowerPC' in targets:
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'XCore' in targets:
if not 'XCore' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'AArch64' in targets:
if not 'AArch64' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'R600' in targets:
if not 'R600' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'XCore' in targets:
if not 'XCore' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'NVPTX' in targets:
if not 'NVPTX' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'Sparc' in targets:
if not 'Sparc' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -265,6 +265,10 @@ for pattern in [r"\bbugpoint\b(?!-)",
tool_path = llvm_tools_dir + '/' + tool_name
config.substitutions.append((pattern, tool_pipe + tool_path))
### Targets
config.targets = frozenset(config.targets_to_build.split())
### Features
# Shell execution

View File

@ -1,3 +1,2 @@
targets = set(config.root.targets_to_build.split())
if not 'X86' in targets:
if not 'X86' in config.root.targets:
config.unsupported = True

View File

@ -1,4 +1,3 @@
targets = set(config.root.targets_to_build.split())
if not 'ARM' in targets:
if not 'ARM' in config.root.targets:
config.unsupported = True