https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/166614

Backport bc55f4f4f2b4ef196cf3ec25f69dfbd9cd032237

Requested by: @JDevlieghere

>From 4b2ac3f7a210c1c8de5e8ee4c5f47104a3859ed7 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <[email protected]>
Date: Wed, 5 Nov 2025 10:32:38 -0800
Subject: [PATCH] [debugserver] Fix debugserver build on < macOS 10.15
 (#166599)

The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends.
Support using the constant on older OSes.

Fixes #156144

(cherry picked from commit bc55f4f4f2b4ef196cf3ec25f69dfbd9cd032237)
---
 lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp 
b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
index 97908b4acaf28..18d254e76b917 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp
@@ -14,6 +14,12 @@
 #include "DNBLog.h"
 #include <cassert>
 #include <mach/mach_vm.h>
+#include <mach/vm_statistics.h>
+
+// From <mach/vm_statistics.h>, but not on older OSs.
+#ifndef VM_MEMORY_SANITIZER
+#define VM_MEMORY_SANITIZER 99
+#endif
 
 MachVMRegion::MachVMRegion(task_t task)
     : m_task(task), m_addr(INVALID_NUB_ADDRESS), m_err(),

_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to