Cease using ASDF to build contribs

Our contrib build graph was already expressed in contrib/Makefile,
so ASDF wasn't doing anything to determine an execution schedule.
The new make-contrib.lisp script can parse '.asd' files more-or-less as-is,
removing ASDF from the critical path. With blocklist=sb-simd, this change
decreased the time in parallelized make-target-contrib to under 5 seconds
for me (down from >10) when run on as many cores as there are contrib dirs.
All defsystems are treated as if containing ":serial t", and there are
two invented keywords to bind/assign special variables around compilation.

We still install '.asd' files in $SBCL_HOME/contrib, and build uiop and asdf
so there should be no observable difference to users.
This commit is contained in:
Douglas Katzman 2022-09-30 10:04:31 -04:00
parent 21ba8dfbc0
commit e47ab64eb9
28 changed files with 234 additions and 277 deletions

View file

@ -1,9 +1,9 @@
vpath %.fasl ../obj/sbcl-home/contrib/
contribs = asdf sb-posix sb-bsd-sockets sb-introspect sb-cltl2 sb-aclrepl \
contribs = sb-posix sb-bsd-sockets sb-introspect sb-cltl2 sb-aclrepl \
sb-sprof sb-capstone sb-md5 sb-capstone sb-executable sb-gmp sb-mpfr \
sb-queue sb-rotate-byte sb-rt sb-simple-streams sb-concurrency sb-cover \
sb-graph sb-simd
sb-graph sb-simd sb-grovel asdf
active_contribs = $(filter-out $(SBCL_CONTRIB_BLOCKLIST),$(contribs))
@ -11,45 +11,21 @@ fasls = $(active_contribs:=.fasl)
all: $(fasls)
asdf.fasl:
sh ./build-contrib $(basename $(@F))
sb-grovel.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-rt.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-posix.fasl: asdf.fasl sb-grovel.fasl
sh ./build-contrib $(basename $(@F))
sb-bsd-sockets.fasl: asdf.fasl sb-grovel.fasl
sh ./build-contrib $(basename $(@F))
sb-cltl2.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-aclrepl.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-concurrency.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-sprof.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-introspect.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-capstone.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-md5.fasl: asdf.fasl sb-rotate-byte.fasl
sh ./build-contrib $(basename $(@F))
sb-cover.fasl: asdf.fasl sb-md5.fasl
sh ./build-contrib $(basename $(@F))
sb-executable.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-gmp.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-mpfr.fasl: asdf.fasl sb-gmp.fasl
sh ./build-contrib $(basename $(@F))
sb-queue.fasl: asdf.fasl sb-concurrency.fasl
sh ./build-contrib $(basename $(@F))
sb-rotate-byte.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-simple-streams.fasl: asdf.fasl sb-posix.fasl sb-bsd-sockets.fasl
sh ./build-contrib $(basename $(@F))
sb-graph.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
sb-simd.fasl: asdf.fasl
sh ./build-contrib $(basename $(@F))
# Inter-module dependencies are declared here but not in the per-directory Makefile.
# This way we don't have to state them twice.
sb-md5.fasl: sb-rotate-byte.fasl
sb-cover.fasl: sb-md5.fasl
sb-mpfr.fasl: sb-gmp.fasl
sb-queue.fasl: sb-concurrency.fasl
sb-simple-streams.fasl: sb-posix.fasl sb-bsd-sockets.fasl
sb-grovel.fasl: asdf.fasl # for building the module, not for our build
# Notes:
# 1. Not sure if we still need mkdir asdf-cache. Nothing goes there.
# 2. Invoking $(MAKE) for nested make eliminates a warning about jobserver mode.
# 3. This could be made to 'tee' into output/building-contrib as it used to,
# but it would be more Lispy if not elegant to have 'make-contrib.lisp' bind
# *ERROR-OUTPUT* to a broadcast stream of SYS:*STDERR* and a file stream.
%.fasl:
mkdir -p ../obj/asdf-cache/$(basename $(@F))
$(MAKE) MODULE_REQUIRES="$^" -C $(basename $(@F)) </dev/null 2>&1

View file

