[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp e05a62a 1/6: Have a fast build option triggered by e
From: |
Andrea Corallo |
Subject: |
feature/native-comp e05a62a 1/6: Have a fast build option triggered by env var NATIVE_FAST_BOOT |
Date: |
Sun, 22 Mar 2020 12:42:40 -0400 (EDT) |
branch: feature/native-comp
commit e05a62a968e688533f014ac556a8b32662b32ed3
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
Have a fast build option triggered by env var NATIVE_FAST_BOOT
---
lisp/Makefile.in | 8 +++++---
lisp/emacs-lisp/comp.el | 22 ++++++++++++----------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 8ba6196..035720b 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -351,9 +351,11 @@ compile-main: gen-lisp compile-clean
GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-byte-compile: *t' $$el >
/dev/null && \
continue; \
echo "$${el}c"; \
- done | xargs $(XARGS_LIMIT) echo) | \
- while read chunk; do \
- $(MAKE) compile-targets TARGETS="$$chunk"; \
+ done | xargs $(XARGS_LIMIT) echo) | \
+ while read chunk; do \
+ $(MAKE) compile-targets \
+ NATIVE_DISABLE=$(NATIVE_FAST_BOOT) \
+ TARGETS="$$chunk"; \
done
.PHONY: native-compile-clean
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 1e348c0..a316d74 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)
- feature/native-comp updated (64a6709 -> eb1d22b), Andrea Corallo, 2020/03/22
- feature/native-comp e05a62a 1/6: Have a fast build option triggered by env var NATIVE_FAST_BOOT,
Andrea Corallo <=
- feature/native-comp ef30feb 3/6: * comp.el: Add missing require, Andrea Corallo, 2020/03/22
- feature/native-comp 07e3145 4/6: * comp.c (maybe_defer_native_compilation): Add some debug code, Andrea Corallo, 2020/03/22
- feature/native-comp ab4fff5 2/6: * .gitlab-ci.yml: CI test native bootstrap speed1 and speed2, Andrea Corallo, 2020/03/22
- feature/native-comp 855940d 5/6: * comp.c (maybe_defer_native_compilation): Fix, Andrea Corallo, 2020/03/22
- feature/native-comp eb1d22b 6/6: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/03/22