From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by sourceware.org (Postfix) with ESMTPS id A1A7C3858401 for ; Sat, 14 Oct 2023 07:04:48 +0000 (GMT) ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A1A7C3858401 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.70.183.198 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697267090; cv=none; b=O9fGPhKb3UJaKn//lPH9KjQAQTRE9e6hqs7kb2bJWWebzQO1v12GoQ9T2Q9T25qLJXlj9ayuBCJtwYtDU0vWLG2Ue2NV/yzSOhvpxCxo/n3bg9kEF9Mi2sUyZb2e+2xLTYLFteKrUYQgXXr5l1VkTS+eCn+zvgHKJEQjLKk2NHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697267090; c=relaxed/simple; bh=KMf8LmZe+G9XaNgC/8z+Awx/CTfZw0QwRPwKruOa31Y=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=YpYLCgEqueP6y22/jN7t2xHl0cvhDHdk3gT2AI43wU2EOr2mjmMP2vkO7D80oO06H3t9qjiWmo5Dc0RrMrhC0wQv4eZuM76ARlkbUqVNXHP20OeP7MBiVJXBN63G5VE8J+o/0rvtPFXYdGpvqbxhvE+TCyLzjfKt9Q56YzGTHuw= ARC-Authentication-Results: i=1; server2.sourceware.org DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1A7C3858401 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=starynkevitch.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=starynkevitch.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 794FCC0004; Sat, 14 Oct 2023 07:04:46 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------g0eWrNgVFjG1ptj0wqG0aKbq" Message-ID: Date: Sat, 14 Oct 2023 09:04:45 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Add debug stream parameter to init_jit() Content-Language: en-US To: =?UTF-8?Q?Paulo_C=C3=A9sar_Pereira_de_Andrade?= , Paul Cercueil Cc: lightning , "team@refpersys.org" , jit@gcc.gnu.org References: <20231011154753.50583-1-paul@crapouillou.net> From: Basile Starynkevitch In-Reply-To: X-GND-Sasl: basile@starynkevitch.net X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,BODY_8BITS,GIT_PATCH_0,HTML_MESSAGE,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------g0eWrNgVFjG1ptj0wqG0aKbq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/13/23 20:15, Paulo César Pereira de Andrade wrote: > Hi Paul. Please sendo the v2 and I will apply the patch during the > weekend. > > Em qua, 11 de out de 2023 12:57, Paul Cercueil > escreveu: > > Ooops, I missed to update the source files in check/. > > I'll send a V2. > > -Paul > > Le mercredi 11 octobre 2023 à 17:47 +0200, Paul Cercueil a écrit : > > Allow specifying where Lightning's messages and disassembly will be > > printed, instead of inconditionally using the error output. > > diff --git a/include/lightning.h.in > b/include/lightning.h.in > > index 6d51235..25f685b 100644 > > --- a/include/lightning.h.in > > +++ b/include/lightning.h.in > > @@ -23,6 +23,7 @@ > >  #include > >  #include > >  @MAYBE_INCLUDE_STDINT_H@ > > +#include > >  #include > >  #include > > > > @@ -1220,7 +1221,7 @@ typedef void > > (*jit_free_func_ptr)        (void*); > >  /* > >   * Prototypes > >   */ > > -extern void init_jit(const char*); > > +extern void init_jit(const char*,FILE*); > >  extern void finish_jit(void); > > > This patch is interesting and provides an interesting feature. However, it is changing the public API of GNU lightning in an incompatible way. For projects (like the RefPerSys open source inference engine on https://github.com/RefPerSys/RefPerSys/ ....) which are using GNU lightning it would be very convenient to have a preprocessor convention (inspired by libgccjit on https://gcc.gnu.org/onlinedocs/jit/ ...) which enables users of GNU lightning to test it. What about adding in include/lightning.h.in some preprocessor symbols like #define LIB_LIGHTNING_API 1 and increment that number every time the external API of GNU lightning is changing? This would make using GNU lightning easier. Thanks -- Basile Starynkevitch (only mine opinions / les opinions sont miennes uniquement) 92340 Bourg-la-Reine, France web page: starynkevitch.net/Basile/ --------------g0eWrNgVFjG1ptj0wqG0aKbq--