mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
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:
parent
133c693650
commit
ae5d06dc53
1423 changed files with 2213 additions and 5560 deletions
|
@ -1,10 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_STDIO_STDIO_H_
|
||||
#define COSMOPOLITAN_LIBC_STDIO_STDIO_H_
|
||||
#include "libc/fmt/pflink.h"
|
||||
#include "libc/intrin/nopl.h"
|
||||
#include "libc/intrin/pthread.h"
|
||||
#include "libc/nexgen32e/threaded.h"
|
||||
#include "libc/runtime/symbolic.h"
|
||||
|
||||
#define _STDIO_H
|
||||
#define L_ctermid 20
|
||||
|
@ -130,9 +127,6 @@ int fwide(FILE *, int);
|
|||
│ cosmopolitan § standard i/o » without mutexes ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
void flockfile(FILE *) paramsnonnull();
|
||||
void funlockfile(FILE *) paramsnonnull();
|
||||
int ftrylockfile(FILE *) paramsnonnull();
|
||||
int getc_unlocked(FILE *) paramsnonnull();
|
||||
int getchar_unlocked(void);
|
||||
int putc_unlocked(int, FILE *) paramsnonnull();
|
||||
|
@ -179,16 +173,6 @@ int vfprintf_unlocked(FILE *, const char *, va_list)
|
|||
#define putc_unlocked(c, f) fputc_unlocked(c, f)
|
||||
#define putwc_unlocked(c, f) fputwc_unlocked(c, f)
|
||||
|
||||
#ifdef _NOPL1
|
||||
#define flockfile(f) _NOPL1("__threadcalls", flockfile, f)
|
||||
#define funlockfile(f) _NOPL1("__threadcalls", funlockfile, f)
|
||||
#define ftrylockfile(f) _NOPL1("__threadcalls", ftrylockfile, f)
|
||||
#else
|
||||
#define flockfile(f) (__threaded ? flockfile(f) : 0)
|
||||
#define funlockfile(f) (__threaded ? funlockfile(f) : 0)
|
||||
#define ftrylockfile(f) (__threaded ? ftrylockfile(f) : 0)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
/* clang-format off */
|
||||
#define printf(FMT, ...) (printf)(PFLINK(FMT), ##__VA_ARGS__)
|
||||
|
@ -204,10 +188,6 @@ int vfprintf_unlocked(FILE *, const char *, va_list)
|
|||
/* clang-format on */
|
||||
#endif
|
||||
|
||||
#define stdin SYMBOLIC(stdin)
|
||||
#define stdout SYMBOLIC(stdout)
|
||||
#define stderr SYMBOLIC(stderr)
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_STDIO_STDIO_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue