Changeset 14312


Ignore:
Timestamp:
Sep 30, 2010, 8:00:31 AM (9 years ago)
Author:
gb
Message:

Don't bind *FEATURES* in COMPILE-FILE, unless we're cross-compiling
or the :FEATURES argument was provided.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/nfcomp.lisp

    r14296 r14312  
    124124                         (print *compile-print*)
    125125                         load
    126                          features
     126                         (features nil features-p)
    127127                         (target *fasl-target* target-p)
    128128                         (save-local-symbols *fasl-save-local-symbols*)
     
    140140                                                    *fasl-break-on-program-errors*)))
    141141  "Compile SRC, producing a corresponding fasl file and returning its filename."
    142   (let* ((backend *target-backend*))
     142  (let* ((backend *target-backend*)
     143         (symbols ())
     144         (values ()))
    143145    (when (and target-p (not (setq backend (find-backend target))))
    144146      (warn "Unknown :TARGET : ~S.  Reverting to ~s ..." target *fasl-target*)
    145147      (setq target *fasl-target*  backend *target-backend*))
    146     (unless (eq *target-backend* *host-backend*)
    147       (setq save-source-locations nil))
     148    (if (eq *target-backend* *host-backend*)
     149      (when features-p
     150        (setq symbols '(*features*)
     151              values (list (append (if (listp features) features (list features)) *features*))))
     152      (setq symbols '(*features*)
     153            values (list (setup-target-features *target-backend* *features*))
     154            save-source-locations nil))
    148155    (multiple-value-bind (output-file truename warnings-p serious-p)
    149156        (loop
    150157          (restart-case
    151               (return (%compile-file src output-file verbose print features
    152                                      save-local-symbols save-doc-strings save-definitions
    153                                      save-source-locations break-on-program-errors
    154                                      force backend external-format
    155                                      compile-file-original-truename compile-file-original-buffer-offset))
     158              (return (progv symbols values
     159                        (%compile-file src output-file verbose print
     160                                       save-local-symbols save-doc-strings save-definitions
     161                                       save-source-locations break-on-program-errors
     162                                       force backend external-format
     163                                       compile-file-original-truename compile-file-original-buffer-offset)))
    156164            (retry-compile-file ()
    157165              :report (lambda (stream) (format stream "Retry compiling ~s" src))
     
    169177(defvar *fasl-compile-time-env* nil)
    170178
    171 (defun %compile-file (src output-file verbose print features
     179(defun %compile-file (src output-file verbose print
    172180                          save-local-symbols save-doc-strings save-definitions
    173181                          save-source-locations break-on-program-errors
     
    199207                           (backend-target-fasl-pathname
    200208                            *target-backend*))))
    201     (let* ((*features* (append (if (listp features) features (list features)) (setup-target-features target-backend *features*)))
    202            (*fasl-deferred-warnings* nil) ; !!! WITH-COMPILATION-UNIT ...
     209    (let* ((*fasl-deferred-warnings* nil) ; !!! WITH-COMPILATION-UNIT ...
    203210           (*fasl-save-local-symbols* save-local-symbols)
    204211           (*save-source-locations* save-source-locations)
Note: See TracChangeset for help on using the changeset viewer.