diff options
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"))) | |||
| 449 | ;; At this point, we're ready to resume undo recording for scratch. | 449 | ;; At this point, we're ready to resume undo recording for scratch. |
| 450 | (buffer-enable-undo "*scratch*") | 450 | (buffer-enable-undo "*scratch*") |
| 451 | 451 | ||
| 452 | (when (native-comp-available-p) | 452 | (when (boundp 'comp-ctxt) |
| 453 | ;; Fix the compilation unit filename to have it working when | 453 | ;; Fix the compilation unit filename to have it working when |
| 454 | ;; when installed or if the source directory got moved. This is set to be | 454 | ;; when installed or if the source directory got moved. This is set to be |
| 455 | ;; a pair in the form: (rel-path-from-install-bin . rel-path-from-local-bin). | 455 | ;; a pair in the form: (rel-path-from-install-bin . rel-path-from-local-bin). |
| 456 | (let ((h (make-hash-table :test #'eq)) | 456 | (let ((h (make-hash-table :test #'eq)) |
| 457 | (lisp-src-dir (expand-file-name (concat default-directory "../lisp"))) | ||
| 458 | (bin-dest-dir (cadr (member "--bin-dest" command-line-args))) | 457 | (bin-dest-dir (cadr (member "--bin-dest" command-line-args))) |
| 459 | (lisp-dest-dir (cadr (member "--lisp-dest" command-line-args)))) | 458 | (eln-dest-dir (cadr (member "--eln-dest" command-line-args)))) |
| 460 | (mapatoms (lambda (s) | 459 | (when (and bin-dest-dir eln-dest-dir) |
| 461 | (let ((f (symbol-function s))) | 460 | (setq eln-dest-dir |
| 462 | (when (subr-native-elisp-p f) | 461 | (concat eln-dest-dir "eln-cache/" comp-native-path-postfix "/")) |
| 463 | (puthash (subr-native-comp-unit f) nil h))))) | 462 | (mapatoms (lambda (s) |
| 464 | (maphash (lambda (cu _) | 463 | (let ((f (symbol-function s))) |
| 465 | (native-comp-unit-set-file | 464 | (when (subr-native-elisp-p f) |
| 466 | cu | 465 | (puthash (subr-native-comp-unit f) nil h))))) |
| 467 | (cons | 466 | (maphash (lambda (cu _) |
| 468 | ;; Relative path from the installed binary. | 467 | (native-comp-unit-set-file |
| 469 | (file-relative-name | 468 | cu |
| 470 | (concat lisp-dest-dir | 469 | (cons |
| 471 | (replace-regexp-in-string | 470 | ;; Relative path from the installed binary. |
| 472 | (regexp-quote lisp-src-dir) "" | 471 | (file-relative-name (concat eln-dest-dir |
| 473 | (native-comp-unit-file cu))) | 472 | (file-name-nondirectory |
| 474 | bin-dest-dir) | 473 | (native-comp-unit-file cu))) |
| 475 | ;; Relative path from the built uninstalled binary. | 474 | bin-dest-dir) |
| 476 | (file-relative-name (native-comp-unit-file cu) | 475 | ;; Relative path from the built uninstalled binary. |
| 477 | invocation-directory)))) | 476 | (file-relative-name (native-comp-unit-file cu) |
| 478 | h))) | 477 | invocation-directory)))) |
| 478 | h)))) | ||
| 479 | 479 | ||
| 480 | (when (hash-table-p purify-flag) | 480 | (when (hash-table-p purify-flag) |
| 481 | (let ((strings 0) | 481 | (let ((strings 0) |