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,11 +1,10 @@
#ifndef COSMOPOLITAN_LIBC_STR_STR_H_
#define COSMOPOLITAN_LIBC_STR_STR_H_
#define INVALID_CODEPOINT 0xfffd
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § characters » usas x3.4-1967
fourth age telecommunications */
extern const int8_t kHexToInt[256];
extern const uint8_t gperf_downcase[256];
@ -32,36 +31,6 @@ int toupper(int);
int hextoint(int);
int cescapec(int);
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § characters » thompson-pike encoding
fifth age telecommunications
0123456789abcdef
0 Control
1§
2 !"#$%&'()*+,-./┐
3 0123456789:;<=>?
4 @ABCDEFGHIJKLMNOASA x3.4-1967
5 PQRSTUVWXYZ[\]^_
6 `abcdefghijklmno
7pqrstuvwxyz{|}~
8ÇüéâäàåçêëèïîìÄÅ
9 ÉæÆôöòûùÿÖÜ¢£¥ƒThompson-Pike Continuation
a á¡óúñѪº¿¬½¼¡«» (not really characters)
b
c1 Continuation will follow
d
eαßΓπΣσμτΦΘΩδφε2 Continuations will follow
f±÷°·²λ
5 Continuations follow (and is negative)
5 Continuations follow (note: -1=λ)
4 Continuations follow
3 Continuations follow */
#define INVALID_CODEPOINT 0xfffd
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswblank(wint_t);
@ -78,10 +47,6 @@ int iswseparator(wint_t);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § strings
*/
void bzero(void *, size_t) memcpyesque;
void *memset(void *, int, size_t) memcpyesque;
void *memmove(void *, const void *, size_t) memcpyesque;
@ -206,10 +171,6 @@ bool _istext(const void *, size_t) libcesque;
bool _isutf8(const void *, size_t) libcesque;
bool _escapedos(char16_t *, unsigned, const char16_t *, unsigned) libcesque;
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § strings » multibyte
*/
typedef unsigned mbstate_t;
axdx_t tprecode8to16(char16_t *, size_t, const char *);
@ -256,10 +217,6 @@ typedef const int *wctrans_t;
wctrans_t wctrans(const char *);
wint_t towctrans(wint_t, wctrans_t);
/*───────────────────────────────────────────────────────────────────────────│─╗
cosmopolitan § strings » system
*/
char *strsignal(int) returnsnonnull libcesque;
char *strerror(int) returnsnonnull dontthrow nocallback;
char *strerrno(int) nosideeffect libcesque;