]> git.eshelyaron.com Git - emacs.git/commitdiff
Have a fast build option triggered by env var NATIVE_FAST_BOOT
authorAndrea Corallo <akrl@sdf.org>
Sat, 21 Mar 2020 14:11:41 +0000 (14:11 +0000)
committerAndrea Corallo <akrl@sdf.org>
Sun, 22 Mar 2020 15:50:58 +0000 (15:50 +0000)
lisp/Makefile.in
lisp/emacs-lisp/comp.el

index 8ba619656d869d82c973c7fdeebc9b0308706991..035720b49b7713fa6889a0c7682617325c1ebb7b 100644 (file)
@@ -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
index 1e348c065b552657b7fadf0ea727dffe921ee91f..a316d741a2616b9c2f05eda1ad4eb85dea9d88e6 100644 (file)
@@ -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)