[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 04a073f 2/2: * Allow for manually bumbing new native
From: |
Andrea Corallo |
Subject: |
feature/native-comp 04a073f 2/2: * Allow for manually bumbing new native compiler ABI versions |
Date: |
Sat, 7 Nov 2020 10:23:02 -0500 (EST) |
branch: feature/native-comp
commit 04a073f4bf1cc31a3a2606468b0e017b69d7ff39
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Allow for manually bumbing new native compiler ABI versions
* src/comp.c (ABI_VERSION): Define macro.
(hash_native_abi): Include ABI_VERSION in the hashing.
(syms_of_comp): Tweak docstring.
---
src/comp.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/comp.c b/src/comp.c
index 05ec073..cb5f1a1 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -406,6 +406,9 @@ load_gccjit_if_necessary (bool mandatory)
}
+/* Increase this number to force a new Vcomp_abi_hash to be generated. */
+#define ABI_VERSION "0"
+
/* C symbols emitted for the load relocation mechanism. */
#define CURRENT_THREAD_RELOC_SYM "current_thread_reloc"
#define PURE_RELOC_SYM "pure_reloc"
@@ -778,8 +781,10 @@ hash_native_abi (void)
eassert (NILP (Vcomp_abi_hash));
Vcomp_abi_hash =
- comp_hash_string (Fmapconcat (intern_c_string ("subr-name"),
- Vcomp_subr_list, build_string ("")));
+ comp_hash_string (
+ concat2 (build_string (ABI_VERSION),
+ Fmapconcat (intern_c_string ("subr-name"),
+ Vcomp_subr_list, build_string (""))));
Lisp_Object separator = build_string ("-");
Vcomp_native_version_dir =
concat3 (Vemacs_version,
@@ -5262,7 +5267,7 @@ native compiled one. */);
DEFVAR_LISP ("comp-subr-list", Vcomp_subr_list,
doc: /* List of all defined subrs. */);
DEFVAR_LISP ("comp-abi-hash", Vcomp_abi_hash,
- doc: /* String signing the ABI exposed to .eln files. */);
+ doc: /* String signing the .eln files ABI. */);
Vcomp_abi_hash = Qnil;
DEFVAR_LISP ("comp-native-version-dir", Vcomp_native_version_dir,
doc: /* Directory in use to disambiguate eln compatibility. */);