Silence LLVM 14 API deprecation warnings.
authorThomas Munro <tmunro@postgresql.org>
Tue, 15 Mar 2022 21:30:55 +0000 (10:30 +1300)
committerThomas Munro <tmunro@postgresql.org>
Tue, 15 Mar 2022 21:30:55 +0000 (10:30 +1300)
We are going to need to handle the upcoming opaque pointer API
changes[1], possibly in time for LLVM 15, but in the meantime let's
silence the warnings produced by LLVM 14.

[1] https://llvm.org/docs/OpaquePointers.html

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKG%2Bp%3DfaBQR2PSAqWoWa%2B_tJdKPT0wjZPQe7XcDEttUCgdQ%40mail.gmail.com

src/backend/jit/llvm/Makefile

index 0268bd46d5c00068d6645dc9c502dcf8e29764c3..2da122a391e587f62eb5d7c48b23b1da2b957fff 100644 (file)
@@ -22,6 +22,12 @@ endif
 PGFILEDESC = "llvmjit - JIT using LLVM"
 NAME = llvmjit
 
+# LLVM 14 produces deprecation warnings.  We'll need to make some changes
+# before the relevant functions are removed, but for now silence the warnings.
+ifeq ($(GCC), yes)
+LLVM_CFLAGS += -Wno-deprecated-declarations
+endif
+
 # All files in this directory use LLVM.
 CFLAGS += $(LLVM_CFLAGS)
 CXXFLAGS += $(LLVM_CXXFLAGS)