diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-03-21 14:11:41 +0000 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-03-22 15:50:58 +0000 |
commit | e05a62a968e688533f014ac556a8b32662b32ed3 (patch) | |
tree | a99c70b1448ed4043a0a2503f62640995d3ea1cf /lisp/emacs-lisp | |
parent | 64a6709f648f4f6363e1d9d63cc4fc33ff5e0340 (diff) | |
download | emacs-e05a62a968e688533f014ac556a8b32662b32ed3.tar.gz emacs-e05a62a968e688533f014ac556a8b32662b32ed3.tar.bz2 emacs-e05a62a968e688533f014ac556a8b32662b32ed3.zip |
Have a fast build option triggered by env var NATIVE_FAST_BOOT
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 1e348c065b5..a316d741a26 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -2234,16 +2234,18 @@ Ultra cheap impersonation of `batch-byte-compile'." (defun batch-byte-native-compile-for-bootstrap () "As `batch-byte-compile' but used for booststrap. Always generate elc files too and handle native compiler expected errors." - (let ((byte-native-for-bootstrap t) - (byte-to-native-output-file nil)) - (unwind-protect - (condition-case _ - (batch-native-compile) - (native-compiler-error-dyn-func) - (native-compiler-error-empty-byte)) - (pcase byte-to-native-output-file - (`(,tempfile . ,target-file) - (rename-file tempfile target-file t)))))) + (if (equal (getenv "NATIVE_DISABLE") "1") + (batch-byte-compile) + (let ((byte-native-for-bootstrap t) + (byte-to-native-output-file nil)) + (unwind-protect + (condition-case _ + (batch-native-compile) + (native-compiler-error-dyn-func) + (native-compiler-error-empty-byte)) + (pcase byte-to-native-output-file + (`(,tempfile . ,target-file) + (rename-file tempfile target-file t))))))) ;;;###autoload (defun native-compile-async (paths &optional recursively load) |