From 981ce2a177aac10f7999cc329c5aefdae853daef Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 6 Aug 2023 19:39:45 -0700 Subject: build: speed up bootstrap compilation of stdlib. The compilation of stdlib from source code (an initial state when no .tlo files exist obtained by "make clean" or "make clean-tlo") is very sensitive to the file order. If the compiler and optimize modules are compiled late, it slows down the build greatly. The compiler mainly executes the code in the files compiler.tl, param.tl, optimize.tl and asm.tl. These should be compiled first, and I empirically determined the best order. * Makefile (STDLIB_EARLY_PATS): Remove error.tlo. The circular dependency involving error.tl doesn't seem to be an issue any more. A while ago I addressed some circular dependencies in stdlib that prevented it from being usable uncompiled; make tests didn't pass with a source-only stdlib. We instead repurpose STDLIB_EARLY_PATS to specify the four modules that should compile first, in their desired order, at least if parallel make is not being used. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c1ce583e..d58b1309 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ EXTRA_OBJS-$(add_win_res) += win/txr.res STDLIB_SRCS := $(wildcard stdlib/*.tl) STDLIB_TLOS := $(patsubst %.tl,%.tlo,$(STDLIB_SRCS)) -STDLIB_EARLY_PATS := %/error.tlo # these must be compiled first +STDLIB_EARLY_PATS := %/optimize.tlo %/param.tlo %/compiler.tlo %/asm.tlo STDLIB_EARLY_TLOS := $(filter $(STDLIB_EARLY_PATS),$(STDLIB_TLOS)) STDLIB_LATE_TLOS := $(filter-out $(STDLIB_EARLY_TLOS),$(STDLIB_TLOS)) -- cgit v1.2.3