1 #-------------------------------------------------------------------------
4 # Makefile the LLVM JIT provider, building it into a shared library.
6 # Note that this file is recursed into from src/Makefile, not by the
10 # src/backend/jit/llvm/Makefile
12 #-------------------------------------------------------------------------
14 subdir
= src
/backend
/jit
/llvm
15 top_builddir
= ..
/..
/..
/..
16 include $(top_builddir
)/src
/Makefile.global
18 ifneq ($(with_llvm
), yes
)
19 $(error
"not building with LLVM support")
22 PGFILEDESC
= "llvmjit - JIT using LLVM"
25 # LLVM 14 produces deprecation warnings. We'll need to make some changes
26 # before the relevant functions are removed, but for now silence the warnings.
28 LLVM_CFLAGS
+= -Wno-deprecated-declarations
31 # All files in this directory use LLVM.
32 CFLAGS
+= $(LLVM_CFLAGS
)
33 CXXFLAGS
+= $(LLVM_CXXFLAGS
)
34 override CPPFLAGS
:= $(LLVM_CPPFLAGS
) $(CPPFLAGS
)
35 SHLIB_LINK
+= $(LLVM_LIBS
)
37 # Because this module includes C++ files, we need to use a C++
38 # compiler for linking. Makefile.shlib uses $(COMPILER) to build
40 override COMPILER
= $(CXX
) $(CXXFLAGS
)
51 SectionMemoryManager.o
58 all: all-shared-lib llvmjit_types.bc
60 install: all installdirs install-lib install-types
62 installdirs: installdirs-lib
64 uninstall: uninstall-lib uninstall-types
66 # Note this is intentionally not in bitcodedir, as it's not for inlining */
67 install-types
: llvmjit_types.bc
68 $(INSTALL_DATA
) llvmjit_types.bc
'$(DESTDIR)$(pkglibdir)'
71 rm -f
'$(DESTDIR)$(pkglibdir)/llvmjit_types.bc'
73 include $(top_srcdir
)/src
/Makefile.shlib
75 clean distclean: clean-lib
77 rm -f llvmjit_types.bc