[compiler-rt] [compiler-rt][test] Skip page-size feature detection under emulators. (PR #210683)
Simi Pallipurath via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 10:53:00 PDT 2026
https://github.com/simpal01 updated https://github.com/llvm/llvm-project/pull/210683
>From 59185a0c5f61343b92ac7466eea00dc661bf60a1 Mon Sep 17 00:00:00 2001
From: Simi Pallipurath <simi.pallipurath at arm.com>
Date: Mon, 20 Jul 2026 11:56:01 +0100
Subject: [PATCH 1/2] [compiler-rt][test] Skip page-size feature detection
under emulators.
This avoids adding a page-size-* lit feature when
compiler-rt tests are configured to run through an emulator.
Previously, target_page_size() attempted to query the page size
by running the configured Python executable, optionally
prefixed by the emulator. For emulator-based test configurations,
this is inappropriate. The function now returns None when an emulator
is configured, and the lit feature is only added when a concrete page
size is available.
---
compiler-rt/test/lit.common.cfg.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index c038b57f9e982..1045026f634ae 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -968,6 +968,8 @@ def is_windows_lto_supported():
def target_page_size():
if config.target_arch in ("amdgcn", "nvptx64"):
return 4096
+ if emulator:
+ return None
try:
proc = subprocess.Popen(
f"{emulator or ''} {shlex.quote(config.python_executable)}",
@@ -992,7 +994,9 @@ def target_page_size():
return 4096
-config.available_features.add(f"page-size-{target_page_size()}")
+page_size = target_page_size()
+if page_size is not None:
+ config.available_features.add(f"page-size-{page_size}")
if config.expensive_checks:
config.available_features.add("expensive_checks")
>From 18e4290f146fc89c96d958487466fbb7de9811c9 Mon Sep 17 00:00:00 2001
From: Simi Pallipurath <simi.pallipurath at arm.com>
Date: Mon, 20 Jul 2026 18:28:01 +0100
Subject: [PATCH 2/2] fixup! [compiler-rt][test] Skip page-size feature
detection under emulators.
Emulator can be removed from the command as it is
never expected to have a value by this point.
---
compiler-rt/test/lit.common.cfg.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 1045026f634ae..b204d0ff0d912 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -972,7 +972,7 @@ def target_page_size():
return None
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