I would like the eln-cache for natively compiled files (I'm using emacs 29, built from the master branch) to be in a custom location. I have this in the opening of my early-init.el file:
;; Dir for eln-cache
(when (boundp 'native-comp-eln-load-path)
(setcar native-comp-eln-load-path
(expand-file-name (convert-standard-filename ".local/temp/cache/eln-cache/")
user-emacs-directory)))
;; Silence nativecomp warnings popping up
(setq native-comp-async-report-warnings-errors nil)
;; Settings
(setq native-comp-speed 2
native-comp-deferred-compilation t
package-native-compile t)
Unfortunately this doesn't seem to work. I will get a few files compiled in the proper place (i.e. in the cache dir) right at the start-up of emacs but a new eln-cache dir is always also created at the root of my .emacs.d and the eln files are all then subsequently created there as well.
I don't understand what the problem is here. Any ideas are welcome.
EDIT: Here's the bug report I filed: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53891