From fbca90b609f6c42ce7e4c9bb3ee8bd2c230a670c Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 18 Apr 2024 01:27:49 -0400 Subject: [PATCH] [unittest] Skip W+X MappedMemoryTests on OpenBSD (#89102) OpenBSD uses W^X so the tests will not work. --- llvm/unittests/Support/MemoryTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/unittests/Support/MemoryTest.cpp b/llvm/unittests/Support/MemoryTest.cpp index 0164492829ccd7..9daa6d0ff9e4dd 100644 --- a/llvm/unittests/Support/MemoryTest.cpp +++ b/llvm/unittests/Support/MemoryTest.cpp @@ -40,7 +40,7 @@ bool IsMPROTECT() { err(EXIT_FAILURE, "sysctl"); return !!(paxflags & CTL_PROC_PAXFLAGS_MPROTECT); -#elif defined(__APPLE__) && defined(__aarch64__) +#elif (defined(__APPLE__) && defined(__aarch64__)) || defined(__OpenBSD__) return true; #else return false;