From 08f8651336d8e14060323911b1f80b8d2ad9b17f Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 5 Oct 2013 19:02:13 +0000 Subject: [PATCH] Parallelize compiling compiler subdirectories. All the compiler.cbfs are the same except for the machine directory, which is available as a symlink. --- src/Makefile.boot.in | 43 ++++++++++++++++++++++++++++++---- src/Makefile.in | 56 ++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/src/Makefile.boot.in b/src/Makefile.boot.in index c8487beff..2ade3779c 100644 --- a/src/Makefile.boot.in +++ b/src/Makefile.boot.in @@ -144,10 +144,45 @@ boot/syntaxer.com: compile-kludgerous-star-parser # Compiler (LIAR) .PHONY: compile-cross-compiler -compile-cross-compiler: syntax-cross-compiler - (echo '(with-working-directory-pathname "compiler"' && \ - echo ' (lambda () (load "compiler.cbf")))') \ - | $(HOST_COMPILER) +compile-cross-compiler: compile-cross-compiler-back +compile-cross-compiler: compile-cross-compiler-base +compile-cross-compiler: compile-cross-compiler-fggen +compile-cross-compiler: compile-cross-compiler-fgopt +compile-cross-compiler: compile-cross-compiler-machine +compile-cross-compiler: compile-cross-compiler-rtlbase +compile-cross-compiler: compile-cross-compiler-rtlgen + +.PHONY: compile-cross-compiler-back +compile-cross-compiler-back: syntax-cross-compiler + echo '(compile-directory "compiler/back")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-base +compile-cross-compiler-base: syntax-cross-compiler + echo '(compile-directory "compiler/base")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-fggen +compile-cross-compiler-fggen: syntax-cross-compiler + echo '(compile-directory "compiler/fggen")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-fgopt +compile-cross-compiler-fgopt: syntax-cross-compiler + echo '(compile-directory "compiler/fgopt")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-machine +compile-cross-compiler-machine: syntax-cross-compiler + echo '(compile-directory "compiler/machine")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-rtlbase +compile-cross-compiler-rtlbase: syntax-cross-compiler + echo '(compile-directory "compiler/rtlbase")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-rtlgen +compile-cross-compiler-rtlgen: syntax-cross-compiler + echo '(compile-directory "compiler/rtlgen")' | $(HOST_COMPILER) + +.PHONY: compile-cross-compiler-rtlopt +compile-cross-compiler-rtlopt: syntax-cross-compiler + echo '(compile-directory "compiler/rtlopt")' | $(HOST_COMPILER) # Must use HOST_SYNTAXER here because compiler.sf's (and, more # generally, CREF's) host/target distinction is bollocksed up, and will diff --git a/src/Makefile.in b/src/Makefile.in index 2c02988f8..ca0cf551e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -172,12 +172,58 @@ restore: # Compiler (LIAR) +# The subdirectories can be compiled independently and in parallel, but +# syntaxing the compiler is too hairy right now to do without the +# compiler.sf script(s). + .PHONY: compile-compiler -compile-compiler: bootstrap-toolchain -compile-compiler: syntax-compiler - (echo '(with-working-directory-pathname "compiler"' && \ - echo ' (lambda () (load "compiler.cbf")))') \ - | $(BOOTSTRAP_COMPILER) +compile-compiler: compile-compiler-back +compile-compiler: compile-compiler-base +compile-compiler: compile-compiler-fggen +compile-compiler: compile-compiler-fgopt +compile-compiler: compile-compiler-machine +compile-compiler: compile-compiler-rtlbase +compile-compiler: compile-compiler-rtlgen + +.PHONY: compile-compiler-back +compile-compiler-back: bootstrap-toolchain +compile-compiler-back: syntax-compiler + echo '(compile-directory "compiler/back")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-base +compile-compiler-base: bootstrap-toolchain +compile-compiler-base: syntax-compiler + echo '(compile-directory "compiler/base")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-fggen +compile-compiler-fggen: bootstrap-toolchain +compile-compiler-fggen: syntax-compiler + echo '(compile-directory "compiler/fggen")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-fgopt +compile-compiler-fgopt: bootstrap-toolchain +compile-compiler-fgopt: syntax-compiler + echo '(compile-directory "compiler/fgopt")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-machine +compile-compiler-machine: bootstrap-toolchain +compile-compiler-machine: syntax-compiler + echo '(compile-directory "compiler/machine")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-rtlbase +compile-compiler-rtlbase: bootstrap-toolchain +compile-compiler-rtlbase: syntax-compiler + echo '(compile-directory "compiler/rtlbase")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-rtlgen +compile-compiler-rtlgen: bootstrap-toolchain +compile-compiler-rtlgen: syntax-compiler + echo '(compile-directory "compiler/rtlgen")' | $(BOOTSTRAP_COMPILER) + +.PHONY: compile-compiler-rtlopt +compile-compiler-rtlopt: bootstrap-toolchain +compile-compiler-rtlopt: syntax-compiler + echo '(compile-directory "compiler/rtlopt")' | $(BOOTSTRAP_COMPILER) .PHONY: syntax-compiler syntax-compiler: bootstrap-toolchain -- 2.25.1