(unless byte-to-native-top-level-forms
(signal 'native-compiler-error-empty-byte filename))
(unless (comp-ctxt-output comp-ctxt)
- (setf (comp-ctxt-output comp-ctxt) (comp-el-to-eln-filename
- filename
- (or native-compile-target-directory
- (when byte+native-compile
- (car (last native-comp-eln-load-path)))))))
+ (setf (comp-ctxt-output comp-ctxt)
+ (comp-el-to-eln-filename filename native-compile-target-directory)))
(setf (comp-ctxt-speed comp-ctxt) (alist-get 'native-comp-speed
byte-native-qualities)
(comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug
(batch-byte-compile)
(cl-assert (length= command-line-args-left 1))
(let* ((byte+native-compile t)
+ (native-compile-target-directory
+ (car (last native-comp-eln-load-path)))
(byte-to-native-output-buffer-file nil)
(eln-file (car (batch-native-compile))))
(comp-write-bytecode-file eln-file)
:suffix "-comp-stage1.el"
(ert-with-temp-file comp2-src
: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"
- (ert-resource-directory)))
+ (ert-resource-directory)))
;; Can't use debug symbols.
(native-comp-debug 0))
(copy-file comp-src comp1-src t)