Build failure on Darwin

Daniel Berlin dberlin at dberlin.org
Fri Apr 3 16:34:21 PDT 2015


I build continuously on Darwin, and have had no problems.

On Fri, Apr 3, 2015, 3:38 PM jahanian <fjahanian at apple.com> wrote:

> If I ifdef out this code in: lib/Support/Unix/Signals.inc clang builds.
>
> // #if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES)
> #if 0
>   // Environment variable to disable any kind of crash dialog.
>   if (getenv("LLVM_DISABLE_CRASH_REPORT")) {
>     mach_port_t self = mach_task_self();
>
>     exception_mask_t mask = EXC_MASK_CRASH;
>
>     kern_return_t ret = task_set_exception_ports(self,
>                              mask,
>                              MACH_PORT_NULL,
>                              EXCEPTION_STATE_IDENTITY |
> MACH_EXCEPTION_CODES,
>                              THREAD_STATE_NONE);
>     (void)ret;
>   }
> #endif
>
> Problem is that this code depends on headers not yet included.
> Further down we have:
> #if defined(__APPLE__) && defined(ENABLE_CRASH_OVERRIDES)
>
> #include <signal.h>
> #include <pthread.h>
>
> Any clues as to why it just fails for me (or no one has tried this on
> MacOSX recently).
>
> - fariborz
>
> On Apr 3, 2015, at 8:58 AM, jahanian <fjahanian at apple.com> wrote:
>
> I am getting this build failure building llvm on Darwin.
>
> llvm[1]: Compiling SpecialCaseList.cpp for Debug+Asserts build
> In file included from
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Signals.cpp:30:
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:495:5:
> error: unknown type name 'mach_port_t'
>     mach_port_t self = mach_task_self();
>     ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:495:24:
> error: use of undeclared identifier 'mach_task_self'
>     mach_port_t self = mach_task_self();
>                        ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:497:5:
> error: unknown type name 'exception_mask_t'
>     exception_mask_t mask = EXC_MASK_CRASH;
>     ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:497:29:
> error: use of undeclared identifier 'EXC_MASK_CRASH'
>     exception_mask_t mask = EXC_MASK_CRASH;
>                             ^
> llvm[1]: Compiling Statistic.cpp for Debug+Asserts build
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:499:5:
> error: unknown type name 'kern_return_t'
>     kern_return_t ret = task_set_exception_ports(self,
>     ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:501:30:
> error: use of undeclared identifier 'MACH_PORT_NULL'
>                              MACH_PORT_NULL,
>                              ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:502:30:
> error: use of undeclared identifier 'EXCEPTION_STATE_IDENTITY'
>                              EXCEPTION_STATE_IDENTITY |
> MACH_EXCEPTION_CODES,
>                              ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:502:57:
> error: use of undeclared identifier 'MACH_EXCEPTION_CODES'
>                              EXCEPTION_STATE_IDENTITY |
> MACH_EXCEPTION_CODES,
>                                                         ^
> /Users/fjahanian/sandbox/llvm-tot/lib/Support/Unix/Signals.inc:503:30:
> error: use of undeclared identifier 'THREAD_STATE_NONE'
>                              THREAD_STATE_NONE);
>                              ^
> 9 errors generated.
>
>
> - Fariborz
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150403/4a5ce6b0/attachment.html>


More information about the llvm-commits mailing list