mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-17 16:10:29 +00:00
Avoid creating temporary output files
This change also removes the futimens() call on the Landlock Make output file workaround, since it caused problems with commands like fixupobj which modify-in-place. It turns out if a file is opened for writing and then no writes actually occur, then the modified time doesn't change.
This commit is contained in:
parent
4c3ab6d11e
commit
2d64b9994b
15 changed files with 502 additions and 446 deletions
2
third_party/chibicc/test/test.mk
vendored
2
third_party/chibicc/test/test.mk
vendored
|
@ -72,7 +72,7 @@ o/$(MODE)/third_party/chibicc/test/%.com.dbg: \
|
|||
o/$(MODE)/third_party/chibicc/test/%.o: \
|
||||
third_party/chibicc/test/%.c \
|
||||
$(CHIBICC)
|
||||
@$(COMPILE) -AOBJECTIFY.c $(CHIBICC) $(CHIBICC_FLAGS) $(OUTPUT_OPTION) -c $<
|
||||
@$(COMPILE) -wAOBJECTIFY.c $(CHIBICC) $(CHIBICC_FLAGS) $(OUTPUT_OPTION) -c $<
|
||||
|
||||
o/$(MODE)/third_party/chibicc/test/int128_test.o: private QUOTA = -M1024m
|
||||
|
||||
|
|
|
@ -122,39 +122,39 @@ THIRD_PARTY_DOUBLECONVERSION_TEST_RUNS = \
|
|||
|
||||
o/$(MODE)/third_party/double-conversion/test-strtod.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-strtod
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-strtod
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-ieee.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-ieee
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-ieee
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-fixed-dtoa.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-fixed-dtoa
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-fixed-dtoa
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-fast-dtoa.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-fast-dtoa
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-fast-dtoa
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-dtoa.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-dtoa
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-dtoa
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-diy-fp.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-diy-fp
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-diy-fp
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-conversions.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-conversions
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-conversions
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-bignum-dtoa.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-bignum-dtoa
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-bignum-dtoa
|
||||
|
||||
o/$(MODE)/third_party/double-conversion/test-bignum.runs: \
|
||||
o/$(MODE)/third_party/double-conversion/double-conversion-tester.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< test-bignum
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< test-bignum
|
||||
|
||||
THIRD_PARTY_DOUBLECONVERSION_LIBS = $(foreach x,$(THIRD_PARTY_DOUBLECONVERSION_ARTIFACTS),$($(x)))
|
||||
THIRD_PARTY_DOUBLECONVERSION_SRCS = $(foreach x,$(THIRD_PARTY_DOUBLECONVERSION_ARTIFACTS),$($(x)_SRCS))
|
||||
|
|
5
third_party/make/job.c
vendored
5
third_party/make/job.c
vendored
|
@ -1866,10 +1866,7 @@ child_execute_job (struct childbase *child, int good_stdin, char **argv)
|
|||
errno = err;
|
||||
fd = open (c->file->name, O_RDWR | O_CREAT, 0777);
|
||||
if (fd != -1)
|
||||
{
|
||||
futimens (fd, (struct timespec[2]){0});
|
||||
close (fd);
|
||||
}
|
||||
close (fd);
|
||||
else if (errno == EEXIST)
|
||||
errno = err;
|
||||
else
|
||||
|
|
2
third_party/mbedtls/test/test.mk
vendored
2
third_party/mbedtls/test/test.mk
vendored
|
@ -137,7 +137,7 @@ o/$(MODE)/third_party/mbedtls/test/%.com: o/$(MODE)/third_party/mbedtls/test/%.c
|
|||
@$(COMPILE) -AOBJCOPY -T$@ $(OBJCOPY) -S -O binary $< $@
|
||||
|
||||
o/$(MODE)/third_party/mbedtls/test/%.com.runs: o/$(MODE)/third_party/mbedtls/test/%.com
|
||||
@$(COMPILE) -ACHECK -tT$@ $< $(TESTARGS)
|
||||
@$(COMPILE) -ACHECK -wtT$@ $< $(TESTARGS)
|
||||
|
||||
$(THIRD_PARTY_MBEDTLS_TEST_OBJS): private \
|
||||
OVERRIDE_CFLAGS += \
|
||||
|
|
748
third_party/python/python.mk
vendored
748
third_party/python/python.mk
vendored
File diff suppressed because it is too large
Load diff
4
third_party/quickjs/quickjs.mk
vendored
4
third_party/quickjs/quickjs.mk
vendored
|
@ -132,12 +132,12 @@ THIRD_PARTY_QUICKJS_CHECKS = \
|
|||
o/$(MODE)/third_party/quickjs/qjscalc.c: \
|
||||
third_party/quickjs/qjscalc.js \
|
||||
o/$(MODE)/third_party/quickjs/qjsc.com
|
||||
@$(COMPILE) -AQJSC o/$(MODE)/third_party/quickjs/qjsc.com -fbignum -o $@ -c $<
|
||||
@$(COMPILE) -wAQJSC o/$(MODE)/third_party/quickjs/qjsc.com -fbignum -o $@ -c $<
|
||||
|
||||
o/$(MODE)/third_party/quickjs/repl.c: \
|
||||
third_party/quickjs/repl.js \
|
||||
o/$(MODE)/third_party/quickjs/qjsc.com
|
||||
@$(COMPILE) -AQJSC o/$(MODE)/third_party/quickjs/qjsc.com -o $@ -m -c $<
|
||||
@$(COMPILE) -wAQJSC o/$(MODE)/third_party/quickjs/qjsc.com -o $@ -m -c $<
|
||||
|
||||
o/$(MODE)/third_party/quickjs/qjs.com.dbg: \
|
||||
$(THIRD_PARTY_QUICKJS) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue