mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 22:19:10 +00:00
Add MODE=optlinux build mode (#141)
This commit is contained in:
parent
226aaf3547
commit
67b5200a0b
111 changed files with 934 additions and 854 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "libc/log/internal.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
/**
|
||||
* Aborts process after printing a backtrace.
|
||||
|
@ -33,11 +34,12 @@ relegated wontreturn void __die(void) {
|
|||
static bool once;
|
||||
if (cmpxchg(&once, false, true)) {
|
||||
__restore_tty(1);
|
||||
if (IsDebuggerPresent(false)) DebugBreak();
|
||||
if (IsDebuggerPresent(false)) {
|
||||
DebugBreak();
|
||||
}
|
||||
ShowBacktrace(2, NULL);
|
||||
exit(77);
|
||||
} else {
|
||||
__write_str("PANIC: __DIE() DIED\r\n");
|
||||
_exit(78);
|
||||
quick_exit(77);
|
||||
}
|
||||
__write_str("PANIC: __DIE() DIED\r\n");
|
||||
_Exit(78);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue