diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/loadup.el | |
parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
download | emacs-feature/native-comp-macos-fixes.tar.gz |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/loadup.el')
-rw-r--r-- | lisp/loadup.el | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lisp/loadup.el b/lisp/loadup.el index 31843fc24d1..aaa5888bf92 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -449,33 +449,33 @@ lost after dumping"))) ;; At this point, we're ready to resume undo recording for scratch. (buffer-enable-undo "*scratch*") -(when (native-comp-available-p) +(when (boundp 'comp-ctxt) ;; Fix the compilation unit filename to have it working when ;; when installed or if the source directory got moved. This is set to be ;; a pair in the form: (rel-path-from-install-bin . rel-path-from-local-bin). (let ((h (make-hash-table :test #'eq)) - (lisp-src-dir (expand-file-name (concat default-directory "../lisp"))) (bin-dest-dir (cadr (member "--bin-dest" command-line-args))) - (lisp-dest-dir (cadr (member "--lisp-dest" command-line-args)))) - (mapatoms (lambda (s) - (let ((f (symbol-function s))) - (when (subr-native-elisp-p f) - (puthash (subr-native-comp-unit f) nil h))))) - (maphash (lambda (cu _) - (native-comp-unit-set-file - cu - (cons - ;; Relative path from the installed binary. - (file-relative-name - (concat lisp-dest-dir - (replace-regexp-in-string - (regexp-quote lisp-src-dir) "" - (native-comp-unit-file cu))) - bin-dest-dir) - ;; Relative path from the built uninstalled binary. - (file-relative-name (native-comp-unit-file cu) - invocation-directory)))) - h))) + (eln-dest-dir (cadr (member "--eln-dest" command-line-args)))) + (when (and bin-dest-dir eln-dest-dir) + (setq eln-dest-dir + (concat eln-dest-dir "eln-cache/" comp-native-path-postfix "/")) + (mapatoms (lambda (s) + (let ((f (symbol-function s))) + (when (subr-native-elisp-p f) + (puthash (subr-native-comp-unit f) nil h))))) + (maphash (lambda (cu _) + (native-comp-unit-set-file + cu + (cons + ;; Relative path from the installed binary. + (file-relative-name (concat eln-dest-dir + (file-name-nondirectory + (native-comp-unit-file cu))) + bin-dest-dir) + ;; Relative path from the built uninstalled binary. + (file-relative-name (native-comp-unit-file cu) + invocation-directory)))) + h)))) (when (hash-table-p purify-flag) (let ((strings 0) |