From e47ab64eb9a7d40d4e5caf524d379cb3c2e4a0d5 Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Fri, 30 Sep 2022 10:04:31 -0400 Subject: [PATCH] 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. --- contrib/Makefile | 64 +++------ contrib/asdf-module.mk | 15 +- contrib/asdf-stub.lisp | 71 ---------- contrib/asdf/Makefile | 5 +- contrib/build-contrib | 9 -- contrib/make-contrib.lisp | 134 ++++++++++++++++++ contrib/sb-aclrepl/sb-aclrepl.asd | 6 +- contrib/sb-bsd-sockets/sb-bsd-sockets.asd | 12 +- contrib/sb-capstone/sb-capstone.asd | 4 +- contrib/sb-cltl2/sb-cltl2.asd | 6 +- contrib/sb-concurrency/sb-concurrency.asd | 4 +- contrib/sb-cover/sb-cover.asd | 6 +- contrib/sb-executable/sb-executable.asd | 6 +- contrib/sb-gmp/sb-gmp.asd | 5 +- contrib/sb-graph/sb-graph.asd | 4 +- contrib/sb-grovel/sb-grovel.asd | 6 +- contrib/sb-introspect/sb-introspect.asd | 6 +- contrib/sb-md5/sb-md5.asd | 6 +- contrib/sb-mpfr/sb-mpfr.asd | 5 +- contrib/sb-posix/sb-posix.asd | 6 +- contrib/sb-queue/sb-queue.asd | 4 +- contrib/sb-rotate-byte/sb-rotate-byte.asd | 6 +- contrib/sb-rt/sb-rt.asd | 6 +- contrib/sb-simd/code/sb-simd.asd | 48 ------- contrib/sb-simd/sb-simd.asd | 52 +++++++ .../sb-simple-streams/sb-simple-streams.asd | 6 +- contrib/sb-sprof/sb-sprof.asd | 6 +- make-target-contrib.sh | 3 +- 28 files changed, 234 insertions(+), 277 deletions(-) delete mode 100644 contrib/asdf-stub.lisp delete mode 100755 contrib/build-contrib create mode 100644 contrib/make-contrib.lisp delete mode 100644 contrib/sb-simd/code/sb-simd.asd create mode 100644 contrib/sb-simd/sb-simd.asd diff --git a/contrib/Makefile b/contrib/Makefile index e3d1dcbf2..3d85ffbee 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -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)) &1 diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index da1a0cbea..c034a4878 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -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)" diff --git a/contrib/asdf-stub.lisp b/contrib/asdf-stub.lisp deleted file mode 100644 index bab0f8712..000000000 --- a/contrib/asdf-stub.lisp +++ /dev/null @@ -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))) diff --git a/contrib/asdf/Makefile b/contrib/asdf/Makefile index 864d1f3a8..5b36e59f1 100644 --- a/contrib/asdf/Makefile +++ b/contrib/asdf/Makefile @@ -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 "$@")))' &1 ; then - : -else - exit $? -fi | tee ../output/building-contrib.$@ diff --git a/contrib/make-contrib.lisp b/contrib/make-contrib.lisp new file mode 100644 index 000000000..e49e1f36a --- /dev/null +++ b/contrib/make-contrib.lisp @@ -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)))) diff --git a/contrib/sb-aclrepl/sb-aclrepl.asd b/contrib/sb-aclrepl/sb-aclrepl.asd index cb32435b2..e7e29645b 100644 --- a/contrib/sb-aclrepl/sb-aclrepl.asd +++ b/contrib/sb-aclrepl/sb-aclrepl.asd @@ -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 " :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")))) diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index 9bc3ec3e7..2ec2152f5 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -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"))) diff --git a/contrib/sb-capstone/sb-capstone.asd b/contrib/sb-capstone/sb-capstone.asd index c10c0c3e0..9169cb068 100644 --- a/contrib/sb-capstone/sb-capstone.asd +++ b/contrib/sb-capstone/sb-capstone.asd @@ -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"))) diff --git a/contrib/sb-cltl2/sb-cltl2.asd b/contrib/sb-cltl2/sb-cltl2.asd index 3d3fd4f8c..fc57cd23e 100644 --- a/contrib/sb-cltl2/sb-cltl2.asd +++ b/contrib/sb-cltl2/sb-cltl2.asd @@ -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")))) diff --git a/contrib/sb-concurrency/sb-concurrency.asd b/contrib/sb-concurrency/sb-concurrency.asd index b88ccaf9b..79d59facc 100644 --- a/contrib/sb-concurrency/sb-concurrency.asd +++ b/contrib/sb-concurrency/sb-concurrency.asd @@ -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")))) diff --git a/contrib/sb-cover/sb-cover.asd b/contrib/sb-cover/sb-cover.asd index 14890be38..eb8f181e2 100644 --- a/contrib/sb-cover/sb-cover.asd +++ b/contrib/sb-cover/sb-cover.asd @@ -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"))) diff --git a/contrib/sb-executable/sb-executable.asd b/contrib/sb-executable/sb-executable.asd index 3b084f357..637ce129e 100644 --- a/contrib/sb-executable/sb-executable.asd +++ b/contrib/sb-executable/sb-executable.asd @@ -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"))) diff --git a/contrib/sb-gmp/sb-gmp.asd b/contrib/sb-gmp/sb-gmp.asd index ab3ab4c45..9875ba97a 100644 --- a/contrib/sb-gmp/sb-gmp.asd +++ b/contrib/sb-gmp/sb-gmp.asd @@ -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"))) diff --git a/contrib/sb-graph/sb-graph.asd b/contrib/sb-graph/sb-graph.asd index cc64fe61c..883453f59 100644 --- a/contrib/sb-graph/sb-graph.asd +++ b/contrib/sb-graph/sb-graph.asd @@ -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"))))) diff --git a/contrib/sb-grovel/sb-grovel.asd b/contrib/sb-grovel/sb-grovel.asd index 42db8f7b3..201830db8 100644 --- a/contrib/sb-grovel/sb-grovel.asd +++ b/contrib/sb-grovel/sb-grovel.asd @@ -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")))) diff --git a/contrib/sb-introspect/sb-introspect.asd b/contrib/sb-introspect/sb-introspect.asd index aedf883e9..3d877f15a 100644 --- a/contrib/sb-introspect/sb-introspect.asd +++ b/contrib/sb-introspect/sb-introspect.asd @@ -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"))) diff --git a/contrib/sb-md5/sb-md5.asd b/contrib/sb-md5/sb-md5.asd index 3bebc1b69..e82f33b3c 100644 --- a/contrib/sb-md5/sb-md5.asd +++ b/contrib/sb-md5/sb-md5.asd @@ -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"))) diff --git a/contrib/sb-mpfr/sb-mpfr.asd b/contrib/sb-mpfr/sb-mpfr.asd index 2689178c0..c311232e3 100644 --- a/contrib/sb-mpfr/sb-mpfr.asd +++ b/contrib/sb-mpfr/sb-mpfr.asd @@ -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"))) diff --git a/contrib/sb-posix/sb-posix.asd b/contrib/sb-posix/sb-posix.asd index 5910b6169..075a02c26 100644 --- a/contrib/sb-posix/sb-posix.asd +++ b/contrib/sb-posix/sb-posix.asd @@ -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")))) diff --git a/contrib/sb-queue/sb-queue.asd b/contrib/sb-queue/sb-queue.asd index 672604c67..b40114330 100644 --- a/contrib/sb-queue/sb-queue.asd +++ b/contrib/sb-queue/sb-queue.asd @@ -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"))) diff --git a/contrib/sb-rotate-byte/sb-rotate-byte.asd b/contrib/sb-rotate-byte/sb-rotate-byte.asd index fa3080fd9..055cb81af 100644 --- a/contrib/sb-rotate-byte/sb-rotate-byte.asd +++ b/contrib/sb-rotate-byte/sb-rotate-byte.asd @@ -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")))) diff --git a/contrib/sb-rt/sb-rt.asd b/contrib/sb-rt/sb-rt.asd index ced36ccfc..380868b14 100644 --- a/contrib/sb-rt/sb-rt.asd +++ b/contrib/sb-rt/sb-rt.asd @@ -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"))) diff --git a/contrib/sb-simd/code/sb-simd.asd b/contrib/sb-simd/code/sb-simd.asd deleted file mode 100644 index e0c1a085e..000000000 --- a/contrib/sb-simd/code/sb-simd.asd +++ /dev/null @@ -1,48 +0,0 @@ -(defsystem #:sb-simd - :description "A convenient SIMD interface for SBCL." - :author "Marco Heisig " - :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"))) diff --git a/contrib/sb-simd/sb-simd.asd b/contrib/sb-simd/sb-simd.asd new file mode 100644 index 000000000..32e817749 --- /dev/null +++ b/contrib/sb-simd/sb-simd.asd @@ -0,0 +1,52 @@ +(error "Can't build contribs with ASDF") + +(defsystem #:sb-simd + :description "A convenient SIMD interface for SBCL." + :author "Marco Heisig " + :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"))))) diff --git a/contrib/sb-simple-streams/sb-simple-streams.asd b/contrib/sb-simple-streams/sb-simple-streams.asd index 1a51dadf7..1cf15a164 100644 --- a/contrib/sb-simple-streams/sb-simple-streams.asd +++ b/contrib/sb-simple-streams/sb-simple-streams.asd @@ -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))) + )) diff --git a/contrib/sb-sprof/sb-sprof.asd b/contrib/sb-sprof/sb-sprof.asd index b04b67796..c67a4c445 100644 --- a/contrib/sb-sprof/sb-sprof.asd +++ b/contrib/sb-sprof/sb-sprof.asd @@ -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"))) diff --git a/make-target-contrib.sh b/make-target-contrib.sh index 79f87f088..615274afa 100755 --- a/make-target-contrib.sh +++ b/make-target-contrib.sh @@ -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