From e8c3aa356fe95535ffd67c3808a903c4e276e9ee Mon Sep 17 00:00:00 2001 From: "pls.153" Date: Mon, 14 Apr 2025 13:09:18 +0200 Subject: [PATCH] cross-compiling: add option to create *.fasb files (android only) --- platforms/shared/make.lisp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/platforms/shared/make.lisp b/platforms/shared/make.lisp index 57cc11d..2e5aa82 100644 --- a/platforms/shared/make.lisp +++ b/platforms/shared/make.lisp @@ -37,16 +37,19 @@ (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))) #+ios (setf home (make-pathname :directory (remove "Library" (pathname-directory home) :test 'string=))) (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" home))) - (when (probe-file quicklisp-init) - (load quicklisp-init)))) - (load *ql-libs*)) ; eventual, not yet installed dependencies + (if (probe-file quicklisp-init) + (load quicklisp-init) + (require :ecl-quicklisp)))) + (when *ql-libs* + (load *ql-libs*))) ; eventual, not yet installed dependencies (asdf:load-system *asdf-system*) @@ -80,8 +83,13 @@ (in-package :cl-user) -(defun c:build-fasl (file &rest _) - ;; do nothing (not needed when cross-compiling) +(defvar *build-fasl-orig* (symbol-function 'c:build-fasl)) + +(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) ;;; --- HACK end ---