RE: [RFC] building postgres with meson - v13

From: "wangw(dot)fnst(at)fujitsu(dot)com" <wangw(dot)fnst(at)fujitsu(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, samay sharma <smilingsamay(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: [RFC] building postgres with meson - v13
Date: 2022-09-26 06:24:42
Message-ID: OS3PR01MB6275B9378C371F590978E3C49E529@OS3PR01MB6275.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I tried to use meson and ninja and they are really efficient.
But when I tried to specify "c_args", it did not take effect.

Attached my steps:
[In the HEAD (7d708093b7)]
$ meson setup build --prefix /home/wangw/install/parallel_apply/ -Dcassert=true -Dtap_tests=enabled -Dicu=enabled -Dc_args='-fno-omit-frame-pointer'

Log:
......
Compiler Flags
CPP FLAGS : -D_GNU_SOURCE
C FLAGS, functional: -fno-strict-aliasing -fwrapv -fexcess-precision=standard
C FLAGS, warnings : -Wmissing-prototypes -Wpointer-arith -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -Wdeclaration-after-statement -Wno-format-truncation -Wno-stringop-truncation
......

After I made the below modifications, the specified "c_args" took effect.
```
@@ -2439,6 +2439,10 @@ endif

# Set up compiler / linker arguments to be used everywhere, individual targets
# can add further args directly, or indirectly via dependencies
+
+tmp_c_args = get_option('c_args')
+cflags += tmp_c_args
+
add_project_arguments(cflags, language: ['c'])
add_project_arguments(cppflags, language: ['c'])
add_project_arguments(cflags_warn, language: ['c'])
```

I might missed something. Just to confirm is there another way to add CFLAG ?

Regards,
Wang wei

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-09-26 06:25:44 Re: Fix typos in code comments
Previous Message bt22nakamorit 2022-09-26 06:12:46 Differentiate MERGE queries with different structures