Refactor ExecScan() to allow inlining of its core logic
[pgsql.git] / src / backend / jit / llvm / Makefile
blobe8c12060b93df115fa2136f2862a09168d7063db
1 #-------------------------------------------------------------------------
3 # Makefile--
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
7 # parent directory..
9 # IDENTIFICATION
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")
20 endif
22 PGFILEDESC = "llvmjit - JIT using LLVM"
23 NAME = llvmjit
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.
27 ifeq ($(GCC), yes)
28 LLVM_CFLAGS += -Wno-deprecated-declarations
29 endif
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
39 # loadable modules.
40 override COMPILER = $(CXX) $(CXXFLAGS)
42 OBJS = \
43 $(WIN32RES)
45 # Infrastructure
46 OBJS += \
47 llvmjit.o \
48 llvmjit_error.o \
49 llvmjit_inline.o \
50 llvmjit_wrap.o \
51 SectionMemoryManager.o
53 # Code generation
54 OBJS += \
55 llvmjit_deform.o \
56 llvmjit_expr.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)'
70 uninstall-types:
71 rm -f '$(DESTDIR)$(pkglibdir)/llvmjit_types.bc'
73 include $(top_srcdir)/src/Makefile.shlib
75 clean distclean: clean-lib
76 rm -f $(OBJS)
77 rm -f llvmjit_types.bc