[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp ce9e3a4 05/11: Introduce 'effective_load_path'
From: |
Andrea Corallo |
Subject: |
feature/native-comp ce9e3a4 05/11: Introduce 'effective_load_path' |
Date: |
Wed, 4 Mar 2020 12:08:31 -0500 (EST) |
branch: feature/native-comp
commit ce9e3a4ce75acc5450aa39eb4baf601c26aec3fe
Author: AndreaCorallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
Introduce 'effective_load_path'
---
src/lread.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/lread.c b/src/lread.c
index 8b6db92..6d33bd3 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1055,6 +1055,26 @@ This uses the variables `load-suffixes' and
`load-file-rep-suffixes'. */)
return Fnreverse (lst);
}
+static Lisp_Object
+effective_load_path (void)
+{
+ if (!NATIVE_COMP_FLAG)
+ return Vload_path;
+
+ Lisp_Object lp = Vload_path;
+ Lisp_Object new_lp = Qnil;
+ FOR_EACH_TAIL (lp)
+ {
+ Lisp_Object el = XCAR (lp);
+ new_lp =
+ Fcons (concat2 (Ffile_name_as_directory (el),
+ Vsystem_configuration),
+ new_lp);
+ new_lp = Fcons (el, new_lp);
+ }
+ return Fnreverse (new_lp);
+}
+
/* Return true if STRING ends with SUFFIX. */
static bool
suffix_p (Lisp_Object string, const char *suffix)
@@ -1199,7 +1219,9 @@ Return t if the file exists and loads successfully. */)
suffixes = CALLN (Fappend, suffixes, Vload_file_rep_suffixes);
}
- fd = openp (Vload_path, file, suffixes, &found, Qnil, load_prefer_newer);
+ fd =
+ openp (effective_load_path (), file, suffixes, &found, Qnil,
+ load_prefer_newer);
}
if (fd == -1)
- feature/native-comp updated (0cef208 -> 6487d4a), Andrea Corallo, 2020/03/04
- feature/native-comp 8788fab 03/11: ; Nit fix in comment, Andrea Corallo, 2020/03/04
- feature/native-comp ce9e3a4 05/11: Introduce 'effective_load_path',
Andrea Corallo <=
- feature/native-comp 0da62d9 01/11: Change parameter name into comp--compile-ctxt-to-file, Andrea Corallo, 2020/03/04
- feature/native-comp 2dae7e1 02/11: Add system-configuration in the compilation output path, Andrea Corallo, 2020/03/04
- feature/native-comp d0066e3 04/11: * Keep comp-subr-list into pure space, Andrea Corallo, 2020/03/04
- feature/native-comp bf4f620 06/11: * ; Clean-up out of date comment, Andrea Corallo, 2020/03/04
- feature/native-comp 43b6f05 09/11: Hash eln ABI once and add it to the output compilation path, Andrea Corallo, 2020/03/04
- feature/native-comp f77f6ca 08/11: Fix org for eln new compilation folder layout, Andrea Corallo, 2020/03/04
- feature/native-comp 1f3ba65 10/11: * Do not crash if the output directory is created in the meanwhile, Andrea Corallo, 2020/03/04
- feature/native-comp 286e21c 07/11: Rework `find-lisp-object-file-name', Andrea Corallo, 2020/03/04
- feature/native-comp 6487d4a 11/11: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/03/04