From 2e25eebfbd25b131b6d0fcff4e60f7a8773d912b Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 31 May 2020 22:26:08 +0100 Subject: [PATCH] Store libgccjit version into generated code * src/comp.c (emit_ctxt_code): Add libgccjit version into stored optimize qualities. (syms_of_comp): Define Qgccjit here. * src/w32fns.c (syms_of_w32fns): Move out Qgccjit definition. --- src/comp.c | 7 +++++-- src/w32fns.c | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/comp.c b/src/comp.c index 2d904c91548..d8e78bc2175 100644 --- a/src/comp.c +++ b/src/comp.c @@ -2634,8 +2634,10 @@ emit_ctxt_code (void) { Fcons (Qcomp_speed, Fsymbol_value (Qcomp_speed)), Fcons (Qcomp_debug, - Fsymbol_value (Qcomp_debug)) }; - emit_static_object (TEXT_OPTIM_QLY_SYM, Flist (2, opt_qly)); + Fsymbol_value (Qcomp_debug)), + Fcons (Qgccjit, + Fcomp_libgccjit_version ()) }; + emit_static_object (TEXT_OPTIM_QLY_SYM, Flist (ARRAYELTS (opt_qly), opt_qly)); emit_static_object (TEXT_FDOC_SYM, CALL1I (comp-ctxt-function-docs, Vcomp_ctxt)); @@ -4770,6 +4772,7 @@ syms_of_comp (void) DEFSYM (Qscratch, "scratch"); DEFSYM (Qlate, "late"); DEFSYM (Qlambda_fixup, "lambda-fixup"); + DEFSYM (Qgccjit, "gccjit"); /* To be signaled by the compiler. */ DEFSYM (Qnative_compiler_error, "native-compiler-error"); diff --git a/src/w32fns.c b/src/w32fns.c index eeb73489dd5..e595b0285a7 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10462,7 +10462,6 @@ syms_of_w32fns (void) DEFSYM (Qzlib, "zlib"); DEFSYM (Qlcms2, "lcms2"); DEFSYM (Qjson, "json"); - DEFSYM (Qgccjit, "gccjit"); Fput (Qundefined_color, Qerror_conditions, pure_list (Qundefined_color, Qerror)); -- 2.39.5