mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-16 23:50:32 +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
1
third_party/mbedtls/bignum_internal.h
vendored
1
third_party/mbedtls/bignum_internal.h
vendored
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_MBEDTLS_BIGNUM_INTERNAL_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_MBEDTLS_BIGNUM_INTERNAL_H_
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
|
2
third_party/mbedtls/chachapoly.h
vendored
2
third_party/mbedtls/chachapoly.h
vendored
|
@ -33,8 +33,6 @@ typedef struct mbedtls_chachapoly_context
|
|||
}
|
||||
mbedtls_chachapoly_context;
|
||||
|
||||
#else /* !MBEDTLS_CHACHAPOLY_ALT */
|
||||
/* #include "third_party/mbedtls/chachapoly_alt.h" */
|
||||
#endif /* !MBEDTLS_CHACHAPOLY_ALT */
|
||||
|
||||
/**
|
||||
|
|
9
third_party/mbedtls/config.h
vendored
9
third_party/mbedtls/config.h
vendored
|
@ -1,12 +1,5 @@
|
|||
#ifndef MBEDTLS_CONFIG_H_
|
||||
#define MBEDTLS_CONFIG_H_
|
||||
#include "libc/dce.h"
|
||||
|
||||
/* /\* uncomment for testing old cpu code paths *\/ */
|
||||
/* #include "libc/nexgen32e/x86feature.h" */
|
||||
/* #undef X86_HAVE */
|
||||
/* #define X86_HAVE(x) 0 */
|
||||
/* #undef __x86_64__ */
|
||||
|
||||
/* protocols */
|
||||
#define MBEDTLS_SSL_PROTO_TLS1_2
|
||||
|
@ -146,7 +139,7 @@
|
|||
#define MBEDTLS_ZLIB_SUPPORT
|
||||
#endif
|
||||
|
||||
#if IsModeDbg()
|
||||
#ifdef MODE_DBG
|
||||
#define MBEDTLS_CHECK_PARAMS
|
||||
#endif
|
||||
|
||||
|
|
2
third_party/mbedtls/dhm.h
vendored
2
third_party/mbedtls/dhm.h
vendored
|
@ -47,8 +47,6 @@ typedef struct mbedtls_dhm_context
|
|||
}
|
||||
mbedtls_dhm_context;
|
||||
|
||||
#else /* MBEDTLS_DHM_ALT */
|
||||
/* #include "third_party/mbedtls/dhm_alt.h" */
|
||||
#endif /* MBEDTLS_DHM_ALT */
|
||||
|
||||
/**
|
||||
|
|
3
third_party/mbedtls/ecp.h
vendored
3
third_party/mbedtls/ecp.h
vendored
|
@ -1,6 +1,5 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_MBEDTLS_ECP_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_MBEDTLS_ECP_H_
|
||||
#include "libc/log/backtrace.internal.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
COSMOPOLITAN_C_START_
|
||||
|
@ -233,8 +232,6 @@ mbedtls_ecp_group;
|
|||
|
||||
/* \} name SECTION: Module settings */
|
||||
|
||||
#else /* MBEDTLS_ECP_ALT */
|
||||
/* #include "third_party/mbedtls/ecp_alt.h" */
|
||||
#endif /* MBEDTLS_ECP_ALT */
|
||||
|
||||
#if defined(MBEDTLS_ECP_RESTARTABLE)
|
||||
|
|
2
third_party/mbedtls/nist_kw.h
vendored
2
third_party/mbedtls/nist_kw.h
vendored
|
@ -29,8 +29,6 @@ typedef struct {
|
|||
mbedtls_cipher_context_t cipher_ctx; /*!< The cipher context used. */
|
||||
} mbedtls_nist_kw_context;
|
||||
|
||||
#else /* MBEDTLS_NIST_key wrapping_ALT */
|
||||
/* #include "third_party/mbedtls/nist_kw_alt.h" */
|
||||
#endif /* MBEDTLS_NIST_KW_ALT */
|
||||
|
||||
/**
|
||||
|
|
6
third_party/mbedtls/platform.h
vendored
6
third_party/mbedtls/platform.h
vendored
|
@ -1,13 +1,11 @@
|
|||
#ifndef COSMOPOLITAN_THIRD_PARTY_MBEDTLS_PLATFORM_H_
|
||||
#define COSMOPOLITAN_THIRD_PARTY_MBEDTLS_PLATFORM_H_
|
||||
#include "libc/assert.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -19,7 +17,7 @@ COSMOPOLITAN_C_START_
|
|||
#define mbedtls_snprintf snprintf
|
||||
#define mbedtls_vsnprintf vsnprintf
|
||||
#define mbedtls_exit exit
|
||||
#define mbedtls_time_t time_t
|
||||
#define mbedtls_time_t int64_t
|
||||
#define mbedtls_time time
|
||||
#define mbedtls_platform_gmtime_r gmtime_r
|
||||
|
||||
|
|
2
third_party/mbedtls/poly1305.h
vendored
2
third_party/mbedtls/poly1305.h
vendored
|
@ -29,8 +29,6 @@ typedef struct mbedtls_poly1305_context
|
|||
}
|
||||
mbedtls_poly1305_context;
|
||||
|
||||
#else /* MBEDTLS_POLY1305_ALT */
|
||||
/* #include "third_party/mbedtls/poly1305_alt.h" */
|
||||
#endif /* MBEDTLS_POLY1305_ALT */
|
||||
|
||||
/**
|
||||
|
|
1
third_party/mbedtls/profile.h
vendored
1
third_party/mbedtls/profile.h
vendored
|
@ -4,7 +4,6 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/nexgen32e/bench.h"
|
||||
#include "libc/nexgen32e/rdtsc.h"
|
||||
#include "libc/time/time.h"
|
||||
#if 1
|
||||
|
||||
#define START() \
|
||||
|
|
1
third_party/mbedtls/ssl_cache.c
vendored
1
third_party/mbedtls/ssl_cache.c
vendored
|
@ -16,6 +16,7 @@
|
|||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/ssl_cache.h"
|
||||
|
|
1
third_party/mbedtls/ssl_cli.c
vendored
1
third_party/mbedtls/ssl_cli.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/debug.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
|
|
1
third_party/mbedtls/ssl_srv.c
vendored
1
third_party/mbedtls/ssl_srv.c
vendored
|
@ -18,6 +18,7 @@
|
|||
#include "libc/log/log.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/debug.h"
|
||||
#include "third_party/mbedtls/ecp.h"
|
||||
|
|
1
third_party/mbedtls/ssl_ticket.c
vendored
1
third_party/mbedtls/ssl_ticket.c
vendored
|
@ -15,6 +15,7 @@
|
|||
│ See the License for the specific language governing permissions and │
|
||||
│ limitations under the License. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
|
|
2
third_party/mbedtls/ssl_tls.c
vendored
2
third_party/mbedtls/ssl_tls.c
vendored
|
@ -6142,7 +6142,7 @@ static int ssl_session_load( mbedtls_ssl_session *session,
|
|||
start = Read64be(p);
|
||||
p += 8;
|
||||
|
||||
session->start = (time_t) start;
|
||||
session->start = (int64_t) start;
|
||||
#endif /* MBEDTLS_HAVE_TIME */
|
||||
|
||||
/*
|
||||
|
|
1
third_party/mbedtls/test/everest_unravaged.c
vendored
1
third_party/mbedtls/test/everest_unravaged.c
vendored
|
@ -1,5 +1,6 @@
|
|||
#include "libc/intrin/bits.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/bignum.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
7
third_party/mbedtls/test/lib.c
vendored
7
third_party/mbedtls/test/lib.c
vendored
|
@ -15,13 +15,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/fmt.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "libc/log/backtrace.internal.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/libfatal.internal.h"
|
||||
|
@ -29,15 +29,16 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/nexgen32e/vendor.internal.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/runtime/internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/runtime/symbols.internal.h"
|
||||
#include "libc/stdio/append.internal.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/exit.h"
|
||||
#include "libc/sysv/consts/nr.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/x/x.h"
|
||||
#include "third_party/mbedtls/config.h"
|
||||
#include "third_party/mbedtls/endian.h"
|
||||
|
|
1
third_party/mbedtls/test/test_suite_ssl.c
vendored
1
third_party/mbedtls/test/test_suite_ssl.c
vendored
|
@ -19,6 +19,7 @@
|
|||
#include "third_party/mbedtls/ssl_invasive.h"
|
||||
#include "libc/testlib/testlib.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/intrin/safemacros.internal.h"
|
||||
#include "third_party/mbedtls/test/test.inc"
|
||||
|
|
1
third_party/mbedtls/x509.c
vendored
1
third_party/mbedtls/x509.c
vendored
|
@ -19,6 +19,7 @@
|
|||
#include "libc/mem/mem.h"
|
||||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "third_party/mbedtls/asn1.h"
|
||||
#include "third_party/mbedtls/certs.h"
|
||||
#include "third_party/mbedtls/common.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue