Function: batch-native-compile

batch-native-compile is an autoloaded and byte-compiled function defined in comp.el.gz.

Signature

(batch-native-compile &optional FOR-TARBALL)

Documentation

Perform batch native compilation of remaining command-line arguments.

Native compilation equivalent of batch-byte-compile. Use this from the command line, with -batch; it won't work in an interactive Emacs session. Optional argument FOR-TARBALL non-nil means the file being compiled as part of building the source tarball, in which case the .eln file will be placed under the native-lisp/ directory (actually, in the last directory in native-comp-eln-load-path).

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
;;;###autoload
(defun batch-native-compile (&optional for-tarball)
  "Perform batch native compilation of remaining command-line arguments.

Native compilation equivalent of `batch-byte-compile'.
Use this from the command line, with `-batch'; it won't work
in an interactive Emacs session.
Optional argument FOR-TARBALL non-nil means the file being compiled
as part of building the source tarball, in which case the .eln file
will be placed under the native-lisp/ directory (actually, in the
last directory in `native-comp-eln-load-path')."
  (comp-ensure-native-compiler)
  (let ((comp-running-batch-compilation t)
        (native-compile-target-directory
         (if for-tarball
             (car (last native-comp-eln-load-path))
           native-compile-target-directory)))
    (cl-loop for file in command-line-args-left
             if (or (null byte+native-compile)
                    (cl-notany (lambda (re) (string-match re file))
                               native-comp-bootstrap-deny-list))
             collect (comp--native-compile file)
             else
             collect (byte-compile-file file))))