diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-03 15:26:04 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-03 15:26:13 +0200 |
commit | 5fec9182dbeffa88cef6651d8c798ef9665d6681 (patch) | |
tree | eef3635bcb19cb75c58bece1b45922951fe9d4c3 /lisp/startup.el | |
parent | da02b9edadbc809b25ac83eccf64089f1cf3b160 (diff) | |
download | emacs-5fec9182dbeffa88cef6651d8c798ef9665d6681.tar.gz emacs-5fec9182dbeffa88cef6651d8c798ef9665d6681.tar.bz2 emacs-5fec9182dbeffa88cef6651d8c798ef9665d6681.zip |
Add new variable 'inhibit-native-compilation'
* doc/lispref/compile.texi (Native-Compilation Variables):
Document it.
* lisp/startup.el (normal-top-level): Set
inhibit-native-compilation from environment variable.
* lisp/subr.el (native-comp-deferred-compilation): Make obsolete.
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Don't write
trampolines to disk.
* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Adjust.
* src/comp.c (syms_of_comp): New variable
inhibit-native-compilation.
(maybe_defer_native_compilation): Use it.
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 50a8f491d8e..03a67cdc0e8 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -541,7 +541,7 @@ DIRS are relative." (setq comp--compilable t)) (defvar native-comp-eln-load-path) -(defvar native-comp-deferred-compilation) +(defvar inhibit-native-compilation) (defvar comp-enable-subr-trampolines) (defvar startup--original-eln-load-path nil @@ -578,6 +578,9 @@ the updated value." It sets `command-line-processed', processes the command-line, reads the initialization files, etc. It is the default value of the variable `top-level'." + ;; Allow disabling automatic .elc->.eln processing. + (setq inhibit-native-compilation (getenv "EMACS_INHIBIT_NATIVE_COMPILATION")) + (if command-line-processed (message internal--top-level-message) (setq command-line-processed t) @@ -596,7 +599,7 @@ It is the default value of the variable `top-level'." ;; in this session. This is necessary if libgccjit is not ;; available on MS-Windows, but Emacs was built with ;; native-compilation support. - (setq native-comp-deferred-compilation nil + (setq inhibit-native-compilation t comp-enable-subr-trampolines nil)) ;; Form `native-comp-eln-load-path'. |