Re: Bugs in ecpg's macro mechanism

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Bugs in ecpg's macro mechanism
Дата
Msg-id 20240416010544.tsupdybl752vywkw@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Bugs in ecpg's macro mechanism  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bugs in ecpg's macro mechanism  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2024-04-15 20:47:16 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2024-04-15 17:48:32 -0400, Tom Lane wrote:
> >> But I have no idea about making it work in meson.  Any suggestions?
> 
> > So you just want to compile define.c twice? The below should suffice:
> 
> > -  'define': ['-DCMDLINESYM=123'],
> > +  'define': ['-DCMDLINESYM=123', files('define.pgc')],
> 
> Ah, thanks.  I guess this depends on getopt_long reordering arguments
> (since the "-o outfile" bit will come later).  That is safe enough
> in HEAD since 411b72034, but it might fail on weird platforms in v16.
> How much do we care about that?  (We can avoid that hazard in the
> makefile build easily enough.)

Oh, I didn't even think of that. If we do care, we can just move the -o to
earlier. Or just officially add it as another input, that'd just be a bit of
notational overhead.

As moving the arguments around would just be the following, I see no reason to
just do so.

diff --git i/src/interfaces/ecpg/test/meson.build w/src/interfaces/ecpg/test/meson.build
index c1e508ccc82..d7c0e9de7d6 100644
--- i/src/interfaces/ecpg/test/meson.build
+++ w/src/interfaces/ecpg/test/meson.build
@@ -45,9 +45,10 @@ ecpg_preproc_test_command_start = [
   '--regression',
   '-I@CURRENT_SOURCE_DIR@',
   '-I@SOURCE_ROOT@' + '/src/interfaces/ecpg/include/',
+  '-o', '@OUTPUT@',
 ]
 ecpg_preproc_test_command_end = [
-  '-o', '@OUTPUT@', '@INPUT@'
+  '@INPUT@',
 ]
 
 ecpg_test_dependencies = []


Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: What's our minimum ninja version?
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Differential code coverage between 16 and HEAD