<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">If I ifdef out this code in: <span class="" style="font-family: Menlo; font-size: 11px;">lib/Support/Unix/</span><span class="" style="font-family: Menlo; font-size: 11px;">Signals.inc clang builds.</span><div class=""><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">// #if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES)</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">#if 0</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">  // Environment variable to disable any kind of crash dialog.</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">  if (getenv("LLVM_DISABLE_CRASH_REPORT")) {</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">    mach_port_t self = mach_task_self();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class="">    <br class="webkit-block-placeholder"></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">    exception_mask_t mask = EXC_MASK_CRASH;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class="">    <br class="webkit-block-placeholder"></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">    kern_return_t ret = task_set_exception_ports(self,</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">                             mask,</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">                             MACH_PORT_NULL,</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">                             EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">                             THREAD_STATE_NONE);</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">    (void)ret;</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">  }</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">#endif</div></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><br class=""></div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">Problem is that this code depends on headers not yet included.</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;">Further down we have:</div><div class="" style="margin: 0px; font-size: 11px; font-family: Menlo;"><div class="" style="margin: 0px;">#if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES)</div><div class="" style="margin: 0px; min-height: 13px;"><br class=""></div><div class="" style="margin: 0px;">#include <signal.h></div><div class="" style="margin: 0px;">#include <pthread.h></div><div class="" style="margin: 0px;"><br class=""></div><div class="" style="margin: 0px;">Any clues as to why it just fails for me (or no one has tried this on MacOSX recently).</div><div class="" style="margin: 0px;"><br class=""></div><div class="" style="margin: 0px;">- fariborz</div><div class="" style="margin: 0px;"><br class=""></div></div></div><div><blockquote type="cite" class=""><div class="">On Apr 3, 2015, at 8:58 AM, jahanian <<a href="mailto:fjahanian@apple.com" class="">fjahanian@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I am getting this build failure building llvm on Darwin.<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">llvm[1]: Compiling SpecialCaseList.cpp for Debug+Asserts build</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">In file included from /Users/fjahanian/sandbox/llvm-tot/lib/Support/Signals.cpp:30:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:495:5: error: unknown type name 'mach_port_t'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    mach_port_t self = mach_task_self();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:495:24: error: use of undeclared identifier 'mach_task_self'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    mach_port_t self = mach_task_self();</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                       ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:497:5: error: unknown type name 'exception_mask_t'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    exception_mask_t mask = EXC_MASK_CRASH;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:497:29: error: use of undeclared identifier 'EXC_MASK_CRASH'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    exception_mask_t mask = EXC_MASK_CRASH;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                            ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">llvm[1]: Compiling Statistic.cpp for Debug+Asserts build</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:499:5: error: unknown type name 'kern_return_t'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    kern_return_t ret = task_set_exception_ports(self,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:501:30: error: use of undeclared identifier 'MACH_PORT_NULL'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             MACH_PORT_NULL,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:502:30: error: use of undeclared identifier 'EXCEPTION_STATE_IDENTITY'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:502:57: error: use of undeclared identifier 'MACH_EXCEPTION_CODES'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                                                        ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">/Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:503:30: error: use of undeclared identifier 'THREAD_STATE_NONE'</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             THREAD_STATE_NONE);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                             ^</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">9 errors generated.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">- Fariborz</div><div class=""><br class=""></div></div>_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br class=""></div></blockquote></div><br class=""></body></html>