[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 138990b 2/2: * Fix failure when compiling a trampoli
From: |
Andrea Corallo |
Subject: |
feature/native-comp 138990b 2/2: * Fix failure when compiling a trampoline with no eln-cache dir (bug#43875) |
Date: |
Sat, 10 Oct 2020 04:37:57 -0400 (EDT) |
branch: feature/native-comp
commit 138990bbda7ab228e3fde44710426c474b2c1086
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Fix failure when compiling a trampoline with no eln-cache dir (bug#43875)
* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Try to create
the eln-cache dir if this is not existing, if fails to do that
move on to the next one.
---
lisp/emacs-lisp/comp.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 0445fc0..dbd4cef 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2603,11 +2603,15 @@ Return the its filename if found or nil otherwise."
(native-compile
trampoline-sym nil
(cl-loop
- for dir in comp-eln-load-path
+ for load-dir in comp-eln-load-path
+ for dir = (concat load-dir comp-native-version-dir)
for f = (expand-file-name
(comp-trampoline-filename subr-name)
- (concat dir
- comp-native-version-dir))
+ dir)
+ unless (file-exists-p dir)
+ do (ignore-errors
+ (make-directory dir t)
+ (cl-return f))
when (file-writable-p f)
do (cl-return f)
finally (error "Cannot find suitable directory for output in \