[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 04:01:14 PDT 2026


https://github.com/simpal01 created https://github.com/llvm/llvm-project/pull/210683

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.

>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] [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")



More information about the llvm-commits mailing list