[compiler-rt] r290521 - [sanitizer] Define some CPU type symbols (like CPU_SUBTYPE_X86_64_H) when they're not available.
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 25 12:03:40 PST 2016
Author: kuba.brecka
Date: Sun Dec 25 14:03:40 2016
New Revision: 290521
URL: http://llvm.org/viewvc/llvm-project?rev=290521&view=rev
Log:
[sanitizer] Define some CPU type symbols (like CPU_SUBTYPE_X86_64_H) when they're not available.
This allows compiler-rt to be built on older macOS SDKs, where there symbols are not defined.
Patch by Jeremy Huddleston Sequoia <jeremyhu at apple.com>.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_mac.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_mac.cc?rev=290521&r1=290520&r2=290521&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_mac.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_procmaps_mac.cc Sun Dec 25 14:03:40 2016
@@ -19,6 +19,20 @@
#include <mach-o/dyld.h>
#include <mach-o/loader.h>
+// These are not available in older macOS SDKs.
+#ifndef CPU_SUBTYPE_X86_64_H
+#define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8) /* Haswell */
+#endif
+#ifndef CPU_SUBTYPE_ARM_V7S
+#define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t)11) /* Swift */
+#endif
+#ifndef CPU_SUBTYPE_ARM_V7K
+#define CPU_SUBTYPE_ARM_V7K ((cpu_subtype_t)12)
+#endif
+#ifndef CPU_TYPE_ARM64
+#define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64)
+#endif
+
namespace __sanitizer {
MemoryMappingLayout::MemoryMappingLayout(bool cache_enabled) {
More information about the llvm-commits
mailing list