From 2716eb2f8896ec7bd3e59eb7c24bd200272d182c Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Sun, 18 Jan 2015 11:18:13 -0800 Subject: [PATCH 7/7] Define EXC_MASK_CRASH and MACH_EXCEPTION_CODES if they're not defined in the SDK The 10.4 SDK does not define these macros Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit f7e29b21119d99f743e47fd13182083b7598e1f7) --- lib/Support/Unix/Signals.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git llvm_release_34/lib/Support/Unix/Signals.inc macports_release_34/lib/Support/Unix/Signals.inc index b4c78d6..71f231c 100644 --- llvm_release_34/lib/Support/Unix/Signals.inc +++ macports_release_34/lib/Support/Unix/Signals.inc @@ -334,6 +334,15 @@ void llvm::sys::PrintStackTraceOnErrorSignal() { AddSignalHandler(PrintStackTraceSignalHandler, 0); #if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES) + +/* These aren't defined in the 10.4 SDK, so provide them here */ +#ifndef EXC_MASK_CRASH +#define EXC_MASK_CRASH 0x400 +#endif +#ifndef MACH_EXCEPTION_CODES +#define MACH_EXCEPTION_CODES 0x80000000 +#endif + // Environment variable to disable any kind of crash dialog. if (getenv("LLVM_DISABLE_CRASH_REPORT")) { mach_port_t self = mach_task_self(); -- 2.2.2