Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add POST_LOAD_ASDF_SYSTEMS option to build #672

Merged
merged 5 commits into from
Sep 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ QUICKLISP=$(SBCL) --load $(QUICKLISP_HOME)/setup.lisp \
--eval '(push (truename ".") asdf:*central-registry*)' \
--eval "(push (truename \"$(RIGETTI_LISP_LIBRARY_HOME)\") ql:*local-project-directories*)"
QUICKLISP_BOOTSTRAP_URL=https://beta.quicklisp.org/quicklisp.lisp


# Extra ASDF systems to load after quilc as part of the executable.
export ASDF_SYSTEMS_TO_LOAD=quilc $(POST_LOAD_ASDF_SYSTEMS)
notmgsk marked this conversation as resolved.
Show resolved Hide resolved
SYSTEM_LOAD_STRING=$(foreach system,$(ASDF_SYSTEMS_TO_LOAD),--eval '(ql:quickload "$(system)")')
notmgsk marked this conversation as resolved.
Show resolved Hide resolved

UNAME_S=$(shell uname -s)
PREFIX ?= /usr/local

Expand All @@ -28,7 +34,7 @@ $(QUICKLISP_SETUP):
system-index.txt: $(QUICKLISP_SETUP)
$(QUICKLISP) \
$(FOREST_SDK_FEATURE) \
--eval '(ql:quickload "quilc")' \
$(SYSTEM_LOAD_STRING) \
--eval '(ql:write-asdf-manifest-file "system-index.txt")'

###############################################################################
Expand Down
10 changes: 9 additions & 1 deletion build-app.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@
(subseq version 0 (position #\- version :test #'eql))))
(load-systems-table)
(push #'local-system-search asdf:*system-definition-search-functions*)
(asdf:load-system "quilc")

;; Load systems defined by environment variable $ASDF_SYSTEMS_TO_LOAD,
;; or if that does not exist just load quilc
(let ((systems (uiop:getenv "ASDF_SYSTEMS_TO_LOAD")))
(mapcar (lambda (sys)
colescott marked this conversation as resolved.
Show resolved Hide resolved
(unless (uiop:emptyp sys)
(asdf:load-system sys)))
(uiop:split-string (or systems "quilc")
stylewarning marked this conversation as resolved.
Show resolved Hide resolved
:separator " ")))
;; TODO Fix tweedledum
;; #-win32
;; (asdf:load-system "cl-quil/tweedledum")
Expand Down