diff options
Diffstat (limited to 'lisp/emacs-lisp')
| -rw-r--r-- | lisp/emacs-lisp/comp.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index ed706feb923..a6b9b3f57ea 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el | |||
| @@ -3800,18 +3800,22 @@ Return the trampoline if found or nil otherwise." | |||
| 3800 | (list (expand-file-name comp-native-version-dir | 3800 | (list (expand-file-name comp-native-version-dir |
| 3801 | native-compile-target-directory)) | 3801 | native-compile-target-directory)) |
| 3802 | (comp-eln-load-path-eff))) | 3802 | (comp-eln-load-path-eff))) |
| 3803 | with rel-filename = (comp-trampoline-filename subr-name) | ||
| 3803 | for dir in dirs | 3804 | for dir in dirs |
| 3804 | for f = (expand-file-name | 3805 | for abs-filename = (expand-file-name rel-filename dir) |
| 3805 | (comp-trampoline-filename subr-name) | ||
| 3806 | dir) | ||
| 3807 | unless (file-exists-p dir) | 3806 | unless (file-exists-p dir) |
| 3808 | do (ignore-errors | 3807 | do (ignore-errors |
| 3809 | (make-directory dir t) | 3808 | (make-directory dir t) |
| 3810 | (cl-return f)) | 3809 | (cl-return abs-filename)) |
| 3811 | when (file-writable-p f) | 3810 | when (file-writable-p abs-filename) |
| 3812 | do (cl-return f) | 3811 | do (cl-return abs-filename) |
| 3813 | finally (error "Cannot find suitable directory for output in \ | 3812 | ;; Default to some temporary directory if no better option was |
| 3814 | `native-comp-eln-load-path'"))) | 3813 | ;; found. |
| 3814 | finally (cl-return | ||
| 3815 | (expand-file-name | ||
| 3816 | (make-temp-file-internal (file-name-sans-extension rel-filename) | ||
| 3817 | 0 ".eln" nil) | ||
| 3818 | temporary-file-directory)))) | ||
| 3815 | 3819 | ||
| 3816 | (defun comp-trampoline-compile (subr-name) | 3820 | (defun comp-trampoline-compile (subr-name) |
| 3817 | "Synthesize compile and return a trampoline for SUBR-NAME." | 3821 | "Synthesize compile and return a trampoline for SUBR-NAME." |