Re: Decouple C++ support in Meson's PGXS from LLVM enablement - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Decouple C++ support in Meson's PGXS from LLVM enablement
Date
Msg-id 88e99b60-5188-470c-8174-f9c54b32fd32@eisentraut.org
Whole thread Raw
In response to Re: Decouple C++ support in Meson's PGXS from LLVM enablement  ("Jelte Fennema-Nio" <postgres@jeltef.nl>)
Responses Re: Decouple C++ support in Meson's PGXS from LLVM enablement
List pgsql-hackers
On 04.01.26 00:07, Jelte Fennema-Nio wrote:
> On Sat Jan 3, 2026 at 10:42 AM CET, Jelte Fennema-Nio wrote:
>> 3. Default to g++ instead of c++. I know I said I liked the c++ better,
>>    and I still do, but it seems better to align with autoconf for now
>>    and then change both of these later if we want to.
> 
> Apparently I had sent an outdated patch... And didn't actually include
> that. Fixed now.

This looks good to me.

There is an unfortunate cpp/cxx naming conflict.  For example, this 
seems very confusing:

     var_cpp = ' '.join(cc.cmd_array() + ['-E'])
     ...
     if have_cpp
       var_cxx = ' '.join(cpp.cmd_array())

Here, we use "cpp" to mean two different things in the space of a few lines.

Perhaps we should prefer to use the less ambiguous name "cxx" 
throughout.  So change

     +have_cpp = add_languages('cpp', required: false, native: false)
     +if have_cpp
     +  cpp = meson.get_compiler('cpp')
     +endif

to

     +have_cxx = add_languages('cpp', required: false, native: false)
     +if have_cxx
     +  cxx = meson.get_compiler('cpp')
     +endif

Then the potentially confusing use of "cpp" is contained in these two lines.




pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: A small problem when rehashing catalog cache
Next
From: Andrey Borodin
Date:
Subject: Re: GIN pageinspect support for entry tree and posting tree