aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/jit/llvm/llvmjit_wrap.cpp2
-rw-r--r--src/include/jit/llvmjit.h2
-rw-r--r--src/include/pg_config.h.in4
-rw-r--r--src/include/pg_config.h.win324
4 files changed, 12 insertions, 0 deletions
diff --git a/src/backend/jit/llvm/llvmjit_wrap.cpp b/src/backend/jit/llvm/llvmjit_wrap.cpp
index 5d1a17cde04..4d0c3f680ff 100644
--- a/src/backend/jit/llvm/llvmjit_wrap.cpp
+++ b/src/backend/jit/llvm/llvmjit_wrap.cpp
@@ -32,6 +32,7 @@ char *LLVMGetHostCPUName(void) {
#endif
+#if defined(HAVE_DECL_LLVMGETHOSTCPUFEATURES) && !HAVE_DECL_LLVMGETHOSTCPUFEATURES
char *LLVMGetHostCPUFeatures(void) {
llvm::SubtargetFeatures Features;
llvm::StringMap<bool> HostFeatures;
@@ -42,3 +43,4 @@ char *LLVMGetHostCPUFeatures(void) {
return strdup(Features.getString().c_str());
}
+#endif
diff --git a/src/include/jit/llvmjit.h b/src/include/jit/llvmjit.h
index b0093db49d7..c81cff8a35f 100644
--- a/src/include/jit/llvmjit.h
+++ b/src/include/jit/llvmjit.h
@@ -125,9 +125,11 @@ extern LLVMValueRef slot_compile_deform(struct LLVMJitContext *context, TupleDes
extern char *LLVMGetHostCPUName(void);
#endif
+#if defined(HAVE_DECL_LLVMGETHOSTCPUFEATURES) && !HAVE_DECL_LLVMGETHOSTCPUFEATURES
/** Get the host CPU features as a string. The result needs to be disposed
with LLVMDisposeMessage. */
extern char *LLVMGetHostCPUFeatures(void);
+#endif
#ifdef __cplusplus
} /* extern "C" */
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 32535fb54cb..be9d5647c1e 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -142,6 +142,10 @@
`LLVMCreatePerfJITEventListener', and to 0 if you don't. */
#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
+/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to
+ 0 if you don't. */
+#undef HAVE_DECL_LLVMGETHOSTCPUFEATURES
+
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
if you don't. */
#undef HAVE_DECL_LLVMGETHOSTCPUNAME
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32
index 082f3c16079..0c505d67e0d 100644
--- a/src/include/pg_config.h.win32
+++ b/src/include/pg_config.h.win32
@@ -119,6 +119,10 @@
if you don't. */
#define HAVE_DECL_LLVMGETHOSTCPUNAME 0
+/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to 0
+ if you don't. */
+#define HAVE_DECL_LLVMGETHOSTCPUFEATURES 0
+
/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and
to 0 if you don't. */
#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0