[compiler-rt] [compiler-rt][test] Use fallback page size with an emulator (PR #210685)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 04:11:02 PDT 2026
https://github.com/maflcko created https://github.com/llvm/llvm-project/pull/210685
Using the fallback page size avoids executing Python with an emulator, which can fail.
E.g. the failures could look like the ones in https://github.com/llvm/llvm-project/pull/209175#issuecomment-5021551711:
* `python3: No such file or directory`
* `subprocess.TimeoutExpired: Command '['/usr/local/bin/qemu-system-riscv32', ... , '/usr/bin/python3']' timed out after 900 seconds`
In both cases, the pre-existing `4096` fallback was then picked.
>From fa4eb28ffca82e01f00e6ce9c7d43a1cd8d95f28 Mon Sep 17 00:00:00 2001
From: MarcoFalke <*~=`'#}+{/-|&$^_ at 721217.xyz>
Date: Mon, 20 Jul 2026 13:09:03 +0200
Subject: [PATCH] [compiler-rt][test] Use fallback page size with an emulator
Using the fallback page size avoids executing Python with an emulator,
which can fail.
---
compiler-rt/test/lit.common.cfg.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index c038b57f9e982..396aee7c3947d 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -968,9 +968,12 @@ def is_windows_lto_supported():
def target_page_size():
if config.target_arch in ("amdgcn", "nvptx64"):
return 4096
+ if emulator:
+ # Emulators may not provide a target-side Python executable.
+ return 4096
try:
proc = subprocess.Popen(
- f"{emulator or ''} {shlex.quote(config.python_executable)}",
+ shlex.quote(config.python_executable),
shell=True,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
More information about the llvm-commits
mailing list