summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-08-06 19:39:45 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-08-06 19:39:45 -0700
commitc5213376f78fa8a7801ad6603077e6afd0b3a826 (patch)
tree6ccb22953cf031db43dda29333f9f8bd80c5fb23
parent50c46d1086bb7ae847a1e212dc888360b79e8d88 (diff)
downloadtxr-c5213376f78fa8a7801ad6603077e6afd0b3a826.tar.gz
txr-c5213376f78fa8a7801ad6603077e6afd0b3a826.tar.bz2
txr-c5213376f78fa8a7801ad6603077e6afd0b3a826.zip
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.
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
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))