diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-05-06 18:55:33 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-05-06 20:11:47 +0100 |
commit | f8df3320b1ceffca8d5ee7cbc566ba3cdf761e21 (patch) | |
tree | 4cc2fa5e08d0a92cad76a9e6b2fd385ea63e581a /lisp/emacs-lisp | |
parent | 6d25de46f77909f3adb108786052995151082c56 (diff) | |
download | emacs-f8df3320b1ceffca8d5ee7cbc566ba3cdf761e21.tar.gz emacs-f8df3320b1ceffca8d5ee7cbc566ba3cdf761e21.tar.bz2 emacs-f8df3320b1ceffca8d5ee7cbc566ba3cdf761e21.zip |
* Add native compilation unit black list
* lisp/emacs-lisp/comp.el (comp-bootstrap-black-list): New customize.
(batch-native-compile): Rework to make use of
'comp-bootstrap-black-list'.
(batch-byte-native-compile-for-bootstrap): Add assertion to make
logic assumption explicit.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index bd4c25a1f57..60b41f95bda 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -84,6 +84,13 @@ This intended for debugging the compiler itself. :type 'boolean :group 'comp) +(defcustom comp-bootstrap-black-list + '("^leim/") + "List of regexps to exclude files from native compilation during bootstrap. +Skip if any is matching." + :type 'list + :group 'comp) + (defcustom comp-never-optimize-functions '(;; Mandatory for Emacs to be working correctly macroexpand scroll-down scroll-up narrow-to-region widen rename-buffer @@ -2291,7 +2298,13 @@ Return the compilation unit file name." (defun batch-native-compile () "Run `native-compile' on remaining command-line arguments. Ultra cheap impersonation of `batch-byte-compile'." - (mapc #'native-compile command-line-args-left)) + (cl-loop for file in command-line-args-left + if (or (null byte-native-for-bootstrap) + (cl-notany (lambda (re) (string-match re file)) + comp-bootstrap-black-list)) + do (native-compile file) + else + do (byte-compile-file file))) ;;;###autoload (defun batch-byte-native-compile-for-bootstrap () @@ -2299,6 +2312,7 @@ Ultra cheap impersonation of `batch-byte-compile'." Always generate elc files too and handle native compiler expected errors." (if (equal (getenv "NATIVE_DISABLE") "1") (batch-byte-compile) + (cl-assert (= 1 (length command-line-args-left))) (let ((byte-native-for-bootstrap t) (byte-to-native-output-file nil)) (unwind-protect |