mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Fix Landlock Make so it can read pattern rule vars
It turned out that specifying all SRCS and INCS as dependencies on the pattern rules for all headers, caused `make` memory usage to skyrocket from 40mb ot 160mb. This change also reduces the build graph another 4%.
This commit is contained in:
parent
62ca1b0902
commit
ead3fc2b31
53 changed files with 105 additions and 93 deletions
|
@ -192,6 +192,7 @@ int unlink(const char *);
|
|||
int unlink_s(const char **);
|
||||
int unlinkat(int, const char *, int);
|
||||
int unveil(const char *, const char *);
|
||||
int usleep(unsigned);
|
||||
int vfork(void) returnstwice;
|
||||
int wait(int *);
|
||||
int waitpid(int, int *, int);
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "libc/calls/struct/termios.h"
|
||||
#include "libc/calls/struct/winsize.h"
|
||||
#include "libc/calls/syscall_support-nt.internal.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/spinlock.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/log/log.h"
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/calls/termios.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
#include "libc/time/time.h"
|
||||
|
||||
int tcsendbreak(int fd, int len) {
|
||||
if (!IsBsd()) {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/promises.internal.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
#include "libc/log/log.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define COSMOPOLITAN_LIBC_LOG_GDB_H_
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/wait4.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/sysv/consts/nr.h"
|
||||
#include "libc/sysv/consts/w.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/itoa.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_LOG_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_LOG_INTERNAL_H_
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/calls/struct/siginfo.h"
|
||||
#include "libc/calls/struct/termios.h"
|
||||
#include "libc/calls/ucontext.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_LOG_LOG_H_
|
||||
#define COSMOPOLITAN_LIBC_LOG_LOG_H_
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/calls/struct/rusage.h"
|
||||
#include "libc/calls/struct/sigset.h"
|
||||
#include "libc/calls/struct/winsize.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/nexgen32e/stackframe.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § liblog ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
#define kLogFatal 0
|
||||
#define kLogError 1
|
||||
|
@ -65,9 +60,6 @@ void CheckForMemoryLeaks(void);
|
|||
|
||||
#define showcrashreports() ShowCrashReports()
|
||||
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § liblog » logging ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
#ifndef __STRICT_ANSI__
|
||||
|
||||
extern unsigned __log_level; /* log level for runtime check */
|
||||
|
@ -194,10 +186,6 @@ extern unsigned __log_level; /* log level for runtime check */
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § liblog » on error resume next ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
#define LOGIFNEG1(FORM) \
|
||||
({ \
|
||||
int e = errno; \
|
||||
|
@ -224,10 +212,6 @@ extern unsigned __log_level; /* log level for runtime check */
|
|||
Ax; \
|
||||
})
|
||||
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § liblog » implementation details ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
|
||||
void __logerrno(const char *, int, const char *) relegated;
|
||||
|
||||
#define ARGS unsigned, const char *, int, FILE *, const char *
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/calls/struct/sigaltstack.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/log/internal.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
|
|
|
@ -29,7 +29,6 @@ extern unsigned char _tls_content[];
|
|||
void _init(void) hidden;
|
||||
void __enable_tls(void);
|
||||
void __enable_threads(void) hidden;
|
||||
void __restorewintty(void) hidden;
|
||||
void *__cxa_finalize(void *) hidden;
|
||||
void cosmo(int, char **, char **, long (*)[2]) hidden wontreturn;
|
||||
void __stack_chk_fail(void) wontreturn relegated;
|
||||
|
|
|
@ -125,6 +125,7 @@ void __print_maps(void);
|
|||
void __warn_if_powersave(void);
|
||||
const char *__describe_os(void);
|
||||
bool IsDynamicExecutable(const char *);
|
||||
void __restorewintty(void);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/sigaction.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/backtrace.internal.h"
|
||||
#include "libc/log/internal.h"
|
||||
|
@ -29,6 +30,7 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/sig.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "third_party/dlmalloc/dlmalloc.h"
|
||||
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/strace.internal.h"
|
||||
#include "libc/calls/struct/rlimit.h"
|
||||
|
@ -26,8 +23,12 @@
|
|||
#include "libc/calls/struct/sigset.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/asan.internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/intrin/weaken.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/color.internal.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time/tz.internal.h"
|
||||
#include "third_party/python/Include/object.h"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
|
||||
char *ctime(const time_t *timep) {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "libc/runtime/gc.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time/tz.internal.h"
|
||||
#include "libc/time/tzfile.internal.h"
|
||||
|
|
|
@ -17,19 +17,21 @@ struct tm {
|
|||
const char *tm_zone;
|
||||
};
|
||||
|
||||
struct tm *gmtime_r(const int64_t *, struct tm *);
|
||||
struct tm *localtime_r(const int64_t *, struct tm *);
|
||||
int64_t timegm(struct tm *);
|
||||
int64_t mktime(struct tm *);
|
||||
int64_t timelocal(struct tm *);
|
||||
int64_t timeoff(struct tm *, long);
|
||||
char *strptime(const char *, const char *, struct tm *);
|
||||
size_t strftime(char *, size_t, const char *, const struct tm *)
|
||||
strftimeesque(3);
|
||||
char *asctime(const struct tm *);
|
||||
char *asctime_r(const struct tm *, char[hasatleast 64]);
|
||||
char *iso8601(char[hasatleast 20], struct tm *);
|
||||
char *strptime(const char *, const char *, struct tm *);
|
||||
int64_t mktime(struct tm *);
|
||||
int64_t timegm(struct tm *);
|
||||
int64_t timelocal(struct tm *);
|
||||
int64_t timeoff(struct tm *, long);
|
||||
size_t strftime(char *, size_t, const char *, const struct tm *)
|
||||
strftimeesque(3);
|
||||
size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
|
||||
struct tm *gmtime(const int64_t *);
|
||||
struct tm *gmtime_r(const int64_t *, struct tm *);
|
||||
struct tm *localtime(const int64_t *);
|
||||
struct tm *localtime_r(const int64_t *, struct tm *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
|
|
|
@ -8,6 +8,8 @@ struct utimbuf {
|
|||
int64_t modtime; /* modified time */
|
||||
};
|
||||
|
||||
int utime(const char *, const struct utimbuf *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TIME_STRUCT_UTIMBUF_H_ */
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TIME_TIME_H_
|
||||
#define COSMOPOLITAN_LIBC_TIME_TIME_H_
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/struct/utimbuf.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -20,8 +18,6 @@ char *ctime(const int64_t *);
|
|||
char *ctime_r(const int64_t *, char[hasatleast 64]);
|
||||
double difftime(int64_t, int64_t) dontthrow pureconst;
|
||||
extern long double (*nowl)(void);
|
||||
int usleep(uint32_t);
|
||||
int utime(const char *, const struct utimbuf *);
|
||||
int64_t clock(void);
|
||||
int64_t posix2time(int64_t) pureconst;
|
||||
int64_t time(int64_t *);
|
||||
|
@ -29,8 +25,6 @@ int64_t time2posix(int64_t) pureconst;
|
|||
long double ConvertTicksToNanos(uint64_t);
|
||||
long double dsleep(long double);
|
||||
long double dtime(int);
|
||||
struct tm *gmtime(const int64_t *);
|
||||
struct tm *localtime(const int64_t *);
|
||||
unsigned alarm(unsigned);
|
||||
unsigned sleep(unsigned);
|
||||
void RefreshTime(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue