Fix emacs-lisp-native-compile-and-load eln target directory (bug#64226)
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Don't use `byte+native-compile' to select output directory but always axpect it explicit through `native-compile-target-directory'. (batch-byte+native-compile): Set `native-compile-target-directory'. * test/src/comp-tests.el (comp-tests-bootstrap): Set `native-compile-target-directory'.
This commit is contained in:
parent
7e3c616086
commit
b93107c20b
2 changed files with 8 additions and 7 deletions
|
@ -1392,11 +1392,8 @@ clashes."
|
||||||
(unless byte-to-native-top-level-forms
|
(unless byte-to-native-top-level-forms
|
||||||
(signal 'native-compiler-error-empty-byte filename))
|
(signal 'native-compiler-error-empty-byte filename))
|
||||||
(unless (comp-ctxt-output comp-ctxt)
|
(unless (comp-ctxt-output comp-ctxt)
|
||||||
(setf (comp-ctxt-output comp-ctxt) (comp-el-to-eln-filename
|
(setf (comp-ctxt-output comp-ctxt)
|
||||||
filename
|
(comp-el-to-eln-filename filename native-compile-target-directory)))
|
||||||
(or native-compile-target-directory
|
|
||||||
(when byte+native-compile
|
|
||||||
(car (last native-comp-eln-load-path)))))))
|
|
||||||
(setf (comp-ctxt-speed comp-ctxt) (alist-get 'native-comp-speed
|
(setf (comp-ctxt-speed comp-ctxt) (alist-get 'native-comp-speed
|
||||||
byte-native-qualities)
|
byte-native-qualities)
|
||||||
(comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug
|
(comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug
|
||||||
|
@ -4351,6 +4348,8 @@ variable \"NATIVE_DISABLED\" is set, only byte compile."
|
||||||
(batch-byte-compile)
|
(batch-byte-compile)
|
||||||
(cl-assert (length= command-line-args-left 1))
|
(cl-assert (length= command-line-args-left 1))
|
||||||
(let* ((byte+native-compile t)
|
(let* ((byte+native-compile t)
|
||||||
|
(native-compile-target-directory
|
||||||
|
(car (last native-comp-eln-load-path)))
|
||||||
(byte-to-native-output-buffer-file nil)
|
(byte-to-native-output-buffer-file nil)
|
||||||
(eln-file (car (batch-native-compile))))
|
(eln-file (car (batch-native-compile))))
|
||||||
(comp-write-bytecode-file eln-file)
|
(comp-write-bytecode-file eln-file)
|
||||||
|
|
|
@ -70,9 +70,11 @@ Check that the resulting binaries do not differ."
|
||||||
:suffix "-comp-stage1.el"
|
:suffix "-comp-stage1.el"
|
||||||
(ert-with-temp-file comp2-src
|
(ert-with-temp-file comp2-src
|
||||||
:suffix "-comp-stage2.el"
|
:suffix "-comp-stage2.el"
|
||||||
(let* ((byte+native-compile t) ; FIXME HACK
|
(let* ((byte+native-compile t)
|
||||||
|
(native-compile-target-directory
|
||||||
|
(car (last native-comp-eln-load-path)))
|
||||||
(comp-src (expand-file-name "../../../lisp/emacs-lisp/comp.el"
|
(comp-src (expand-file-name "../../../lisp/emacs-lisp/comp.el"
|
||||||
(ert-resource-directory)))
|
(ert-resource-directory)))
|
||||||
;; Can't use debug symbols.
|
;; Can't use debug symbols.
|
||||||
(native-comp-debug 0))
|
(native-comp-debug 0))
|
||||||
(copy-file comp-src comp1-src t)
|
(copy-file comp-src comp1-src t)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue