Re: [meson] expose buildtype debug/optimization info to pg_config

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [meson] expose buildtype debug/optimization info to pg_config
Дата
Msg-id f50374cc-2086-4fe8-bb3e-a59bf6bab44d@eisentraut.org
обсуждение исходный текст
Ответ на Re: [meson] expose buildtype debug/optimization info to pg_config  (Junwang Zhao <zhjwpku@gmail.com>)
Список pgsql-hackers
On 14.12.23 10:24, Junwang Zhao wrote:
> On Thu, Dec 14, 2023 at 4:50 PM Peter Eisentraut <peter@eisentraut.org> wrote:
>>
>> On 12.12.23 11:40, Junwang Zhao wrote:
>>> build system using configure set VAL_CFLAGS with debug and
>>> optimization flags, so pg_config will show these infos. Some
>>> extensions depend on the mechanism.
>>>
>>> This patch exposes these flags with a typo fixed together.
>>
>> I have committed the typo fix.
>>
>> But I would like to learn more about the requirements of extensions in
>> this area.  This seems a bit suspicious to me.
> 
> This is what I found when building citus against an installation
> of meson debug build pg instance, since the CFLAGS doesn't
> contain -g flag, the binary doesn't include the debug information,
> which is different behavior from configure building system.

Ok, that makes sense.

I think a better place to add those options would the variable 
var_cflags, which are the combined C flags that we export to 
Makefile.global and pg_config.  The cflags variable that you used is 
more for internal use, for passing to the actual compilation commands, 
so adding more options there would be duplicative.

And then set var_cxxflags as well.

Maybe you should also check whether the compiler takes unix-style 
arguments, perhaps using cc.get_argument_syntax().




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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Bug in nbtree optimization to skip > operator comparisons (or < comparisons in backwards scans)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: No LINGUAS file yet for pg_combinebackup