@ -27,19 +27,10 @@ endif
export CC SBCL EXTRA_CFLAGS
all: $(FASL) $(ASD)
all: $(FASL)
$(FASL)::
$(SBCL) --eval '(setf (sb-ext:readtable-base-char-preference *readtable*) :both)' \
--eval '(declaim (muffle-conditions (and compiler-note (not sb-c::unknown-typep-note))))' \
--load ../asdf-stub.lisp \
--eval '(asdf::build-asdf-contrib "$(SYSTEM)")'
$(ASD)::
echo "(defsystem :$(SYSTEM) :class require-system)" > $@
build: $(FASL) $(ASD)
true
$(FASL):: # this produces $(ASD) as a side-effect
$(SBCL) --load ../make-contrib.lisp "$(SYSTEM)" $(MODULE_REQUIRES)
install:
cp $(FASL) $(ASD) "$(BUILD_ROOT)$(INSTALL_DIR)"

View file

@ -1,71 +0,0 @@
(setq *compile-print* nil)
sb-ext::(declaim (muffle-conditions compiler-note))
(require :asdf)
(in-package :asdf)
(defun keywordize (x)
(intern (string-upcase x) :keyword))
sb-ext::(declaim (muffle-conditions sb-kernel:redefinition-warning))
(defun wrapping-source-registry ()
'(:source-registry (:tree #p"SYS:CONTRIB;") :ignore-inherited-configuration))
sb-ext::(declaim (unmuffle-conditions sb-kernel:redefinition-warning))
(defun setup-asdf-contrib ()
;;(setf *resolve-symlinks* nil)
(let* ((sbcl-top (merge-pathnames (getenv-pathname "SBCL_TOP" :ensure-directory t)))
(src-contrib (subpathname sbcl-top "contrib/"))
(asdf-cache (subpathname sbcl-top "obj/asdf-cache/"))
(source-registry '(:source-registry :ignore-inherited-configuration))
(output-translations `(:output-translations (,(namestring src-contrib)
,(namestring asdf-cache))
:ignore-inherited-configuration))
(src.pat (wilden src-contrib))
(src.dir.pat (merge-pathnames* *wild-inferiors* src-contrib))
(out.pat (wilden asdf-cache)))
(ensure-directories-exist asdf-cache)
(setf (logical-pathname-translations "SYS")
`(("CONTRIB;**;*.*.*" ,src.pat))) ;; this makes recursive tree search work.
(initialize-source-registry source-registry)
(initialize-output-translations output-translations)
(setf (logical-pathname-translations "SYS")
(labels ((typepat (type base)
`(,(format nil "CONTRIB;**;*.~:@(~A~).*" type)
,(make-pathname :type (string-downcase type) :defaults base)))
(outpat (type) (typepat type out.pat))
(srcpat (type) (typepat type src.pat))
(outpats (&rest types) (mapcar #'outpat types))
(srcpats (&rest types) (mapcar #'srcpat types)))
`(,@(srcpats :lisp :asd)
,@(outpats :fasl :sbcl-warnings :build-report
:out :exe :lisp-temp :o :c :test-report :html)
("CONTRIB;**;" ,src.dir.pat)
#|("CONTRIB;**;*.*.*" ,src.pat)|#)))
(setf *central-registry* nil)))
(defun build-asdf-contrib (system)
(setq *features*
(append '(:sb-building-contrib) sb-impl:+internal-features+ *features*))
(setup-asdf-contrib)
(let* ((name (string-downcase system))
(sbcl-top (merge-pathnames (getenv-pathname "SBCL_TOP" :ensure-directory t)))
(out-contrib (subpathname sbcl-top "obj/sbcl-home/contrib/"))
(cache-module (subpathname sbcl-top (format nil "obj/asdf-cache/~a/" name)))
(system (find-system name))
(system.fasl (output-file 'compile-bundle-op system))
(module.fasl (subpathname out-contrib (strcat name ".fasl")))
(module-setup.lisp (subpathname cache-module "module-setup.lisp"))
(module-setup.fasl (subpathname cache-module "module-setup.fasl"))
(dependencies (mapcar 'keywordize (component-sideway-dependencies system)))
(input-fasls (list module-setup.fasl system.fasl)))
(ensure-directories-exist out-contrib)
(ensure-directories-exist cache-module)
(with-open-file (o module-setup.lisp
:direction :output :if-exists :rename-and-delete)
(format o "(provide :~A)~%~{(require ~(~S~))~%~}" name dependencies))
(compile-file module-setup.lisp :output-file module-setup.fasl)
(operate 'compile-bundle-op system)
(let ((s (find-symbol "DUMP/RESTORE-INTERESTING-TYPES" "SB-C")))
(when s (funcall s 'write)))
(concatenate-files input-fasls module.fasl)))

View file

@ -4,7 +4,7 @@ UIOP_FASL=$(DEST)/uiop.fasl
FASL=$(UIOP_FASL) $(ASDF_FASL)
FROB_READTABLE='(setf (sb-ext:readtable-base-char-preference *readtable*) :both)'
fasl:: $(UIOP_FASL) $(ASDF_FASL)
all:: $(UIOP_FASL) $(ASDF_FASL)
$(UIOP_FASL):: uiop.lisp ../../output/sbcl.core
mkdir -p $(DEST)
$(SBCL) --eval $(FROB_READTABLE) --eval '(compile-file #p"SYS:CONTRIB;ASDF;UIOP.LISP" :print nil :output-file (merge-pathnames (parse-native-namestring "$@")))' </dev/null
@ -17,9 +17,6 @@ $(ASDF_FASL):: asdf.lisp ../../output/sbcl.core $(UIOP_FASL)
install::
cp $(FASL) "$(BUILD_ROOT)$(INSTALL_DIR)"
build:: $(FASL)
true
UPSTREAM=../../obj/asdf-upstream
up::
sh pull-asdf.sh

View file

@ -1,9 +0,0 @@
#!/bin/sh
mkdir -p ../obj/asdf-cache/$@/
if $GNUMAKE -j1 -C $@ build < /dev/null 2>&1 ; then
:
else
exit $?
fi | tee ../output/building-contrib.$@

134
contrib/make-contrib.lisp Normal file
View file

@ -0,0 +1,134 @@
(setf (sb-ext:readtable-base-char-preference *readtable*) :both)
(defvar *system* (second sb-ext:*posix-argv*))
;; Convert dep filenames into module names. Depending on whether each Make step
;; saw the fasls as already-existing, or is making them, the dep is either the
;; unadorned fasl name, or containing the 'vpath' in it already.
(defvar *deps*
(mapcar 'string-upcase (mapcar 'pathname-name (cddr sb-ext:*posix-argv*))))
(format t "; Note: Building ~S~@[, deps=~S~]~%" *system* *deps*)
(mapc 'require *deps*)
(declaim (muffle-conditions (and compiler-note (not sb-c::unknown-typep-note))))
(defun run-defs-to-lisp (inputs output)
(flet ((invoke (string &rest args)
(apply (find-symbol string "SB-GROVEL") args)))
(let ((c-file (merge-pathnames "runme.c" output))
(all-headers)
(all-definitions)
(package))
(dolist (input inputs)
(if package
(assert (eq (cdr input) package))
(setf package (cdr input)))
;; Combine input specifications so that we run the C compiler once only
(multiple-value-bind (headers definitions)
(with-open-file (stream (merge-pathnames (make-pathname :type "lisp")
(car input))
:direction :input)
(values (read stream) (read stream)))
(setf all-headers (nconc all-headers headers)) ; can be order-sensitive!
(setf all-definitions (nconc all-definitions definitions))))
(with-open-file (stream c-file :direction :output :if-exists :supersede)
(invoke "PRINT-C-SOURCE" stream all-headers all-definitions package))
(let* ((c-compiler-output (merge-pathnames #+unix "a.out" #+win32 "a.exe" output))
(result (invoke "RUN-C-COMPILER" c-file c-compiler-output)))
(unless (= result 0) (error "C compilation failed"))
(let ((result
(process-exit-code
(run-program (namestring c-compiler-output) (list (namestring output))
:search nil :input nil :output *trace-output*))))
(unless (= result 0) (error "C execution failed")))))))
(defparameter +genfile+ "generated-constants")
(defun perform (defsystem)
(let* ((specified-sources (getf defsystem :components))
(objdir (format nil "../../obj/from-xc/contrib/~A/" *system*))
(*features* (append '(:sb-building-contrib) *features*
sb-impl:+internal-features+)))
(ensure-directories-exist objdir)
(sb-int:collect ((alien-constants) (flattened-sources) (fasls))
(with-open-file (f (merge-pathnames "module-setup.lisp" objdir)
:direction :output :if-exists :supersede)
(format f "~{(require \"~A\")~%~}" *deps*))
(flattened-sources `(t "module-setup"))
;; Compile all files serially. :depends-on is just documentation for the user
(sb-int:named-let flatten ((prefix "") (sources specified-sources))
(dolist (source sources)
(ecase (car source)
(:module
(let* ((subdir (cadr source))
(pathname (getf source :pathname subdir))
(newprefix (if (string= pathname "")
prefix
(concatenate 'string prefix subdir "/"))))
(unless (string= pathname "")
(ensure-directories-exist (format nil "~A~A" objdir newprefix)))
(flatten newprefix (getf source :components))))
(:file
(let ((if-feature (getf source :if-feature)))
(when (or (not if-feature) (sb-int:featurep if-feature))
(flattened-sources
`(nil ,(concatenate 'string prefix (cadr source)))))))
(:sb-grovel-constants-file
;; We don't run sb-grovel as a contrib module for building other modules.
;; sb-grovel interacts with ASDF when REQUIREd, but this script doesn't.
(destructuring-bind (specfile &key package if-feature &allow-other-keys)
(cdr source)
(assert package)
(when (or (not if-feature) (sb-int:featurep if-feature))
(unless (alien-constants) ; add in a source file
(flattened-sources `(t ,+genfile+)))
(alien-constants (cons specfile package))))))))
(with-open-file (f (merge-pathnames "module-provide.lisp" objdir)
:direction :output :if-exists :supersede)
(format f "(provide \"~A\")~%" (string-upcase *system*)))
(flattened-sources `(t "module-provide"))
(when (alien-constants)
(load "../sb-grovel/defpackage") ; faster to interpret than compile
(let ((*evaluator-mode* :compile)) (load "../sb-grovel/def-to-lisp"))
(run-defs-to-lisp (alien-constants) ; specification files
(format nil "~A~A.lisp" objdir +genfile+)) ; file to generate
;; foreign-glue contains macros needed to compile the generated file
(let ((*evaluator-mode* :compile)) (load "../sb-grovel/foreign-glue")))
(with-compilation-unit ()
(loop for (generated-p stem) in (flattened-sources)
do
(format t "Compile-File ~S~%" stem)
(multiple-value-bind (output warnings errors)
(compile-file (if generated-p
(format nil "~A~A.lisp" objdir stem)
(format nil "~A.lisp" stem))
:output-file (format nil "~A~A.fasl" objdir stem))
(declare (ignore warnings))
(when errors (sb-sys:os-exit 1))
(fasls output)
(load output))))
(let ((outputs (mapcar 'namestring (fasls)))
(joined (format nil "../../obj/sbcl-home/contrib/~A.fasl" *system*)))
(ensure-directories-exist joined)
(with-open-file (asd (merge-pathnames (make-pathname :type "asd") joined)
:direction :output :if-exists :supersede
:if-does-not-exist :create)
(format asd "(defsystem :~A :class require-system)~%" *system*))
(sb-sys:os-exit
(process-status
(run-program #+unix "/bin/cat" #-unix "cat" outputs
;; probably is /usr/bin/cat.exe but let's not assume that
#-unix :search #-unix t
:output joined :if-output-exists :supersede)))))))
(compile 'perform)
(let ((form (with-open-file (f (format nil "~A.asd" *system*))
(let ((form (read f)))
;; each .asd file has an ERROR form preventing users from LOADing it
(assert (eq (car form) 'error))
(read f)))))
(let ((eval (getf form :eval)))
(when eval (eval eval)))
(let ((bindings (getf form :bind))
(*compile-verbose* nil)) ; set the default
(progv (mapcar 'first bindings) (mapcar 'second bindings)
(perform form))))

View file

@ -1,15 +1,11 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-aclrepl"
:author "Kevin Rosenberg <kevin@rosenberg.net>"
:description "An AllegroCL compatible REPL"
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-ACLREPL;"
:components ((:file "toplevel")
(:file "repl" :depends-on ("toplevel"))
(:file "inspect" :depends-on ("repl"))
(:file "debug" :depends-on ("repl")))
:perform (load-op :after (o c) (provide 'sb-aclrepl)))
(:file "debug" :depends-on ("repl"))))

View file

@ -1,19 +1,16 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
;;; gethostbyname/gethostbyaddr are generally not thread safe. POSIX
;;; 1003.1-2003 defines an alternative API, which is specified in the
;;; RFC to be thread-safe. If it seems to be available, use it.
(when (sb-alien::find-dynamic-foreign-symbol-address "getaddrinfo")
(pushnew :sb-bsd-sockets-addrinfo *features*))
(defsystem "sb-bsd-sockets"
:version "0.59"
:defsystem-depends-on ("sb-grovel")
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-BSD-SOCKETS;"
;; We don't process random toplevel forms
:eval (when (sb-alien::find-dynamic-foreign-symbol-address "getaddrinfo")
(pushnew :sb-bsd-sockets-addrinfo *features*))
:serial t
:components
((:file "defpackage")
@ -44,5 +41,4 @@
(:file "local" :if-feature (:not :win32))
(:file "name-service")
(:file "misc"))
:perform (load-op :after (o c) (provide 'sb-bsd-sockets)))
(:file "misc")))

View file

@ -1,4 +1,3 @@
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-capstone"
@ -6,5 +5,4 @@
:version "0.1"
:description "Multi-target disassembly for SBCL using Capstone library"
:serial t
:components ((:file "capstone"))
:perform (load-op :after (o c) (provide 'sb-capstone)))
:components ((:file "capstone")))

View file

@ -1,12 +1,8 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-cltl2"
:description "Functionality mentioned in CLtL2 but not present in ANSI."
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-CLTL2;"
:components ((:file "defpackage")
(:file "compiler-let" :depends-on ("defpackage"))
(:file "env" :depends-on ("defpackage")))
:perform (load-op :after (o c) (provide 'sb-cltl2)))
(:file "env" :depends-on ("defpackage"))))

View file

@ -9,7 +9,6 @@
;;;; provided with absolutely no warranty. See the COPYING and CREDITS
;;;; files for more information.
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-concurrency"
@ -17,5 +16,4 @@
(:file "frlock" :depends-on ("package"))
(:file "queue" :depends-on ("package"))
(:file "mailbox" :depends-on ("package" "queue"))
(:file "gate" :depends-on ("package")))
:perform (load-op :after (o c) (provide 'sb-concurrency)))
(:file "gate" :depends-on ("package"))))

View file

@ -1,11 +1,7 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-cover"
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-COVER;"
:depends-on ("sb-md5")
:components ((:file "cover"))
:perform (load-op :after (o c) (provide 'sb-cover)))
:components ((:file "cover")))

View file

@ -1,9 +1,5 @@
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-executable"
:description "Concatenate FASLs into an executable file."
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-EXECUTABLE;"
:components ((:file "sb-executable"))
:perform (load-op :after (o c) (provide 'sb-executable)))
:components ((:file "sb-executable")))

View file

@ -1,4 +1,3 @@
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-gmp"
@ -6,6 +5,4 @@
:version "0.1"
:description "bignum calculations for SBCL using the GMP library"
:serial t
:components ((:file "gmp"))
:perform (load-op :after (o c) (provide 'sb-gmp)))
:components ((:file "gmp")))

View file

@ -1,5 +1,4 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-graph"
@ -10,5 +9,4 @@
:components
((:file "package")
(:file "graphing")
(:file "hooking"))))
:perform (load-op :after (o c) (provide 'sb-graph)))
(:file "hooking")))))

View file

@ -1,14 +1,10 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-grovel"
:version "0.2"
:depends-on ("asdf")
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-GROVEL;"
:components ((:file "defpackage")
(:file "def-to-lisp" :depends-on ("defpackage"))
(:file "foreign-glue" :depends-on ("defpackage")))
:perform (load-op :after (o c) (provide 'sb-grovel)))
(:file "foreign-glue" :depends-on ("defpackage"))))

View file

@ -9,11 +9,7 @@
;;;; provided with absolutely no warranty. See the COPYING and CREDITS
;;;; files for more information.
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-introspect"
:components ((:file "introspect"))
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-INTROSPECT;"
:perform (load-op :after (o c) (provide 'sb-introspect)))
:components ((:file "introspect")))

View file

@ -7,7 +7,6 @@
;;;; facility.
;;;;
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-md5"
@ -21,7 +20,4 @@
(and :lispworks (not :lispworks4))
:ccl :allegro)
"flexi-streams")
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-MD5;"
:components ((:file "md5"))
:perform (load-op :after (o c) (provide 'sb-md5)))
:components ((:file "md5")))

View file

@ -1,4 +1,3 @@
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-mpfr"
@ -7,6 +6,4 @@
:description "bignum float calculations for SBCL using the MPFR library"
:serial t
:depends-on ("sb-gmp")
:components ((:file "mpfr"))
:perform (load-op :after (o c) (provide 'sb-mpfr)))
:components ((:file "mpfr")))

View file

@ -1,17 +1,13 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-posix"
:defsystem-depends-on ("sb-grovel")
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-POSIX;"
:components ((:file "defpackage")
(:file "strtod" :depends-on ("defpackage"))
(:file "designator" :depends-on ("defpackage"))
(:file "macros" :depends-on ("designator"))
(:sb-grovel-constants-file "constants"
:package :sb-posix :depends-on ("defpackage"))
(:file "interface" :depends-on ("constants" "macros" "designator")))
:perform (load-op :after (o c) (provide 'sb-posix)))
(:file "interface" :depends-on ("constants" "macros" "designator"))))

View file

@ -9,10 +9,8 @@
;;;; provided with absolutely no warranty. See the COPYING and CREDITS
;;;; files for more information.
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-queue"
:depends-on ("sb-concurrency")
:components ((:file "package"))
:perform (load-op :after (o c) (provide 'sb-queue)))
:components ((:file "package")))

View file

@ -1,12 +1,9 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-rotate-byte"
:version "0.1"
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-ROTATE-BYTE;"
:components
((:file "package")
(:file "compiler" :depends-on ("package"))
@ -21,5 +18,4 @@
(:file "riscv-vm" :if-feature :riscv)
(:file "ppc-vm" :if-feature :ppc)
(:file "ppc64-vm" :if-feature :ppc64)))
(:file "rotate-byte" :depends-on ("vm")))
:perform (load-op :after (o c) (provide 'sb-rotate-byte)))
(:file "rotate-byte" :depends-on ("vm"))))

View file

@ -1,11 +1,7 @@
;;; -*- Lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-rt"
:version "0.1.7" ; our version "0", GCL CVS version "1.7"
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-RT;"
:components ((:file "rt"))
:perform (load-op :after (o c) (provide 'sb-rt)))
:components ((:file "rt")))

View file

@ -1,48 +0,0 @@
(defsystem #:sb-simd
:description "A convenient SIMD interface for SBCL."
:author "Marco Heisig <marco.heisig@fau.de>"
:license "MIT"
:serial t
:components
((:file "packages")
(:file "constants")
(:file "utilities")
(:file "printable")
(:file "cpu-identification")
(:file "instruction-set")
(:file "instruction-set-case")
(:file "record")
(:file "missing-instruction")
(:module "instruction-sets"
:components
((:file "sb-simd")
(:file "x86-64")
(:file "sse")
(:file "sse2")
(:file "sse3")
(:file "ssse3")
(:file "sse4-1")
(:file "sse4-2")
(:file "avx")
(:file "avx2")
(:file "fma")))
(:file "define-types")
(:file "define-instruction-vops")
(:file "define-vref-vops")
(:file "define-custom-vops")
(:file "define-vop-functions")
(:file "define-scalar-casts")
(:file "define-fake-vops")
(:file "define-simd-casts")
(:file "define-instructions")
(:file "define-vrefs")
(:file "define-reffers")
(:file "define-arefs")
(:file "define-ifs")
(:file "define-associatives")
(:file "define-reducers")
(:file "define-comparisons")
(:file "define-unequals")
(:file "define-rounders")
(:file "define-modify-macros")))

View file

@ -0,0 +1,52 @@
(error "Can't build contribs with ASDF")
(defsystem #:sb-simd
:description "A convenient SIMD interface for SBCL."
:author "Marco Heisig <marco.heisig@fau.de>"
:license "MIT"
:bind ((*compile-verbose* t)) ; very slow, I want to see progress
:serial t
:components
((:module "code"
:components
((:file "packages")
(:file "constants")
(:file "utilities")
(:file "printable")
(:file "cpu-identification")
(:file "instruction-set")
(:file "instruction-set-case")
(:file "record")
(:file "missing-instruction")
(:module "instruction-sets"
:components
((:file "sb-simd")
(:file "x86-64")
(:file "sse")
(:file "sse2")
(:file "sse3")
(:file "ssse3")
(:file "sse4-1")
(:file "sse4-2")
(:file "avx")
(:file "avx2")
(:file "fma")))
(:file "define-types")
(:file "define-instruction-vops")
(:file "define-vref-vops")
(:file "define-custom-vops")
(:file "define-vop-functions")
(:file "define-scalar-casts")
(:file "define-fake-vops")
(:file "define-simd-casts")
(:file "define-instructions")
(:file "define-vrefs")
(:file "define-reffers")
(:file "define-arefs")
(:file "define-ifs")
(:file "define-associatives")
(:file "define-reducers")
(:file "define-comparisons")
(:file "define-unequals")
(:file "define-rounders")
(:file "define-modify-macros")))))

View file

@ -1,12 +1,9 @@
;;; -*- lisp -*-
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-simple-streams"
:depends-on ("sb-bsd-sockets" "sb-posix")
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-SIMPLE-STREAMS;"
:components ((:file "package")
(:file "fndb")
(:file "iodefs" :depends-on ("package"))
@ -23,5 +20,4 @@
(:file "socket" :depends-on ("strategy"))
(:file "terminal" :depends-on ("strategy"))
;;(:file "gray-compat" :depends-on ("package"))
)
:perform (load-op :after (o c) (provide 'sb-simple-streams)))
))

View file

@ -1,10 +1,7 @@
#-(or sb-testing-contrib sb-building-contrib)
(error "Can't build contribs with ASDF")
(defsystem "sb-sprof"
:description "A statistical profiler."
#+sb-building-contrib :pathname
#+sb-building-contrib #p"SYS:CONTRIB;SB-SPROF;"
:serial t
:components ((:file "package")
(:file "record")
@ -12,5 +9,4 @@
(:file "graph")
(:file "report")
(:file "interface")
(:file "disassemble"))
:perform (load-op :after (o c) (provide 'sb-sprof)))
(:file "disassemble")))

View file

@ -56,6 +56,7 @@ export SBCL SBCL_BUILDING_CONTRIB
# as SB-RT and SB-GROVEL, but FIXME: there's probably a better
# solution. -- CSR, 2003-05-30
if [ -z "$DONT_CLEAN_SBCL_CONTRIB" ] ; then
rm -rf obj/from-xc/contrib/
rm -fr obj/sbcl-home/contrib/
rm -fr obj/asdf-cache/
fi
@ -65,7 +66,7 @@ find output -name 'building-contrib.*' -print | xargs rm -f
set -e # exit with failure if any $GNUMAKE fails
# Ignore all source registries.
if [ -z "$*" ]; then
$GNUMAKE $SBCL_MAKE_JOBS -C contrib
$GNUMAKE $SBCL_MAKE_JOBS -k -C contrib
else
for x in "$@"; do
$GNUMAKE -C contrib $x.fasl