Improve build latency of repository

This commit is contained in:
Justine Tunney 2022-08-14 22:19:46 -07:00
parent 7ab15e0b23
commit 0cf9716039
9 changed files with 39 additions and 5 deletions

View file

@ -82,6 +82,7 @@ o/$(MODE): \
o/$(MODE)/third_party
.STRICT = 1
.PLEDGE = stdio rpath wpath cpath fattr proc
.UNVEIL = \
libc/integral \
libc/disclaimer.inc \

Binary file not shown.

View file

@ -85,7 +85,7 @@ GCC = o/third_party/gcc/bin/x86_64-pc-linux-gnu-gcc.exe
STRIP = o/third_party/gcc/bin/x86_64-pc-linux-gnu-strip.exe
OBJCOPY = o/third_party/gcc/bin/x86_64-pc-linux-gnu-objcopy.exe
OBJDUMP = o/third_party/gcc/bin/x86_64-pc-linux-gnu-objdump.exe
ADDR2LINE = $(shell build/bootstrap/pwd.com)/o/third_party/gcc/bin/x86_64-pc-linux-gnu-addr2line.exe
ADDR2LINE = $(PWD)/o/third_party/gcc/bin/x86_64-pc-linux-gnu-addr2line.exe
else
IGNORE := $(shell build/bootstrap/unbundle.com)
AS = o/third_party/gcc/bin/x86_64-linux-musl-as
@ -98,7 +98,7 @@ GCC = o/third_party/gcc/bin/x86_64-linux-musl-gcc
STRIP = o/third_party/gcc/bin/x86_64-linux-musl-strip
OBJCOPY = o/third_party/gcc/bin/x86_64-linux-musl-objcopy
OBJDUMP = o/third_party/gcc/bin/x86_64-linux-musl-objdump
ADDR2LINE = $(shell build/bootstrap/pwd.com)/o/third_party/gcc/bin/x86_64-linux-musl-addr2line
ADDR2LINE = $(PWD)/o/third_party/gcc/bin/x86_64-linux-musl-addr2line
endif
export ADDR2LINE

View file

@ -23,6 +23,7 @@
# - tool/build/runitd.c
.PRECIOUS: o/$(MODE)/%.com.ok
o/$(MODE)/%.com.ok: .PLEDGE = stdio rpath wpath cpath proc inet
o/$(MODE)/%.com.ok: \
o/$(MODE)/tool/build/runit.com \
o/$(MODE)/tool/build/runitd.com \

View file

@ -17,19 +17,19 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "dsp/core/core.h"
#include "libc/intrin/safemacros.internal.h"
#include "libc/calls/calls.h"
#include "libc/calls/struct/rlimit.h"
#include "libc/calls/struct/sigaction.h"
#include "libc/dce.h"
#include "libc/errno.h"
#include "libc/fmt/fmt.h"
#include "libc/intrin/safemacros.internal.h"
#include "libc/log/check.h"
#include "libc/math.h"
#include "libc/mem/mem.h"
#include "libc/stdio/rand.h"
#include "libc/runtime/directmap.internal.h"
#include "libc/runtime/runtime.h"
#include "libc/stdio/rand.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/map.h"
#include "libc/sysv/consts/o.h"
@ -99,7 +99,7 @@ TEST(setrlimit, testFileSizeLimit) {
snprintf(tmpname, sizeof(tmpname), "%s/%s.%d",
firstnonnull(getenv("TMPDIR"), "/tmp"),
firstnonnull(program_invocation_short_name, "unknown"), getpid());
ASSERT_NE(-1, (fd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC)));
ASSERT_NE(-1, (fd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644)));
rngset(junkdata, 512, rand64, -1);
for (i = 0; i < 5 * 1024 * 1024 / 512; ++i) {
ASSERT_EQ(512, write(fd, junkdata, 512));

View file

@ -92,6 +92,10 @@ o/$(MODE)/test/libc/calls/life-classic.com.zip.o: private \
ZIPOBJ_FLAGS += \
-B
# TODO(jart): Have pledge() support SIOCGIFCONF
o/$(MODE)/test/libc/calls/ioctl_siocgifconf_test.com.runs: \
private .PLEDGE =
.PHONY: o/$(MODE)/test/libc/calls
o/$(MODE)/test/libc/calls: \
$(TEST_LIBC_CALLS_BINS) \

View file

@ -55,6 +55,19 @@ o/$(MODE)/test/libc/sock/%.com.dbg: \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/test/libc/sock/unix_test.com.runs: \
private .PLEDGE = stdio rpath wpath cpath proc unix
o/$(MODE)/test/libc/sock/setsockopt_test.com.runs \
o/$(MODE)/test/libc/sock/sendfile_test.com.runs \
o/$(MODE)/test/libc/sock/poll_test.com.runs \
o/$(MODE)/test/libc/sock/pollfd_test.com.runs: \
private .PLEDGE = stdio rpath wpath cpath proc inet
o/$(MODE)/test/libc/sock/sendrecvmsg_test.com.runs \
o/$(MODE)/test/libc/sock/nointernet_test.com.runs: \
private .PLEDGE = stdio rpath wpath cpath proc inet recvfd sendfd
$(TEST_LIBC_SOCK_OBJS): test/libc/sock/test.mk
.PHONY: o/$(MODE)/test/libc/sock

View file

@ -70,6 +70,12 @@ o/$(MODE)/test/tool/net/%.com.dbg: \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/test/tool/net/redbean_test.com.runs: \
private .PLEDGE = stdio rpath wpath cpath proc inet
o/$(MODE)/test/tool/net/sqlite_test.com.runs: \
private .PLEDGE = stdio rpath wpath cpath proc flock
.PHONY: o/$(MODE)/test/tool/net
o/$(MODE)/test/tool/net: \
$(TEST_TOOL_NET_BINS) \

View file

@ -2096,6 +2096,15 @@ o/$(MODE)/third_party/python/Lib/test/test_wsgiref.py.runs: private \
/usr/local/etc/httpd/conf/mime.types \
/usr/local/etc/mime.types
o/$(MODE)/third_party/python/Lib/test/test_epoll.py.runs: \
private .PLEDGE = stdio rpath wpath cpath proc inet
o/$(MODE)/third_party/python/Lib/test/test_fcntl.py.runs: \
private .PLEDGE = stdio rpath wpath cpath proc flock
o/$(MODE)/third_party/python/Lib/test/test_signal.py.runs: \
private .PLEDGE = stdio rpath wpath cpath proc flock inet
o/$(MODE)/third_party/python/Lib/test/test_timeout.py.runs: \
private .PLEDGE = stdio rpath wpath cpath proc inet
o/$(MODE)/third_party/python/Lib/test/test_grammar.py.runs: \
o/$(MODE)/third_party/python/pythontester.com
@$(COMPILE) -ACHECK -wtT$@ $(PYHARNESSARGS) $< -m test.test_grammar $(PYTESTARGS)