mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Exclude strace from MODE=tiny builds
This change gets o/tinylinux/examples/hello2.com back down to 8kb in size which had been unintentionally bloated to 40kb in recent months See #965
This commit is contained in:
parent
b7e1dc81c2
commit
2b960bb249
18 changed files with 46 additions and 33 deletions
|
@ -64,7 +64,7 @@ int getsockopt(int fd, int level, int optname, void *out_opt_optval,
|
|||
rc = enotsock();
|
||||
}
|
||||
|
||||
#ifdef SYSDEBUG
|
||||
#if SYSDEBUG
|
||||
if (out_opt_optval && out_optlen && rc != -1) {
|
||||
STRACE("getsockopt(%d, %s, %s, [%#.*hhs], [%d]) → %d% lm", fd,
|
||||
DescribeSockLevel(level), DescribeSockOptname(level, optname),
|
||||
|
|
|
@ -67,14 +67,12 @@ int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
size_t n;
|
||||
} ss;
|
||||
|
||||
#ifdef SYSDEBUG
|
||||
fd_set old_readfds;
|
||||
fd_set *old_readfds_ptr = 0;
|
||||
fd_set old_writefds;
|
||||
fd_set *old_writefds_ptr = 0;
|
||||
fd_set old_exceptfds;
|
||||
fd_set *old_exceptfds_ptr = 0;
|
||||
#endif
|
||||
|
||||
BEGIN_CANCELATION_POINT;
|
||||
if (nfds < 0) {
|
||||
|
@ -87,7 +85,6 @@ int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
(sigmask && !__asan_is_valid(sigmask, sizeof(*sigmask))))) {
|
||||
rc = efault();
|
||||
} else {
|
||||
#ifdef SYSDEBUG
|
||||
if (readfds) {
|
||||
old_readfds = *readfds;
|
||||
old_readfds_ptr = &old_readfds;
|
||||
|
@ -100,7 +97,6 @@ int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
old_exceptfds = *exceptfds;
|
||||
old_exceptfds_ptr = &old_exceptfds;
|
||||
}
|
||||
#endif
|
||||
if (IsLinux()) {
|
||||
if (timeout) {
|
||||
ts = *timeout;
|
||||
|
|
|
@ -48,7 +48,6 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
struct timeval *timeout) {
|
||||
|
||||
int rc;
|
||||
#ifdef SYSDEBUG
|
||||
fd_set old_readfds;
|
||||
fd_set *old_readfds_ptr = 0;
|
||||
fd_set old_writefds;
|
||||
|
@ -57,7 +56,6 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
fd_set *old_exceptfds_ptr = 0;
|
||||
struct timeval old_timeout;
|
||||
struct timeval *old_timeout_ptr = 0;
|
||||
#endif
|
||||
|
||||
POLLTRACE("select(%d, %p, %p, %p, %s) → ...", nfds, readfds, writefds,
|
||||
exceptfds, DescribeTimeval(0, timeout));
|
||||
|
@ -72,7 +70,6 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
(timeout && !__asan_is_valid(timeout, sizeof(*timeout))))) {
|
||||
rc = efault();
|
||||
} else {
|
||||
#ifdef SYSDEBUG
|
||||
if (readfds) {
|
||||
old_readfds = *readfds;
|
||||
old_readfds_ptr = &old_readfds;
|
||||
|
@ -89,7 +86,6 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
|
|||
old_timeout = *timeout;
|
||||
old_timeout_ptr = &old_timeout;
|
||||
}
|
||||
#endif
|
||||
if (!IsWindows()) {
|
||||
#ifdef __aarch64__
|
||||
struct timespec ts, *tsp;
|
||||
|
|
|
@ -86,7 +86,7 @@ int setsockopt(int fd, int level, int optname, const void *optval,
|
|||
rc = enotsock();
|
||||
}
|
||||
|
||||
#ifdef SYSDEBUG
|
||||
#if SYSDEBUG
|
||||
if (!(rc == -1 && errno == EFAULT)) {
|
||||
STRACE("setsockopt(%d, %s, %s, %#.*hhs, %'u) → %d% lm", fd,
|
||||
DescribeSockLevel(level), DescribeSockOptname(level, optname),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue