mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 16:06:39 +08:00
[lldb] Re-add compile-time checks for SPI in HosInfoMacOSX
There were some checks removed previously in
bc196970b5.
However, all these SPIs are actually defined in macOS 12 and onward, not
macOSX 10.12 as the previous commit would suggest. As a result, if you
have access to these SPIs lldb will fail to compile correctly.
Instead of adding back the __builtin_availability checks, it seems
easier just to check the minimum deployment target with Availability
macros.
Differential Revision: https://reviews.llvm.org/D156838
This commit is contained in:
@@ -34,18 +34,21 @@
|
||||
#include <uuid/uuid.h>
|
||||
|
||||
// Objective-C/C++ includes
|
||||
#include <AvailabilityMacros.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <mach-o/dyld.h>
|
||||
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && \
|
||||
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_12_0
|
||||
#if __has_include(<mach-o/dyld_introspection.h>)
|
||||
#include <mach-o/dyld_introspection.h>
|
||||
#define SDK_HAS_NEW_DYLD_INTROSPECTION_SPIS
|
||||
#endif
|
||||
#endif
|
||||
#include <objc/objc-auto.h>
|
||||
|
||||
// These are needed when compiling on systems
|
||||
// that do not yet have these definitions
|
||||
#include <AvailabilityMacros.h>
|
||||
#ifndef CPU_SUBTYPE_X86_64_H
|
||||
#define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user