Skip to content

Commit be3a7ee

Browse files
committed
[LLVM] adjust lit.cfg.py for Cygwin
Cygwin is like Windows in that it uses COFF, and doesn't emit .debug_frame on 64-bit architectures. However, more tests fail if -elf is appended to the target triple on Cygwin than if it is not, so remove cygwin from that case rather than adding windows-cygnus to it.
1 parent 1bf89e9 commit be3a7ee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/test/lit.cfg.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def get_asan_rtlib():
107107
# we don't support COFF in MCJIT well enough for the tests, force ELF format on
108108
# Windows. FIXME: the process target triple should be used here, but this is
109109
# difficult to obtain on Windows.
110-
if re.search(r"cygwin|windows-gnu|windows-msvc", config.host_triple):
110+
if re.search(r"windows-gnu|windows-msvc", config.host_triple):
111111
lli_args = ["-mtriple=" + config.host_triple + "-elf"]
112112

113113
llc_args = []
@@ -385,10 +385,11 @@ def version_int(ver):
385385
else:
386386
config.available_features.add("target-byteorder-little-endian")
387387

388-
if sys.platform in ["win32"]:
388+
if sys.platform in ["win32", "cygwin"]:
389389
# ExecutionEngine, no weak symbols in COFF.
390390
config.available_features.add("uses_COFF")
391-
else:
391+
392+
if sys.platform not in ["win32"]:
392393
# Others/can-execute.txt
393394
config.available_features.add("can-execute")
394395

@@ -659,7 +660,7 @@ def host_unwind_supports_jit():
659660

660661
# .debug_frame is not emitted for targeting Windows x64, aarch64/arm64, AIX, or Apple Silicon Mac.
661662
if not re.match(
662-
r"^(x86_64|aarch64|arm64|powerpc|powerpc64).*-(windows-gnu|windows-msvc|aix)",
663+
r"^(x86_64|aarch64|arm64|powerpc|powerpc64).*-(windows-cygnus|windows-gnu|windows-msvc|aix)",
663664
config.target_triple,
664665
) and not re.match(r"^arm64(e)?-apple-(macos|darwin)", config.target_triple):
665666
config.available_features.add("debug_frame")

0 commit comments

Comments
 (0)