[compiler-rt] [compiler-rt] [test] refine target_page_size() in lit.common.cfg.py (NFC) (PR #170475)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 4 11:25:26 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:
----------------
fmayer wrote:
why don't we just use `mmap.PAGESIZE` then?
https://github.com/llvm/llvm-project/pull/170475
More information about the llvm-commits
mailing list