Unbloat build config

- 10.5% reduction of o//depend dependency graph
- 8.8% reduction in latency of make command
- Fix issue with temporary file cleanup

There's a new -w option in compile.com that turns off the recent
Landlock output path workaround for "good commands" which do not
unlink() the output file like GNU tooling does.

Our new GNU Make unveil sandboxing appears to have zero overhead
in the grand scheme of things. Full builds are pretty fast since
the only thing that's actually slowed us down is probably libcxx

    make -j16 MODE=rel
    RL: took 85,732,063µs wall time
    RL: ballooned to 323,612kb in size
    RL: needed 828,560,521µs cpu (11% kernel)
    RL: caused 39,080,670 page faults (99% memcpy)
    RL: 350,073 context switches (72% consensual)
    RL: performed 0 reads and 11,494,960 write i/o operations

pledge() and unveil() no longer consider ENOSYS to be an error.
These functions have also been added to Python's cosmo module.

This change also removes some WIN32 APIs and System Five magnums
which we're not using and it's doubtful anyone else would be too
This commit is contained in:
Justine Tunney 2022-08-10 01:32:17 -07:00
parent 133c693650
commit ae5d06dc53
1423 changed files with 2213 additions and 5560 deletions

View file

@ -1,66 +1,31 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_IN_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IN_H_
#include "libc/runtime/symbolic.h"
#define IN_ACCESS SYMBOLIC(IN_ACCESS)
#define IN_ALL_EVENTS SYMBOLIC(IN_ALL_EVENTS)
#define IN_ATTRIB SYMBOLIC(IN_ATTRIB)
#define IN_CLOEXEC SYMBOLIC(IN_CLOEXEC)
#define IN_CLOSE SYMBOLIC(IN_CLOSE)
#define IN_CLOSE_NOWRITE SYMBOLIC(IN_CLOSE_NOWRITE)
#define IN_CLOSE_WRITE SYMBOLIC(IN_CLOSE_WRITE)
#define IN_CREATE SYMBOLIC(IN_CREATE)
#define IN_DELETE SYMBOLIC(IN_DELETE)
#define IN_DELETE_SELF SYMBOLIC(IN_DELETE_SELF)
#define IN_DONT_FOLLOW SYMBOLIC(IN_DONT_FOLLOW)
#define IN_EXCL_UNLINK SYMBOLIC(IN_EXCL_UNLINK)
#define IN_IGNORED SYMBOLIC(IN_IGNORED)
#define IN_ISDIR SYMBOLIC(IN_ISDIR)
#define IN_LOOPBACKNET SYMBOLIC(IN_LOOPBACKNET)
#define IN_MASK_ADD SYMBOLIC(IN_MASK_ADD)
#define IN_MODIFY SYMBOLIC(IN_MODIFY)
#define IN_MOVE SYMBOLIC(IN_MOVE)
#define IN_MOVED_FROM SYMBOLIC(IN_MOVED_FROM)
#define IN_MOVED_TO SYMBOLIC(IN_MOVED_TO)
#define IN_MOVE_SELF SYMBOLIC(IN_MOVE_SELF)
#define IN_NONBLOCK SYMBOLIC(IN_NONBLOCK)
#define IN_ONESHOT SYMBOLIC(IN_ONESHOT)
#define IN_ONLYDIR SYMBOLIC(IN_ONLYDIR)
#define IN_OPEN SYMBOLIC(IN_OPEN)
#define IN_Q_OVERFLOW SYMBOLIC(IN_Q_OVERFLOW)
#define IN_UNMOUNT SYMBOLIC(IN_UNMOUNT)
#define IN_ACCESS 1
#define IN_ALL_EVENTS 0x0fff
#define IN_ATTRIB 4
#define IN_CLOEXEC 0x080000
#define IN_CLOSE 24
#define IN_CLOSE_NOWRITE 0x10
#define IN_CLOSE_WRITE 8
#define IN_CREATE 0x0100
#define IN_DELETE 0x0200
#define IN_DELETE_SELF 0x0400
#define IN_DONT_FOLLOW 0x02000000
#define IN_EXCL_UNLINK 0x04000000
#define IN_IGNORED 0x8000
#define IN_ISDIR 0x40000000
#define IN_MASK_ADD 0x20000000
#define IN_MODIFY 2
#define IN_MOVE 192
#define IN_MOVED_FROM 0x40
#define IN_MOVED_TO 0x80
#define IN_MOVE_SELF 0x0800
#define IN_NONBLOCK 0x0800
#define IN_ONESHOT 0x80000000
#define IN_ONLYDIR 0x01000000
#define IN_OPEN 0x20
#define IN_Q_OVERFLOW 0x4000
#define IN_UNMOUNT 0x2000
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const uint32_t IN_ACCESS;
extern const uint32_t IN_ALL_EVENTS;
extern const uint32_t IN_ATTRIB;
extern const uint32_t IN_CLOEXEC;
extern const uint32_t IN_CLOSE;
extern const uint32_t IN_CLOSE_NOWRITE;
extern const uint32_t IN_CLOSE_WRITE;
extern const uint32_t IN_CREATE;
extern const uint32_t IN_DELETE;
extern const uint32_t IN_DELETE_SELF;
extern const uint32_t IN_DONT_FOLLOW;
extern const uint32_t IN_EXCL_UNLINK;
extern const uint32_t IN_IGNORED;
extern const uint32_t IN_ISDIR;
extern const uint32_t IN_LOOPBACKNET;
extern const uint32_t IN_MASK_ADD;
extern const uint32_t IN_MODIFY;
extern const uint32_t IN_MOVE;
extern const uint32_t IN_MOVED_FROM;
extern const uint32_t IN_MOVED_TO;
extern const uint32_t IN_MOVE_SELF;
extern const uint32_t IN_NONBLOCK;
extern const uint32_t IN_ONESHOT;
extern const uint32_t IN_ONLYDIR;
extern const uint32_t IN_OPEN;
extern const uint32_t IN_Q_OVERFLOW;
extern const uint32_t IN_UNMOUNT;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_IN_H_ */