Skip to content

Commit 1330dcd

Browse files
committed
meson: Include CFLAGS/c_args in summary and pg_config output
Previously arguments passed in via CFLAGS/-Dc_args were neither displayed in meson's summary, nor in pg_config's output. Reported-by: "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS3PR01MB62751847BC9CD2DB7B29AC129E529@OS3PR01MB6275.jpnprd01.prod.outlook.com
1 parent 78fdb1e commit 1330dcd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,6 +2966,9 @@ if meson.version().version_compare('>=0.57')
29662966
'CPP FLAGS': ' '.join(cppflags),
29672967
'C FLAGS, functional': ' '.join(cflags),
29682968
'C FLAGS, warnings': ' '.join(cflags_warn),
2969+
'C FLAGS, modules': ' '.join(cflags_mod),
2970+
'C FLAGS, user specified': ' '.join(get_option('c_args')),
2971+
'LD FLAGS': ' '.join(ldflags + get_option('c_link_args')),
29692972
},
29702973
section: 'Compiler Flags',
29712974
)
@@ -2982,6 +2985,7 @@ if meson.version().version_compare('>=0.57')
29822985
{
29832986
'C++ FLAGS, functional': ' '.join(cxxflags),
29842987
'C++ FLAGS, warnings': ' '.join(cxxflags_warn),
2988+
'C++ FLAGS, user specified': ' '.join(get_option('cpp_args')),
29852989
},
29862990
section: 'Compiler Flags',
29872991
)

src/include/meson.build

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ config_paths_data.set_quoted('MANDIR', dir_prefix / dir_man)
4242

4343
var_cc = ' '.join(cc.cmd_array())
4444
var_cpp = ' '.join(cc.cmd_array() + ['-E'])
45-
var_cflags = ' '.join(cflags + cflags_warn)
46-
var_cxxflags = ' '.join(cxxflags + cxxflags_warn)
45+
var_cflags = ' '.join(cflags + cflags_warn + get_option('c_args'))
46+
if llvm.found()
47+
var_cxxflags = ' '.join(cxxflags + cxxflags_warn + get_option('cpp_args'))
48+
else
49+
var_cxxflags = ''
50+
endif
4751
var_cppflags = ' '.join(cppflags)
4852
var_cflags_sl = '-fPIC' #FIXME
49-
var_ldflags = ' '.join(ldflags)
53+
var_ldflags = ' '.join(ldflags + get_option('c_link_args'))
5054
var_ldflags_sl = ''.join(ldflags_sl)
5155
var_ldflags_ex = '' # FIXME
5256
# FIXME - some extensions might directly use symbols from one of libs. If

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy