Skip to content

Commit 674e64b

Browse files
authored
Merge pull request #23869 from JuliaLang/yyc/build/sysimg
Create a temporary file when compiling sysimg
2 parents 28c49b7 + 17d667d commit 674e64b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,12 @@ COMMA:=,
218218
define sysimg_builder
219219
$$(build_private_libdir)/sys$1.o: $$(build_private_libdir)/inference.ji $$(JULIAHOME)/VERSION $$(BASE_SRCS)
220220
@$$(call PRINT_JULIA, cd $$(JULIAHOME)/base && \
221-
$$(call spawn,$3) $2 -C "$$(JULIA_CPU_TARGET)" --output-o $$(call cygpath_w,$$@) $$(JULIA_SYSIMG_BUILD_FLAGS) \
222-
--startup-file=no --warn-overwrite=yes --sysimage $$(call cygpath_w,$$<) sysimg.jl $$(RELBUILDROOT) \
223-
|| { echo '*** This error is usually fixed by running `make clean`. If the error persists$$(COMMA) try `make cleanall`. ***' && false; } )
221+
if $$(call spawn,$3) $2 -C "$$(JULIA_CPU_TARGET)" --output-o $$(call cygpath_w,$$@).tmp $$(JULIA_SYSIMG_BUILD_FLAGS) \
222+
--startup-file=no --warn-overwrite=yes --sysimage $$(call cygpath_w,$$<) sysimg.jl $$(RELBUILDROOT); then \
223+
mv $$(call cygpath_w,$$@).tmp $$(call cygpath_w,$$@); \
224+
else \
225+
echo '*** This error is usually fixed by running `make clean`. If the error persists$$(COMMA) try `make cleanall`. ***' && false; \
226+
fi )
224227
.SECONDARY: $(build_private_libdir)/sys$1.o
225228
endef
226229
ifneq ($(CPUID_SPECIFIC_BINARIES),0)

0 commit comments

Comments
 (0)