On 14.12.23 10:24, Junwang Zhao wrote:
On Thu, Dec 14, 2023 at 4:50 PM Peter Eisentraut <pe...@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().



Reply via email to