cross-compiling: add option to create *.fasb files (android only)

This commit is contained in:
pls.153 2025-04-14 13:09:18 +02:00
parent 6528022b70
commit e8c3aa356f

View file

@ -37,16 +37,19 @@
(ext:install-bytecodes-compiler) (ext:install-bytecodes-compiler)
(when *ql-libs* (when (or *ql-libs*
(eql :fasl *build-type*)) ; load Quicklisp for finding systems
(let ((home (user-homedir-pathname))) (let ((home (user-homedir-pathname)))
#+ios #+ios
(setf home (make-pathname :directory (setf home (make-pathname :directory
(remove "Library" (pathname-directory home) (remove "Library" (pathname-directory home)
:test 'string=))) :test 'string=)))
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" home))) (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" home)))
(when (probe-file quicklisp-init) (if (probe-file quicklisp-init)
(load quicklisp-init)))) (load quicklisp-init)
(load *ql-libs*)) ; eventual, not yet installed dependencies (require :ecl-quicklisp))))
(when *ql-libs*
(load *ql-libs*))) ; eventual, not yet installed dependencies
(asdf:load-system *asdf-system*) (asdf:load-system *asdf-system*)
@ -80,8 +83,13 @@
(in-package :cl-user) (in-package :cl-user)
(defun c:build-fasl (file &rest _) (defvar *build-fasl-orig* (symbol-function 'c:build-fasl))
;; do nothing (not needed when cross-compiling)
(defun c:build-fasl (file &rest args)
(when (eql :fasl *build-type*)
#+android
(setf c::*ld-libs* "") ; prevent link error
(apply *build-fasl-orig* file args))
file) file)
;;; --- HACK end --- ;;; --- HACK end ---