branch: elpa/flycheck
commit 7992f4f2295fb93134769914a18d0e479ce5f24d
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
[Fix #2163] Disable native compilation in emacs-lisp checker
The byte-compile subprocess exists only to collect warnings, but with
native compilation enabled it also emitted .eln files into the user's
native-comp cache (respecting native-comp-eln-load-path was the original
request). Set no-native-compile so the side effect is gone entirely,
which also skips wasted compilation work.
---
CHANGES.rst | 2 ++
flycheck.el | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/CHANGES.rst b/CHANGES.rst
index 39fdd063a7..fc7e32ebcc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,8 @@
in preview mode (e.g. ``error[F401]`` instead of ``F401``).
- [#2166]: Fix ``awk-gawk`` reporting a suspicious checker state for valid
scripts.
+- [#2163]: Disable native compilation in the ``emacs-lisp`` checker subprocess
+ so it no longer writes stray ``.eln`` files to the native-comp cache.
36.0 (2026-02-19)
======================
diff --git a/flycheck.el b/flycheck.el
index 2c14a298a5..4894d5eff0 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -8551,6 +8551,10 @@ See `https://credo-ci.org/'."
;; file-local eval: directives during byte-compilation.
(setq enable-local-eval nil
enable-local-variables :safe)
+ ;; The subprocess only byte-compiles to collect warnings; producing
+ ;; .eln files is a wasted side effect that also pollutes the user's
+ ;; native-comp cache, so disable native compilation entirely.
+ (setq no-native-compile t)
;; Keep track of the generated bytecode files, to delete them after byte
;; compilation.
(require 'bytecomp)