mirror of
https://github.com/postgres/postgres.git
synced 2025-11-01 21:31:19 +03:00
meson: Restore implicit warning/debug/optimize flags for extensions
Meson uses warning/debug/optimize flags such as "-Wall", "-g", and "-O2" automatically based on "--warnlevel" and "--buildtype" options. And we use "--warning_level=1" and "--buildtype=debugoptimized" by default. But we need these flags for Makefile.global (for extensions) and pg_config, so we need to compute them manually based on the higher-level options. Without this change, extensions building using pgxs wouldn't get -Wall or optimization options. Author: Sutou Kouhei <kou@clear-code.com> Discussion: https://www.postgresql.org/message-id/flat/20240122.141139.931086145628347157.kou%40clear-code.com
This commit is contained in:
@@ -44,9 +44,9 @@ config_paths_data.set_quoted('MANDIR', dir_prefix / dir_man)
|
||||
|
||||
var_cc = ' '.join(cc.cmd_array())
|
||||
var_cpp = ' '.join(cc.cmd_array() + ['-E'])
|
||||
var_cflags = ' '.join(cflags + cflags_warn + get_option('c_args'))
|
||||
var_cflags = ' '.join(cflags + cflags_builtin + cflags_warn + get_option('c_args'))
|
||||
if llvm.found()
|
||||
var_cxxflags = ' '.join(cxxflags + cxxflags_warn + get_option('cpp_args'))
|
||||
var_cxxflags = ' '.join(cxxflags + cxxflags_builtin + cxxflags_warn + get_option('cpp_args'))
|
||||
else
|
||||
var_cxxflags = ''
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user