[compiler-rt] [compiler-rt] [test] refine target_page_size() in lit.common.cfg.py (NFC) (PR #170475)

Mészáros Gergely via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 8 01:58:51 PST 2025


================
@@ -971,8 +971,19 @@ def target_page_size():
             stdin=subprocess.PIPE,
             stdout=subprocess.PIPE,
         )
+        # Unix has sysconf,
+        # Windows can use mmap.PAGESIZE
+        # Not using mmap.PAGESIZE everywhere because
+        # it is not available in WASI, but sysconf is.
         out, err = proc.communicate(
-            b'import os; print(os.sysconf("SC_PAGESIZE") if hasattr(os, "sysconf") else "")'
+            b"""
+try:
----------------
Maetveis wrote:

Swapped the order in 28bbdc295d9804396814b5f55ec29c8a4d408ac3

https://github.com/llvm/llvm-project/pull/170475


More information about the llvm-commits mailing list