agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use -isystem for LLVM include directories
Date: Sat, 12 Sep 2026 10:41:12 +0000
Message-ID: <E1x5LAW-000000000Vh-3ADo@gemulon.postgresql.org> (raw)
Use -isystem for LLVM include directories
LLVM's headers produce warnings under some of the warning options we
might like to use. For example, -Wshadow=local reports several
warnings from LLVM's headers when compiling llvmjit_inline.cpp. To
work around that, add the include directories reported by llvm-config
with -isystem rather than -I, which makes the compiler treat them as
system headers and not report warnings from them. In meson, this is a
built-in facility of the dependency() function, in configure we
implement it ourselves.
An alternative solution would have been to use "#pragma GCC
system_header", as is already done elsewhere in the tree. But that
seems less elegant here. Either, we would have to potentially create
a separate wrapper for each LLVM header, or we would have to route all
LLVM includes through a common header, which would break modularity.
Reviewed-by: Peter Geoghegan <pg@bowt.ie>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/84b6f128-91f5-480e-8a9e-7d0e8f538cea%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/704ef84ef232e02e241071b2faf0541d155c6b62
Modified Files
--------------
config/llvm.m4 | 7 +++++--
configure | 7 +++++--
meson.build | 5 ++++-
3 files changed, 14 insertions(+), 5 deletions(-)
Message-ID: <E1x5LAW-000000000Vh-3ADo@gemulon.postgresql.org>
Permalink: ../E1x5LAW-000000000Vh-3ADo@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x5LAW-000000000Vh-3ADo@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use -isystem for LLVM include directories
In-Reply-To: <E1x5LAW-000000000Vh-3ADo@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox