<div dir="ltr">Right, the trick is not conflicting with upcoming Apple changes. I read that as doing what Greg suggested.<div><br></div><div>I will give this a run and get it checked in if nothing else breaks.</div><div><br>
</div><div>Thanks, Keno!</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 24, 2014 at 11:40 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This works for me:<br>
<br>
diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp<br>
index 275b446..09c392b 100644<br>
--- a/source/Host/common/Host.cpp<br>
+++ b/source/Host/common/Host.cpp<br>
@@ -37,6 +37,9 @@<br>
#include <mach/mach_init.h><br>
#include <mach-o/dyld.h><br>
#include <AvailabilityMacros.h><br>
+#ifndef CPU_SUBTYPE_X86_64_H<br>
+#define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8)<br>
+#endif<br>
#endif<br>
<br>
#if defined (__linux__) || defined (__FreeBSD__) || defined<br>
(__FreeBSD_kernel__) || defined (__APPLE__) || defined(__NetBSD__)<br>
<br>
so just commit that? Not sure if it's all that great to have to do<br>
this, especially because we already have all the definitions we need<br>
in SafeMachO.h, but I guess this at least fixes the build.<br>
<div class="HOEnZb"><div class="h5"><br>
On Wed, Jul 23, 2014 at 5:19 PM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> The CPU is new and only available in newer system headers.<br>
><br>
> Keno, please add the following code only in the Host.cpp or Host.mm (since these are some of the few files in the LLDB sources that can include host specific header files) for apple builds:<br>
><br>
> #ifndef CPU_SUBTYPE_X86_64_H<br>
> #define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8)<br>
> #endif<br>
><br>
> This is usually in /usr/include/mach/machine.h, but it won't be in older versions of the header.<br>
><br>
><br>
>> On Jul 23, 2014, at 8:43 AM, Keno Fischer <<a href="mailto:kfischer@college.harvard.edu">kfischer@college.harvard.edu</a>> wrote:<br>
>><br>
>> While building on OS X I have been sent reports of the following (I<br>
>> did see it myself at one point as well, but worked around it). I tried<br>
>> including SafeMachO.h but that caused other problems in the llvm<br>
>> headers. What's the proper way to get around this other than `#define<br>
>> CPU_SUBTYPE_X86_64_H 8`?<br>
>><br>
>> lldb/source/Host/common/Host.cpp:371:68: error: use of undeclared<br>
>> identifier 'CPU_SUBTYPE_X86_64_H'<br>
>> if (cpusubtype == CPU_SUBTYPE_486 || cpusubtype ==<br>
>> CPU_SUBTYPE_X86_64_H)<br>
>><br>
>> Keno<br>
>> _______________________________________________<br>
>> lldb-dev mailing list<br>
>> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
><br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>