Revert "Use -isystem for LLVM include directories"

This reverts commit 704ef84ef2.

The configure solution in that commit doesn't work if llvm-config
returns a system directory such as /usr/include.  The resulting
-isystem /usr/include puts the C headers before the C++ headers in the
include file order, which is not supposed to be done and causes
failures.  (Using -I /usr/include doesn't have that problem because it
is handled specially by the compiler.)  Per buildfarm members
hippopotamus and jay.

The meson solution does work because it specifically filters out
system includes.  This logic could theoretically be ported to
configure, but that would be a separate undertaking.
This commit is contained in:
Peter Eisentraut committed 2026-09-12 15:50:08 +02:00
1 parent 704ef84ef2
commit 7a0aa99e51
3 files changed
+5 -14

No files matched your search

+2 -5
View File
@@ -46,13 +46,10 @@ AC_DEFUN([PGAC_LLVM_SUPPORT],
# clear what the minimum version is.
# Collect compiler flags necessary to build the LLVM dependent
# shared library. The include directories are added with -isystem
# rather than -I, so that warnings from LLVM's own headers are not
# reported under the warning options we select for our own code.
# shared library.
for pgac_option in `$LLVM_CONFIG --cppflags`; do
case $pgac_option in
-I*) LLVM_CPPFLAGS="-isystem ${pgac_option#-I} $LLVM_CPPFLAGS";;
-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
-I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
esac
done
Vendored
+2 -5
View File
@@ -5105,13 +5105,10 @@ fi
# clear what the minimum version is.
# Collect compiler flags necessary to build the LLVM dependent
# shared library. The include directories are added with -isystem
# rather than -I, so that warnings from LLVM's own headers are not
# reported under the warning options we select for our own code.
# shared library.
for pgac_option in `$LLVM_CONFIG --cppflags`; do
case $pgac_option in
-I*) LLVM_CPPFLAGS="-isystem ${pgac_option#-I} $LLVM_CPPFLAGS";;
-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
-I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
esac
done
+1 -4
View File
@@ -924,10 +924,7 @@ endif
llvmopt = get_option('llvm')
llvm = not_found_dep
if have_cxx
# Use include_type 'system' so that warnings from LLVM's own headers are
# not reported under the warning options we select for our own code.
llvm = dependency('llvm', version: '>=14', method: 'config-tool',
include_type: 'system', required: llvmopt)
llvm = dependency('llvm', version: '>=14', method: 'config-tool', required: llvmopt)
if llvm.found()