PostgreSQL Source Code git master
llvmjit_backport.h
Go to the documentation of this file.
1/*
2 * A small header than can be included by backported LLVM code or PostgreSQL
3 * code, to control conditional compilation.
4 */
5#ifndef LLVMJIT_BACKPORT_H
6#define LLVMJIT_BACKPORT_H
7
8#include <llvm/Config/llvm-config.h>
9
10/*
11 * LLVM's RuntimeDyld can produce code that crashes on larger memory ARM
12 * systems, because llvm::SectionMemoryManager allocates multiple pieces of
13 * memory that can be placed too far apart for the generated code. See
14 * src/backend/jit/llvm/SectionMemoryManager.cpp for the patched replacement
15 * class llvm::backport::SectionMemoryManager that we use as a workaround.
16 * This header controls whether we use it.
17 */
18#if defined(__aarch64__)
19#define USE_LLVM_BACKPORT_SECTION_MEMORY_MANAGER
20#endif
21
22#endif