-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
# This is a directory for utility functions. No test here.
-config.suffixes = ['.dummy']
+config.suffixes = [".dummy"]
-config.suffixes = ['.ml']
+config.suffixes = [".ml"]
-if not 'ocaml' in config.root.llvm_bindings:
+if not "ocaml" in config.root.llvm_bindings:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARC' in config.root.targets:
+if not "ARC" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'AVR' in config.root.targets:
+if not "AVR" in config.root.targets:
config.unsupported = True
-if not 'BPF' in config.root.targets:
+if not "BPF" in config.root.targets:
config.unsupported = True
-if 'system-aix' in config.available_features:
+if "system-aix" in config.available_features:
config.unsupported = True
-if not 'CSKY' in config.root.targets:
+if not "CSKY" in config.root.targets:
config.unsupported = True
-if not 'CSKY' in config.root.targets:
+if not "CSKY" in config.root.targets:
config.unsupported = True
-if not 'DirectX' in config.root.targets:
- config.unsupported = True
+if not "DirectX" in config.root.targets:
+ config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'Lanai' in config.root.targets:
+if not "Lanai" in config.root.targets:
config.unsupported = True
import os
-config.suffixes = ['.ll', '.mir', '.test', '.txt']
+config.suffixes = [".ll", ".mir", ".test", ".txt"]
-extract_section_path = os.path.join(config.llvm_src_root,
- 'utils', 'extract-section.py')
+extract_section_path = os.path.join(config.llvm_src_root, "utils", "extract-section.py")
-config.substitutions.append(('extract-section',
- "'%s' %s %s" % (config.python_executable,
- extract_section_path, '--bits-endian little')))
+config.substitutions.append(
+ (
+ "extract-section",
+ "'%s' %s %s"
+ % (config.python_executable, extract_section_path, "--bits-endian little"),
+ )
+)
-if not 'LoongArch' in config.root.targets:
+if not "LoongArch" in config.root.targets:
config.unsupported = True
import os
-config.suffixes = ['.ll', '.mir', '.test', '.txt']
+config.suffixes = [".ll", ".mir", ".test", ".txt"]
-extract_section_path = os.path.join(config.llvm_src_root,
- 'utils', 'extract-section.py')
+extract_section_path = os.path.join(config.llvm_src_root, "utils", "extract-section.py")
-config.substitutions.append(('extract-section',
- "'%s' %s %s" % (config.python_executable,
- extract_section_path, '--byte-indicator --hex-width=2')))
+config.substitutions.append(
+ (
+ "extract-section",
+ "'%s' %s %s"
+ % (
+ config.python_executable,
+ extract_section_path,
+ "--byte-indicator --hex-width=2",
+ ),
+ )
+)
-if not 'M68k' in config.root.targets:
+if not "M68k" in config.root.targets:
config.unsupported = True
-
import re
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
# For now we don't test arm64-win32.
-if re.search(r'cygwin|mingw32|win32|windows-gnu|windows-msvc', config.target_triple):
+if re.search(r"cygwin|mingw32|win32|windows-gnu|windows-msvc", config.target_triple):
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if 'native' not in config.available_features:
+if "native" not in config.available_features:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'MSP430' in config.root.targets:
+if not "MSP430" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-config.suffixes.add('.py')
+config.suffixes.add(".py")
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-config.suffixes.add('.py')
+config.suffixes.add(".py")
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
+if not "Sparc" in config.root.targets:
config.unsupported = True
-if not 'SPIRV' in config.root.targets:
+if not "SPIRV" in config.root.targets:
config.unsupported = True
-config.suffixes = [ '.ll', '.py' ]
+config.suffixes = [".ll", ".py"]
# These tests take on the order of seconds to run, so skip them unless
# we're running long tests.
-if 'long_tests' not in config.available_features:
+if "long_tests" not in config.available_features:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'VE' in config.root.targets:
+if not "VE" in config.root.targets:
config.unsupported = True
-if not 'VE' in config.root.targets:
+if not "VE" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
#
# It should be possible to remove this override once all the bots have cycled
# cleanly.
-config.suffixes = ['.ll', '.test', '.txt']
+config.suffixes = [".ll", ".test", ".txt"]
# FIXME: Add Windows on ARM support to these tests.
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'XCore' in config.root.targets:
+if not "XCore" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'BPF' in config.root.targets:
+if not "BPF" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:\r
+if not "AArch64" in config.root.targets:\r
config.unsupported = True\r
-\r
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'CSKY' in config.root.targets:
+if not "CSKY" in config.root.targets:
config.unsupported = True
-if not 'Lanai' in config.root.targets:
+if not "Lanai" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.mir']
+config.suffixes = [".mir"]
-if not 'MSP430' in config.root.targets:
+if not "MSP430" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
+if not "Sparc" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'XCore' in config.root.targets:
+if not "XCore" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not config.build_examples or sys.platform in ['win32']:
- config.unsupported = True
+if not config.build_examples or sys.platform in ["win32"]:
+ config.unsupported = True
# Test discovery should ignore subdirectories that contain test inputs.
-config.excludes = ['Inputs']
+config.excludes = ["Inputs"]
-if not 'ARM' in config.root.targets:
- config.unsupported = True
+if not "ARM" in config.root.targets:
+ config.unsupported = True
-if not 'AArch64' in config.root.targets:
- config.unsupported = True
+if not "AArch64" in config.root.targets:
+ config.unsupported = True
-if not 'LoongArch' in config.root.targets:
- config.unsupported = True
+if not "LoongArch" in config.root.targets:
+ config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
root = config.root
targets = root.targets
-if ('X86' in targets) | ('AArch64' in targets) | ('ARM' in targets) | \
- ('Mips' in targets) | ('PowerPC' in targets) | ('SystemZ' in targets):
+if (
+ ("X86" in targets)
+ | ("AArch64" in targets)
+ | ("ARM" in targets)
+ | ("Mips" in targets)
+ | ("PowerPC" in targets)
+ | ("SystemZ" in targets)
+):
config.unsupported = False
else:
config.unsupported = True
# FIXME: autoconf and cmake produce different arch names. We should normalize
# them before getting here.
-if root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
- 'AArch64', 'ARM', 'Mips',
- 'PowerPC', 'ppc64', 'ppc64le', 'SystemZ']:
+if root.host_arch not in [
+ "i386",
+ "x86",
+ "x86_64",
+ "AMD64",
+ "AArch64",
+ "ARM",
+ "Mips",
+ "PowerPC",
+ "ppc64",
+ "ppc64le",
+ "SystemZ",
+]:
config.unsupported = True
-if 'armv7' in root.host_arch:
+if "armv7" in root.host_arch:
config.unsupported = False
-if 'i386-apple-darwin' in root.target_triple:
+if "i386-apple-darwin" in root.target_triple:
config.unsupported = True
-if 'powerpc' in root.target_triple and not 'powerpc64' in root.target_triple:
+if "powerpc" in root.target_triple and not "powerpc64" in root.target_triple:
config.unsupported = True
# ExecutionEngine tests are not expected to pass in a cross-compilation setup.
-if 'native' not in config.available_features:
+if "native" not in config.available_features:
config.unsupported = True
-if 'armv4' in config.root.target_triple or \
- 'armv5' in config.root.target_triple:
+if "armv4" in config.root.target_triple or "armv5" in config.root.target_triple:
config.unsupported = True
# This is temporary, until Remote MCJIT works on ARM
# See http://llvm.org/bugs/show_bug.cgi?id=18057
-#if 'armv7' in config.root.target_triple:
+# if 'armv7' in config.root.target_triple:
# config.unsupported = True
import sys
-if config.root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
- 'mips', 'mipsel', 'mips64', 'mips64el',
- 'loongarch64']:
+if config.root.host_arch not in [
+ "i386",
+ "x86",
+ "x86_64",
+ "AMD64",
+ "mips",
+ "mipsel",
+ "mips64",
+ "mips64el",
+ "loongarch64",
+]:
config.unsupported = True
# FIXME: These tests don't pass with the COFF rtld.
-if sys.platform == 'win32':
+if sys.platform == "win32":
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'BPF' in config.root.targets:
+if not "BPF" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if config.root.native_target in ['Sparc', 'PowerPC', 'SystemZ', 'Hexagon', 'RISCV']:
+if config.root.native_target in ["Sparc", "PowerPC", "SystemZ", "Hexagon", "RISCV"]:
config.unsupported = True
# ExecutionEngine tests are not expected to pass in a cross-compilation setup.
-if 'native' not in config.available_features:
+if "native" not in config.available_features:
config.unsupported = True
# debugging tests. If a developer sets values that affect FileCheck's exit
# status (e.g., FILECHECK_OPTS=-strict-whitespace), he shouldn't be surprised
# that test results throughout all test suites are affected.
-config.substitutions.append(('%ProtectFileCheckOutput',
- 'env -u FILECHECK_OPTS'))
+config.substitutions.append(("%ProtectFileCheckOutput", "env -u FILECHECK_OPTS"))
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
if not config.root.llvm_use_intel_jitevents:
config.unsupported = True
-config.environment['INTEL_JIT_BACKWARD_COMPATIBILITY'] = '1'
+config.environment["INTEL_JIT_BACKWARD_COMPATIBILITY"] = "1"
-if not 'AArch64' in config.root.targets:
- config.unsupported = True
+if not "AArch64" in config.root.targets:
+ config.unsupported = True
-if not 'ARM' in config.root.targets:
- config.unsupported = True
+if not "ARM" in config.root.targets:
+ config.unsupported = True
-if not 'PowerPC' in config.root.targets:
- config.unsupported = True
+if not "PowerPC" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if 'AArch64' not in config.root.targets:
+if "AArch64" not in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'AVR' in config.root.targets:
+if not "AVR" in config.root.targets:
config.unsupported = True
-if 'AArch64' not in config.root.targets:
+if "AArch64" not in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'BPF' in config.root.targets:
+if not "BPF" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes.add('.py')
+config.suffixes.add(".py")
-if not 'CSKY' in config.root.targets:
+if not "CSKY" in config.root.targets:
config.unsupported = True
-if 'AArch64' not in config.root.targets:
+if "AArch64" not in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARC' in config.root.targets:
+if not "ARC" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'Lanai' in config.root.targets:
+if not "Lanai" in config.root.targets:
config.unsupported = True
-if not 'M68k' in config.root.targets:
+if not "M68k" in config.root.targets:
config.unsupported = True
-if not 'MSP430' in config.root.targets:
+if not "MSP430" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
+if not "Sparc" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'XCore' in config.root.targets:
+if not "XCore" in config.root.targets:
config.unsupported = True
# We have to reset config.unsupported here because the parent directory is
# predicated on 'X86'.
-config.unsupported = 'AArch64' not in config.root.targets
+config.unsupported = "AArch64" not in config.root.targets
# We have to reset config.unsupported here because the parent directory is
# predicated on 'X86'.
-config.unsupported = 'AMDGPU' not in config.root.targets
+config.unsupported = "AMDGPU" not in config.root.targets
# We have to reset config.unsupported here because the parent directory is
# predicated on 'X86'.
-config.unsupported = not 'ARM' in config.root.targets
+config.unsupported = not "ARM" in config.root.targets
-if 'RISCV' not in config.root.targets:
+if "RISCV" not in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'Lanai' in config.root.targets:
+if not "Lanai" in config.root.targets:
config.unsupported = True
-if not 'LoongArch' in config.root.targets:
+if not "LoongArch" in config.root.targets:
config.unsupported = True
-if not 'M68k' in config.root.targets:
+if not "M68k" in config.root.targets:
config.unsupported = True
-if not 'MSP430' in config.root.targets:
+if not "MSP430" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
+if not "Sparc" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'VE' in config.root.targets:
+if not "VE" in config.root.targets:
config.unsupported = True
-if 'WebAssembly' not in config.root.targets:
+if "WebAssembly" not in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'Xtensa' in config.root.targets:
+if not "Xtensa" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'BPF' in config.root.targets:
+if not "BPF" in config.root.targets:
config.unsupported = True
-if not 'Lanai' in config.root.targets:
+if not "Lanai" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
import os
import subprocess
+
def have_needed_dot_support():
- if not os.path.exists('/usr/bin/dot'):
- return False
+ if not os.path.exists("/usr/bin/dot"):
+ return False
+
+ try:
+ ld_cmd = subprocess.Popen(
+ ["/usr/bin/dot", "-T?"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
+ )
+ ld_err = ld_cmd.stderr.read().decode()
+ ld_cmd.wait()
+ except:
+ return False
- try:
- ld_cmd = subprocess.Popen(['/usr/bin/dot', '-T?'],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- ld_err = ld_cmd.stderr.read().decode()
- ld_cmd.wait()
- except:
- return False
+ return "pdf" in ld_err
- return 'pdf' in ld_err
if not have_needed_dot_support():
- config.unsupported = True
+ config.unsupported = True
import os
import subprocess
+
def have_needed_diff_support():
- if not os.path.exists('/usr/bin/diff'):
+ if not os.path.exists("/usr/bin/diff"):
return False
ld_cmd = subprocess.Popen(
- ['/usr/bin/diff', '--help'], stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT, env={'LANG': 'C'})
+ ["/usr/bin/diff", "--help"],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ env={"LANG": "C"},
+ )
ld_out = ld_cmd.stdout.read().decode()
ld_cmd.wait()
- return '-line-format' in ld_out
+ return "-line-format" in ld_out
+
if not have_needed_diff_support():
- config.unsupported = True
+ config.unsupported = True
-if not os.path.exists('/bin/cat'):
- config.unsupported = True
+if not os.path.exists("/bin/cat"):
+ config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.td']
-config.excludes = ['Common']
+config.suffixes = [".td"]
+config.excludes = ["Common"]
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'BPF' in config.root.targets:
+if not "BPF" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
- config.unsupported = True
+if not "AMDGPU" in config.root.targets:
+ config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'LoongArch' in targets:
+if not "LoongArch" in targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'RISCV' in targets:
+if not "RISCV" in targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
- config.unsupported = True
+if not "Sparc" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
from lit.llvm.subst import ToolSubst
-fc = ToolSubst('FileCheck', unresolved='fatal')
-config.substitutions.insert(0, (fc.regex, 'FileCheck --allow-unused-prefixes'))
+fc = ToolSubst("FileCheck", unresolved="fatal")
+config.substitutions.insert(0, (fc.regex, "FileCheck --allow-unused-prefixes"))
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
+if not "Sparc" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
- config.unsupported = True
\ No newline at end of file
+if not "RISCV" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'AArch64' in targets:
+if not "AArch64" in targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'AMDGPU' in targets:
+if not "AMDGPU" in targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'DirectX' in config.root.targets:
+if not "DirectX" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
import sys
-config.unsupported = sys.version_info.minor <= 8
+config.unsupported = sys.version_info.minor <= 8
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
- config.unsupported = True
+if not "AArch64" in config.root.targets:
+ config.unsupported = True
-if not 'ARM' in config.root.targets:
- config.unsupported = True
+if not "ARM" in config.root.targets:
+ config.unsupported = True
-if not 'RISCV' in config.root.targets:
- config.unsupported = True
\ No newline at end of file
+if not "RISCV" in config.root.targets:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'LoongArch' in config.root.targets:
+if not "LoongArch" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'RISCV' in targets:
+if not "RISCV" in targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'VE' in config.root.targets:
+if not "VE" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'XCore' in config.root.targets:
+if not "XCore" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'VE' in config.root.targets:
+if not "VE" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'XCore' in config.root.targets:
+if not "XCore" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'AArch64' in targets:
+if not "AArch64" in targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'ARM' in targets:
+if not "ARM" in targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'Hexagon' in targets:
+if not "Hexagon" in targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'Mips' in targets:
+if not "Mips" in targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll']
+config.suffixes = [".ll"]
targets = set(config.root.targets_to_build.split())
-if not 'RISCV' in targets:
+if not "RISCV" in targets:
config.unsupported = True
-if not 'Sparc' in config.root.targets:
+if not "Sparc" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'NVPTX' in config.root.targets:
+if not "NVPTX" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'LoongArch' in config.root.targets:
+if not "LoongArch" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
from pipes import quote as shell_quote
-def add_update_script_substition(name, python_exe=config.python_executable,
- extra_args=''):
- assert name.startswith('%')
- script_path = os.path.join(config.llvm_src_root, 'utils', name[1:] + '.py')
+def add_update_script_substition(
+ name, python_exe=config.python_executable, extra_args=""
+):
+ assert name.startswith("%")
+ script_path = os.path.join(config.llvm_src_root, "utils", name[1:] + ".py")
assert os.path.isfile(script_path)
# Specify an explicit default version in UTC tests, so that the --version
# embedded in UTC_ARGS does not change in all test expectations every time
# the default is bumped.
- extra_args += ' --version=1'
+ extra_args += " --version=1"
config.substitutions.append(
- (name, "'%s' %s %s" % (python_exe, script_path, extra_args)))
+ (name, "'%s' %s %s" % (python_exe, script_path, extra_args))
+ )
config.test_format = lit.formats.ShTest(execute_external=False)
-config.suffixes = ['.test']
+config.suffixes = [".test"]
-llc_path = os.path.join(config.llvm_tools_dir, 'llc')
+llc_path = os.path.join(config.llvm_tools_dir, "llc")
if os.path.isfile(llc_path):
- config.available_features.add('llc-binary')
- llc_arg = '--llc-binary ' + shell_quote(llc_path)
- add_update_script_substition('%update_llc_test_checks', extra_args=llc_arg)
- add_update_script_substition('%update_mir_test_checks', extra_args=llc_arg)
+ config.available_features.add("llc-binary")
+ llc_arg = "--llc-binary " + shell_quote(llc_path)
+ add_update_script_substition("%update_llc_test_checks", extra_args=llc_arg)
+ add_update_script_substition("%update_mir_test_checks", extra_args=llc_arg)
-opt_path = os.path.join(config.llvm_tools_dir, 'opt')
+opt_path = os.path.join(config.llvm_tools_dir, "opt")
if os.path.isfile(opt_path):
- config.available_features.add('opt-binary')
- opt_arg = '--opt-binary ' + shell_quote(opt_path)
- add_update_script_substition('%update_test_checks', extra_args=opt_arg)
- add_update_script_substition('%update_analyze_test_checks',
- extra_args=opt_arg)
+ config.available_features.add("opt-binary")
+ opt_arg = "--opt-binary " + shell_quote(opt_path)
+ add_update_script_substition("%update_test_checks", extra_args=opt_arg)
+ add_update_script_substition("%update_analyze_test_checks", extra_args=opt_arg)
-llvm_mca_path = os.path.join(config.llvm_tools_dir, 'llvm-mca')
+llvm_mca_path = os.path.join(config.llvm_tools_dir, "llvm-mca")
if os.path.isfile(llvm_mca_path):
- config.available_features.add('llvm-mca-binary')
- mca_arg = '--llvm-mca-binary ' + shell_quote(llvm_mca_path)
- add_update_script_substition('%update_test_checks', extra_args=mca_arg)
+ config.available_features.add("llvm-mca-binary")
+ mca_arg = "--llvm-mca-binary " + shell_quote(llvm_mca_path)
+ add_update_script_substition("%update_test_checks", extra_args=mca_arg)
# These tests require opt.
-if 'opt-binary' not in config.available_features:
+if "opt-binary" not in config.available_features:
config.unsupported = True
# These tests require llc.
-if 'llc-binary' not in config.available_features:
+if "llc-binary" not in config.available_features:
config.unsupported = True
# These tests require llc.
-if 'llc-binary' not in config.available_features:
+if "llc-binary" not in config.available_features:
config.unsupported = True
# These tests require llc.
-if 'opt-binary' not in config.available_features:
+if "opt-binary" not in config.available_features:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
if config.llvm_use_sanitizer:
- suppr = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'suppressions.txt')
- config.environment['LSAN_OPTIONS'] = 'suppressions={}'.format(suppr)
+ suppr = os.path.join(
+ os.path.dirname(os.path.realpath(__file__)), "suppressions.txt"
+ )
+ config.environment["LSAN_OPTIONS"] = "suppressions={}".format(suppr)
-config.suffixes = ['.test', '.cpp', '.c']
+config.suffixes = [".test", ".cpp", ".c"]
import os
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
if config.llvm_use_sanitizer:
- suppr = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'suppressions.txt')
- config.environment['LSAN_OPTIONS'] = 'suppressions={}'.format(suppr)
+ suppr = os.path.join(
+ os.path.dirname(os.path.realpath(__file__)), "suppressions.txt"
+ )
+ config.environment["LSAN_OPTIONS"] = "suppressions={}".format(suppr)
-config.suffixes = ['.test', '.cpp', '.m', '.s']
+config.suffixes = [".test", ".cpp", ".m", ".s"]
if not config.dxil_tests:
- config.unsupported = True
-config.suffixes = ['.ll']
+ config.unsupported = True
+config.suffixes = [".ll"]
-if (not 'ld_plugin' in config.available_features or
- not 'PowerPC' in config.root.targets):
- config.unsupported = True
+if not "ld_plugin" in config.available_features or not "PowerPC" in config.root.targets:
+ config.unsupported = True
-if (not 'ld_plugin' in config.available_features or
- not 'X86' in config.root.targets):
- config.unsupported = True
+if not "ld_plugin" in config.available_features or not "X86" in config.root.targets:
+ config.unsupported = True
import re
import subprocess
+
def is_gold_v1_12_linker_available():
- if not config.gold_executable:
- return False
- try:
- ld_cmd = subprocess.Popen([config.gold_executable, '-v'],
- stdout = subprocess.PIPE,
- stderr = subprocess.PIPE)
- ld_out, _ = ld_cmd.communicate()
- ld_out = ld_out.decode()
- except:
- return False
+ if not config.gold_executable:
+ return False
+ try:
+ ld_cmd = subprocess.Popen(
+ [config.gold_executable, "-v"],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ )
+ ld_out, _ = ld_cmd.communicate()
+ ld_out = ld_out.decode()
+ except:
+ return False
+
+ match = re.search(r"GNU gold \(.*\) (\d+)\.(\d+)", ld_out)
+ if not match:
+ return False
+ major = int(match.group(1))
+ minor = int(match.group(2))
+ if major < 1 or (major == 1 and minor < 12):
+ return False
- match = re.search(r'GNU gold \(.*\) (\d+)\.(\d+)', ld_out)
- if not match:
- return False
- major = int(match.group(1))
- minor = int(match.group(2))
- if major < 1 or (major == 1 and minor < 12):
- return False
+ return True
- return True
if not is_gold_v1_12_linker_available():
- config.unsupported = True
+ config.unsupported = True
import re
import subprocess
+
def is_gold_v1_16_linker_available():
- if not config.gold_executable:
- return False
- try:
- ld_cmd = subprocess.Popen([config.gold_executable, '-v'],
- stdout = subprocess.PIPE,
- stderr = subprocess.PIPE)
- ld_out, _ = ld_cmd.communicate()
- ld_out = ld_out.decode()
- except:
- return False
+ if not config.gold_executable:
+ return False
+ try:
+ ld_cmd = subprocess.Popen(
+ [config.gold_executable, "-v"],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ )
+ ld_out, _ = ld_cmd.communicate()
+ ld_out = ld_out.decode()
+ except:
+ return False
+
+ match = re.search(r"GNU gold \(.*\) (\d+)\.(\d+)", ld_out)
+ if not match:
+ return False
+ major = int(match.group(1))
+ minor = int(match.group(2))
+ if major < 1 or (major == 1 and minor < 16):
+ return False
- match = re.search(r'GNU gold \(.*\) (\d+)\.(\d+)', ld_out)
- if not match:
- return False
- major = int(match.group(1))
- minor = int(match.group(2))
- if major < 1 or (major == 1 and minor < 16):
- return False
+ return True
- return True
if not is_gold_v1_16_linker_available():
- config.unsupported = True
+ config.unsupported = True
-if (not 'ld_plugin' in config.available_features):
- config.unsupported = True
+if not "ld_plugin" in config.available_features:
+ config.unsupported = True
# gold can't load instrumented plugin.
-for san in ['asan', 'msan', 'ubsan']:
- if (san in config.available_features):
- config.unsupported = True
+for san in ["asan", "msan", "ubsan"]:
+ if san in config.available_features:
+ config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.test', '.m', '.cpp', '.c', '.h']
+config.suffixes = [".test", ".m", ".cpp", ".c", ".h"]
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes.add('.def')
+config.suffixes.add(".def")
from lit.llvm import llvm_config
if llvm_config.use_lld(required=False):
- config.available_features.add('lld')
+ config.available_features.add("lld")
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.s']
+config.suffixes = [".s"]
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.test', '.cpp', '.m', '.s']
+config.suffixes = [".test", ".cpp", ".m", ".s"]
-if not ('AArch64' in config.root.targets):
+if not ("AArch64" in config.root.targets):
# We need support for AArch64.
config.unsupported = True
-elif not ('aarch64' in config.root.host_triple):
+elif not ("aarch64" in config.root.host_triple):
# We need to be running on an PPC host.
config.unsupported = True
-if not ('Mips' in config.root.targets):
+if not ("Mips" in config.root.targets):
# We need support for Mips.
config.unsupported = True
-if not ('PowerPC' in config.root.targets):
+if not ("PowerPC" in config.root.targets):
# We need support for PowerPC.
config.unsupported = True
-elif not ('powerpc' in config.root.host_triple):
+elif not ("powerpc" in config.root.host_triple):
# We need to be running on an PPC host.
config.unsupported = True
-if not ('X86' in config.root.targets):
+if not ("X86" in config.root.targets):
# We need support for X86.
config.unsupported = True
-elif not ('x86_64' in config.root.host_triple):
+elif not ("x86_64" in config.root.host_triple):
# We need to be running on an X86 host.
config.unsupported = True
def can_execute_generated_snippets(arch):
is_host_arch = arch in config.root.host_triple
# 'native' feature is defined as "host arch == default triple arch"
- is_native_codegen = 'native' in config.available_features
+ is_native_codegen = "native" in config.available_features
return is_host_arch and is_native_codegen
# We need libpfm to be installed and allow reading perf counters. We can
# only know that at runtime, so we try to measure an empty code snippet
# and bail out on error.
- llvm_exegesis_exe = lit.util.which('llvm-exegesis', config.llvm_tools_dir)
+ llvm_exegesis_exe = lit.util.which("llvm-exegesis", config.llvm_tools_dir)
if llvm_exegesis_exe is None:
- print('could not find llvm-exegesis')
- return False
+ print("could not find llvm-exegesis")
+ return False
try:
return_code = subprocess.call(
- [llvm_exegesis_exe, '-mode', mode, '-snippets-file', '/dev/null'] + extra_options,
- stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
+ [llvm_exegesis_exe, "-mode", mode, "-snippets-file", "/dev/null"]
+ + extra_options,
+ stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL,
+ )
return return_code == 0
except OSError:
- print('could not exec llvm-exegesis')
+ print("could not exec llvm-exegesis")
return False
-for arch in ['aarch64', 'mips', 'powerpc', 'x86_64']:
+for arch in ["aarch64", "mips", "powerpc", "x86_64"]:
if can_execute_generated_snippets(arch):
- config.available_features.add('exegesis-can-execute-%s' % arch)
+ config.available_features.add("exegesis-can-execute-%s" % arch)
-if can_use_perf_counters('latency'):
- config.available_features.add('exegesis-can-measure-latency')
+if can_use_perf_counters("latency"):
+ config.available_features.add("exegesis-can-measure-latency")
-if can_use_perf_counters('uops'):
- config.available_features.add('exegesis-can-measure-uops')
+if can_use_perf_counters("uops"):
+ config.available_features.add("exegesis-can-measure-uops")
-if can_execute_generated_snippets('x86_64'):
+if can_execute_generated_snippets("x86_64"):
# Check for support of LBR format with cycles.
- if can_use_perf_counters('latency', ['-x86-lbr-sample-period', '123', '-repetition-mode', 'loop']):
- config.available_features.add('exegesis-can-measure-latency-lbr')
+ if can_use_perf_counters(
+ "latency", ["-x86-lbr-sample-period", "123", "-repetition-mode", "loop"]
+ ):
+ config.available_features.add("exegesis-can-measure-latency-lbr")
-if not ('ARM' in config.root.targets and 'AArch64' in config.root.targets):
+if not ("ARM" in config.root.targets and "AArch64" in config.root.targets):
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.ll', '.s', '.test', '.yaml', '.ifs']
+config.suffixes = [".ll", ".s", ".test", ".yaml", ".ifs"]
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
# Requires a non-empty default triple for these tests
-if 'object-emission' not in config.available_features:
+if "object-emission" not in config.available_features:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'SystemZ' in config.root.targets:
+if not "SystemZ" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
# Requires a non-empty default triple for these tests
-if 'default_triple' not in config.available_features:
+if "default_triple" not in config.available_features:
config.unsupported = True
-if not ('X86' in config.root.targets):
+if not ("X86" in config.root.targets):
# We need support for X86.
config.unsupported = True
-config.suffixes.add('.asm')
-config.suffixes.add('.blah')
+config.suffixes.add(".asm")
+config.suffixes.add(".blah")
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'WebAssembly' in config.root.targets:
+if not "WebAssembly" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'AMDGPU' in config.root.targets:
+if not "AMDGPU" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
import platform
-if not 'Hexagon' in config.root.targets:
+if not "Hexagon" in config.root.targets:
config.unsupported = True
-if platform.system() in ['Windows']:
- config.unsupported = True
+if platform.system() in ["Windows"]:
+ config.unsupported = True
import platform
-if not 'Lanai' in config.root.targets:
+if not "Lanai" in config.root.targets:
config.unsupported = True
-if not 'Mips' in config.root.targets:
+if not "Mips" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
- config.unsupported = True
+if not "PowerPC" in config.root.targets:
+ config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if 'WebAssembly' not in config.root.targets:
+if "WebAssembly" not in config.root.targets:
config.unsupported = True
if config.have_dia_sdk:
- config.available_features.add("diasdk")
+ config.available_features.add("diasdk")
-config.suffixes.add('.proftext')
+config.suffixes.add(".proftext")
import subprocess
import lit.util
-config.suffixes = ['.test', '.ll', '.s', '.yaml']
+config.suffixes = [".test", ".ll", ".s", ".yaml"]
-if not 'X86' in config.root.targets:
- config.unsupported = True
+if not "X86" in config.root.targets:
+ config.unsupported = True
-if not 'AArch64' in config.root.targets:
+if not "AArch64" in config.root.targets:
config.unsupported = True
-if not 'ARM' in config.root.targets:
+if not "ARM" in config.root.targets:
config.unsupported = True
-if not 'MSP430' in config.root.targets:
+if not "MSP430" in config.root.targets:
config.unsupported = True
-if not 'RISCV' in config.root.targets:
+if not "RISCV" in config.root.targets:
config.unsupported = True
-if not 'PowerPC' in config.root.targets:
+if not "PowerPC" in config.root.targets:
config.unsupported = True
-if not ('ld64_plugin' in config.available_features and 'X86' in config.root.targets):
+if not ("ld64_plugin" in config.available_features and "X86" in config.root.targets):
config.unsupported = True
# These tests invoke ld64 from the system, which is not leak-free
if "Address" in config.llvm_use_sanitizer:
- config.environment['ASAN_OPTIONS'] = 'detect_leaks=0'
+ config.environment["ASAN_OPTIONS"] = "detect_leaks=0"
import sys
-if 'have_opt_viewer_modules' not in config.available_features:
+if "have_opt_viewer_modules" not in config.available_features:
config.unsupported = True
# Windows has different multiprocessing behavior than non-Windows, which causes
# all of the tests to fail presently under Windows. Disable this until those
# can be resolved.
-if sys.platform == 'win32':
+if sys.platform == "win32":
config.unsupported = True
# These tests require a registered x86 backend.
-if not 'X86' in config.root.targets:
+if not "X86" in config.root.targets:
config.unsupported = True
-config.suffixes = ['.py']
+config.suffixes = [".py"]
# Check that the arbitrary config values in our parent was inherited.
-assert hasattr(config, 'an_extra_variable')
+assert hasattr(config, "an_extra_variable")
import lit.formats
+
config.test_format = lit.formats.ShTest(execute_external=True)
import lit.formats
+
config.test_format = lit.formats.ShTest(execute_external=True)
import lit.formats
+
config.test_format = lit.formats.ShTest(execute_external=False)