mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Introduce cosmocc flags -mdbg -mtiny -moptlinux
The cosmocc.zip toolchain will now include four builds of the libcosmo.a runtime libraries. You can pass the -mdbg flag if you want to debug your cosmopolitan runtime. You can pass the -moptlinux flag if you don't want windows code lurking in your binary. See tool/cosmocc/README.md for more details on how these flags may be used and their important implications.
This commit is contained in:
parent
59692b0882
commit
642e9cb91a
22 changed files with 404 additions and 56 deletions
|
@ -37,7 +37,7 @@ register long freebsd_ordinal asm("x9");
|
|||
register long xnu_ordinal asm("x16");
|
||||
register long cosmo_tls_register asm("x28");
|
||||
|
||||
void report_cancelation_point(void);
|
||||
void report_cancelation_point(int, int);
|
||||
|
||||
dontinline long systemfive_cancel(void) {
|
||||
return _weaken(_pthread_cancel_ack)();
|
||||
|
@ -58,9 +58,9 @@ dontinline long systemfive_cancellable(void) {
|
|||
return systemfive_cancel();
|
||||
}
|
||||
#if IsModeDbg()
|
||||
if (!(pth->pt_flags & PT_INCANCEL)) {
|
||||
if (!(pth->pt_flags & PT_INCANCEL) && !(pth->pt_flags & PT_NOCANCEL)) {
|
||||
if (_weaken(report_cancelation_point)) {
|
||||
_weaken(report_cancelation_point)();
|
||||
_weaken(report_cancelation_point)(sysv_ordinal, xnu_ordinal);
|
||||
}
|
||||
__builtin_trap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue