Skip to content

Commit d0b7a0b

Browse files
committed
headerscheck: Use LLVM_CPPFLAGS
Otherwise, headerscheck will fail if the LLVM headers are in a location not reached by the normal CFLAGS/CPPFLAGS. Discussion: https://www.postgresql.org/message-id/flat/b49e74d4-3cf9-4d1c-9dce-09f75e55d026%40eisentraut.org
1 parent d6ef8ee commit d0b7a0b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tools/pginclude/headerscheck

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ MGLOB="$builddir/src/Makefile.global"
4545
CPPFLAGS=`sed -n 's/^CPPFLAGS[ ]*=[ ]*//p' "$MGLOB"`
4646
CFLAGS=`sed -n 's/^CFLAGS[ ]*=[ ]*//p' "$MGLOB"`
4747
ICU_CFLAGS=`sed -n 's/^ICU_CFLAGS[ ]*=[ ]*//p' "$MGLOB"`
48+
LLVM_CPPFLAGS=`sed -n 's/^LLVM_CPPFLAGS[ ]*=[ ]*//p' "$MGLOB"`
4849
CC=`sed -n 's/^CC[ ]*=[ ]*//p' "$MGLOB"`
4950
CXX=`sed -n 's/^CXX[ ]*=[ ]*//p' "$MGLOB"`
5051
PG_SYSROOT=`sed -n 's/^PG_SYSROOT[ ]*=[ ]*//p' "$MGLOB"`
@@ -65,11 +66,11 @@ if $cplusplus; then
6566
-I*|-D*) CXXPPFLAGS="$CXXPPFLAGS $flag";;
6667
esac
6768
done
68-
COMPILER_FLAGS="$CXXPPFLAGS $CXXFLAGS $ICU_CFLAGS"
69+
COMPILER_FLAGS="$CXXPPFLAGS $CXXFLAGS $ICU_CFLAGS $LLVM_CPPFLAGS"
6970
else
7071
ext=c
7172
COMPILER=${CC:-gcc}
72-
COMPILER_FLAGS="$CPPFLAGS $CFLAGS $ICU_CFLAGS"
73+
COMPILER_FLAGS="$CPPFLAGS $CFLAGS $ICU_CFLAGS $LLVM_CPPFLAGS"
7374
fi
7475

7576
# Create temp directory.

0 commit comments

Comments
 (0)