We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentb0c5da6 commitcb92520Copy full SHA for cb92520
config/llvm.m4
@@ -95,7 +95,7 @@ AC_DEFUN([PGAC_LLVM_SUPPORT],
95
SAVE_CPPFLAGS="$CPPFLAGS"
96
CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
97
AC_CHECK_DECLS([LLVMOrcGetSymbolAddressIn],[],[],[[#include <llvm-c/OrcBindings.h>]])
98
-AC_CHECK_DECLS([LLVMGetHostCPUName],[],[],[[#include <llvm-c/TargetMachine.h>]])
+AC_CHECK_DECLS([LLVMGetHostCPUName, LLVMGetHostCPUFeatures],[],[],[[#include <llvm-c/TargetMachine.h>]])
99
AC_CHECK_DECLS([LLVMCreateGDBRegistrationListener, LLVMCreatePerfJITEventListener],[],[],[[#include <llvm-c/ExecutionEngine.h>]])
100
CPPFLAGS="$SAVE_CPPFLAGS"
101
configure
@@ -5203,6 +5203,17 @@ fi
5203
5204
cat >>confdefs.h <<_ACEOF
5205
#define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
5206
+_ACEOF
5207
+ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
5208
+"
5209
+if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
5210
+ ac_have_decl=1
5211
+else
5212
+ ac_have_decl=0
5213
+fi
5214
+
5215
+cat >>confdefs.h <<_ACEOF
5216
+#define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
5217
_ACEOF
5218
5219
ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
src/backend/jit/llvm/llvmjit_wrap.cpp
@@ -32,6 +32,7 @@ char *LLVMGetHostCPUName(void) {
32
#endif
33
34
35
+#if defined(HAVE_DECL_LLVMGETHOSTCPUFEATURES) && !HAVE_DECL_LLVMGETHOSTCPUFEATURES
36
char *LLVMGetHostCPUFeatures(void) {
37
llvm::SubtargetFeatures Features;
38
llvm::StringMap<bool> HostFeatures;
@@ -42,3 +43,4 @@ char *LLVMGetHostCPUFeatures(void) {
42
43
44
returnstrdup(Features.getString().c_str());
45
}
46
+#endif
src/include/jit/llvmjit.h
@@ -125,9 +125,11 @@ extern LLVMValueRef slot_compile_deform(struct LLVMJitContext *context, TupleDes
125
externchar*LLVMGetHostCPUName(void);
126
127
128
+#if defined(HAVE_DECL_LLVMGETHOSTCPUFEATURES)&& !HAVE_DECL_LLVMGETHOSTCPUFEATURES
129
/** Get the host CPU features as a string. The result needs to be disposed
130
with LLVMDisposeMessage. */
131
externchar*LLVMGetHostCPUFeatures(void);
132
133
134
#ifdef__cplusplus
135
}/* extern "C" */
src/include/pg_config.h.in
@@ -142,6 +142,10 @@
142
`LLVMCreatePerfJITEventListener', and to 0 if you don't. */
143
#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
144
145
+/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to
146
+ 0 if you don't. */
147
+#undef HAVE_DECL_LLVMGETHOSTCPUFEATURES
148
149
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
150
if you don't. */
151
#undef HAVE_DECL_LLVMGETHOSTCPUNAME
src/include/pg_config.h.win32
@@ -119,6 +119,10 @@
119
120
#define HAVE_DECL_LLVMGETHOSTCPUNAME 0
121
122
+/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to 0
123
+ if you don't. */
124
+#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