aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/lit.cfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/lit.cfg.py')
-rw-r--r--llvm/test/lit.cfg.py39
1 files changed, 27 insertions, 12 deletions
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 143cc38..8c2d1a4 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -18,7 +18,17 @@ from lit.llvm.subst import ToolSubst
config.name = "LLVM"
# testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
+extra_substitutions = extra_substitutions = (
+ [
+ (r"\| not FileCheck .*", "> /dev/null"),
+ (r"\| FileCheck .*", "> /dev/null"),
+ ]
+ if config.enable_profcheck
+ else []
+)
+config.test_format = lit.formats.ShTest(
+ not llvm_config.use_lit_shell, extra_substitutions
+)
# suffixes: A list of file extensions to treat as test files. This is overriden
# by individual lit.local.cfg files in the test subdirectories.
@@ -107,7 +117,12 @@ lli_args = []
# we don't support COFF in MCJIT well enough for the tests, force ELF format on
# Windows. FIXME: the process target triple should be used here, but this is
# difficult to obtain on Windows.
-if re.search(r"cygwin|windows-gnu|windows-msvc", config.host_triple):
+# Cygwin is excluded from this workaround, even though it is COFF, because this
+# breaks remote tests due to not having a __register_frame function. The only
+# test that succeeds with cygwin-elf but fails with cygwin is
+# test/ExecutionEngine/MCJIT/stubs-sm-pic.ll so this test is marked as XFAIL
+# for cygwin targets.
+if re.search(r"windows-gnu|windows-msvc", config.host_triple):
lli_args = ["-mtriple=" + config.host_triple + "-elf"]
llc_args = []
@@ -278,6 +293,7 @@ tools.extend(
]
)
+
# Find (major, minor) version of ptxas
def ptxas_version(ptxas):
ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
@@ -385,10 +401,11 @@ if config.target_triple:
else:
config.available_features.add("target-byteorder-little-endian")
-if sys.platform in ["win32"]:
+if sys.platform in ["win32", "cygwin"]:
# ExecutionEngine, no weak symbols in COFF.
config.available_features.add("uses_COFF")
-else:
+
+if sys.platform not in ["win32"]:
# Others/can-execute.txt
config.available_features.add("can-execute")
@@ -451,7 +468,7 @@ if config.link_llvm_dylib:
"%llvmdylib",
"{}/libLLVM{}.{}".format(
config.llvm_shlib_dir, config.llvm_shlib_ext, config.llvm_dylib_version
- )
+ ),
)
)
@@ -582,6 +599,7 @@ def have_ld64_plugin_support():
if have_ld64_plugin_support():
config.available_features.add("ld64_plugin")
+
def host_unwind_supports_jit():
# Do we expect the host machine to support JIT registration of clang's
# default unwind info format for the host (e.g. eh-frames, compact-unwind,
@@ -589,7 +607,7 @@ def host_unwind_supports_jit():
# Linux and the BSDs use DWARF eh-frames and all known unwinders support
# register_frame at minimum.
- if platform.system() in [ "Linux", "FreeBSD", "NetBSD" ]:
+ if platform.system() in ["Linux", "FreeBSD", "NetBSD"]:
return True
# Windows does not support frame info without the ORC runtime.
@@ -601,11 +619,7 @@ def host_unwind_supports_jit():
# compact-unwind only, and JIT'd registration is not available before
# macOS 14.0.
if platform.system() == "Darwin":
-
- assert (
- "arm64" in config.host_triple
- or "x86_64" in config.host_triple
- )
+ assert "arm64" in config.host_triple or "x86_64" in config.host_triple
if "x86_64" in config.host_triple:
return True
@@ -627,6 +641,7 @@ def host_unwind_supports_jit():
return False
+
if host_unwind_supports_jit():
config.available_features.add("host-unwind-supports-jit")
@@ -659,7 +674,7 @@ if not hasattr(sys, "getwindowsversion") or sys.getwindowsversion().build >= 170
# .debug_frame is not emitted for targeting Windows x64, aarch64/arm64, AIX, or Apple Silicon Mac.
if not re.match(
- r"^(x86_64|aarch64|arm64|powerpc|powerpc64).*-(windows-gnu|windows-msvc|aix)",
+ r"^(x86_64|aarch64|arm64|powerpc|powerpc64).*-(windows-cygnus|windows-gnu|windows-msvc|aix)",
config.target_triple,
) and not re.match(r"^arm64(e)?-apple-(macos|darwin)", config.target_triple):
config.available_features.add("debug_frame")