1 /*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ 2 /* */ 3 /* Part of the LLVM Project, under the Apache License v2.0 with LLVM */ 4 /* Exceptions. */ 5 /* See https://llvm.org/LICENSE.txt for license information. */ 6 /* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception */ 7 /* */ 8 /*===----------------------------------------------------------------------===*/ 9 10 /* This file enumerates variables from the LLVM configuration so that they 11 can be in exported headers and won't override package specific directives. 12 This is a C header that can be included in the llvm-c headers. */ 13 14 #ifndef LLVM_CONFIG_H 15 #define LLVM_CONFIG_H 16 17 #if !defined(__i386__) && defined(_M_IX86) 18 #define __i386__ 1 19 #endif 20 21 #if !defined(__x86_64__) && (defined(_M_AMD64) || defined (_M_X64)) 22 #define __x86_64__ 1 23 #endif 24 25 #if !defined(__aarch64__) && (defined(_M_ARM64) || defined (_M_ARM64EC)) 26 #define __aarch64__ 1 27 #endif 28 29 #define LLVM_CONFIG_H 30 31 /* Define if LLVM_ENABLE_DUMP is enabled */ 32 /* #undef LLVM_ENABLE_DUMP */ 33 34 /* Target triple LLVM will generate code for by default */ 35 /* Doesn't use `cmakedefine` because it is allowed to be empty. */ 36 #if defined(__x86_64__) 37 #define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-pc-win32" 38 #elif defined(__i386__) 39 #define LLVM_DEFAULT_TARGET_TRIPLE "i686-pc-win32" 40 #elif defined(__arm__) 41 #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-pc-win32" 42 #elif defined(__aarch64__) 43 #define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-pc-win32" 44 #elif defined(__mips__) 45 #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-pc-win32" 46 #elif defined(__mips64) 47 #define LLVM_DEFAULT_TARGET_TRIPLE "mips64el-pc-win32" 48 #else 49 #error "unknown architecture" 50 #endif 51 52 /* Define if threads enabled */ 53 #define LLVM_ENABLE_THREADS 1 54 55 /* Has gcc/MSVC atomic intrinsics */ 56 #define LLVM_HAS_ATOMICS 1 57 58 /* Host triple LLVM will be executed on */ 59 #if defined(__x86_64__) 60 #define LLVM_HOST_TRIPLE "x86_64-pc-win32" 61 #elif defined(__i386__) 62 #define LLVM_HOST_TRIPLE "i686-pc-win32" 63 #elif defined(__arm__) 64 #define LLVM_HOST_TRIPLE "armv7-pc-win32" 65 #elif defined(__aarch64__) 66 #define LLVM_HOST_TRIPLE "aarch64-pc-win32" 67 #elif defined(__mips__) 68 #define LLVM_HOST_TRIPLE "mipsel-pc-win32" 69 #elif defined(__mips64) 70 #define LLVM_HOST_TRIPLE "mips64el-pc-win32" 71 #else 72 #error "unknown architecture" 73 #endif 74 75 /* LLVM architecture name for the native architecture, if available */ 76 #if defined(__aarch64__) 77 #define LLVM_NATIVE_ARCH AArch64 78 #elif defined(__arm__) 79 #define LLVM_NATIVE_ARCH ARM 80 #elif defined(__i386__) || defined(__x86_64__) 81 #define LLVM_NATIVE_ARCH X86 82 #elif defined(__mips__) 83 #define LLVM_NATIVE_ARCH Mips 84 #elif defined(__powerpc64__) 85 #define LLVM_NATIVE_ARCH PowerPC 86 #elif defined(__riscv) 87 #define LLVM_NATIVE_ARCH RISCV 88 #else 89 #error "unknown architecture" 90 #endif 91 92 /* LLVM name for the native AsmParser init function, if available */ 93 #if defined(__aarch64__) 94 #define LLVM_NATIVE_ASMPARSER LLVMInitializeAArch64AsmParser 95 #elif defined(__arm__) 96 #define LLVM_NATIVE_ASMPARSER LLVMInitializeARMAsmParser 97 #elif defined(__i386__) || defined(__x86_64__) 98 #define LLVM_NATIVE_ASMPARSER LLVMInitializeX86AsmParser 99 #elif defined(__mips__) 100 #define LLVM_NATIVE_ASMPARSER LLVMInitializeMipsAsmParser 101 #elif defined(__powerpc64__) 102 #define LLVM_NATIVE_ASMPARSER LLVMInitializePowerPCAsmParser 103 #elif defined(__riscv) 104 #define LLVM_NATIVE_ASMPARSER LLVMInitializeRISCVAsmParser 105 #else 106 #error "unknown architecture" 107 #endif 108 109 /* LLVM name for the native AsmPrinter init function, if available */ 110 #if defined(__aarch64__) 111 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeAArch64AsmPrinter 112 #elif defined(__arm__) 113 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeARMAsmPrinter 114 #elif defined(__i386__) || defined(__x86_64__) 115 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeX86AsmPrinter 116 #elif defined(__mips__) 117 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeMipsAsmPrinter 118 #elif defined(__powerpc64__) 119 #define LLVM_NATIVE_ASMPRINTER LLVMInitializePowerPCAsmPrinter 120 #elif defined(__riscv) 121 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeRISCVAsmPrinter 122 #else 123 #error "unknown architecture" 124 #endif 125 126 /* LLVM name for the native Disassembler init function, if available */ 127 #if defined(__aarch64__) 128 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeAArch64Disassembler 129 #elif defined(__arm__) 130 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeARMDisassembler 131 #elif defined(__i386__) || defined(__x86_64__) 132 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeX86Disassembler 133 #elif defined(__mips__) 134 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeMipsDisassembler 135 #elif defined(__powerpc64__) 136 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializePowerPCDisassembler 137 #elif defined(__riscv) 138 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeRISCVDisassembler 139 #else 140 #error "unknown architecture" 141 #endif 142 143 /* LLVM name for the native Target init function, if available */ 144 #if defined(__aarch64__) 145 #define LLVM_NATIVE_TARGET LLVMInitializeAArch64Target 146 #elif defined(__arm__) 147 #define LLVM_NATIVE_TARGET LLVMInitializeARMTarget 148 #elif defined(__i386__) || defined(__x86_64__) 149 #define LLVM_NATIVE_TARGET LLVMInitializeX86Target 150 #elif defined(__mips__) 151 #define LLVM_NATIVE_TARGET LLVMInitializeMipsTarget 152 #elif defined(__powerpc64__) 153 #define LLVM_NATIVE_TARGET LLVMInitializePowerPCTarget 154 #elif defined(__riscv) 155 #define LLVM_NATIVE_TARGET LLVMInitializeRISCVTarget 156 #else 157 #error "unknown architecture" 158 #endif 159 160 /* LLVM name for the native TargetInfo init function, if available */ 161 #if defined(__aarch64__) 162 #define LLVM_NATIVE_TARGETINFO LLVMInitializeAArch64TargetInfo 163 #elif defined(__arm__) 164 #define LLVM_NATIVE_TARGETINFO LLVMInitializeARMTargetInfo 165 #elif defined(__i386__) || defined(__x86_64__) 166 #define LLVM_NATIVE_TARGETINFO LLVMInitializeX86TargetInfo 167 #elif defined(__mips__) 168 #define LLVM_NATIVE_TARGETINFO LLVMInitializeMipsTargetInfo 169 #elif defined(__powerpc64__) 170 #define LLVM_NATIVE_TARGETINFO LLVMInitializePowerPCTargetInfo 171 #elif defined(__riscv) 172 #define LLVM_NATIVE_TARGETINFO LLVMInitializeRISCVTargetInfo 173 #else 174 #error "unknown architecture" 175 #endif 176 177 /* LLVM name for the native target MC init function, if available */ 178 #if defined(__aarch64__) 179 #define LLVM_NATIVE_TARGETMC LLVMInitializeAArch64TargetMC 180 #elif defined(__arm__) 181 #define LLVM_NATIVE_TARGETMC LLVMInitializeARMTargetMC 182 #elif defined(__i386__) || defined(__x86_64__) 183 #define LLVM_NATIVE_TARGETMC LLVMInitializeX86TargetMC 184 #elif defined(__mips__) 185 #define LLVM_NATIVE_TARGETMC LLVMInitializeMipsTargetMC 186 #elif defined(__powerpc64__) 187 #define LLVM_NATIVE_TARGETMC LLVMInitializePowerPCTargetMC 188 #elif defined(__riscv) 189 #define LLVM_NATIVE_TARGETMC LLVMInitializeRISCVTargetMC 190 #else 191 #error "unknown architecture" 192 #endif 193 194 /* LLVM name for the native target MCA init function, if available */ 195 /* #undef LLVM_NATIVE_TARGETMCA */ 196 197 /* Define if this is Unixish platform */ 198 /* #undef LLVM_ON_UNIX */ 199 200 /* Define if we have the Intel JIT API runtime support library */ 201 #define LLVM_USE_INTEL_JITEVENTS 0 202 203 /* Define if we have the oprofile JIT-support library */ 204 #define LLVM_USE_OPROFILE 0 205 206 /* Define if we have the perf JIT-support library */ 207 #define LLVM_USE_PERF 0 208 209 /* Major version of the LLVM API */ 210 #define LLVM_VERSION_MAJOR 16 211 212 /* Minor version of the LLVM API */ 213 #define LLVM_VERSION_MINOR 0 214 215 /* Patch version of the LLVM API */ 216 #define LLVM_VERSION_PATCH 0 217 218 /* LLVM version string */ 219 #define LLVM_VERSION_STRING "16.0.0" 220 221 /* Whether LLVM records statistics for use with GetStatistics(), 222 * PrintStatistics() or PrintStatisticsJSON() 223 */ 224 #define LLVM_FORCE_ENABLE_STATS 0 225 226 /* Define if we have z3 and want to build it */ 227 /* #undef LLVM_WITH_Z3 */ 228 229 /* Define if we have curl and want to use it */ 230 /* #undef LLVM_ENABLE_CURL */ 231 232 /* Define if we have cpp-httplib and want to use it */ 233 /* #undef LLVM_ENABLE_HTTPLIB */ 234 235 /* Define if zlib compression is available */ 236 #define LLVM_ENABLE_ZLIB 0 237 238 /* Define if zstd compression is available */ 239 #define LLVM_ENABLE_ZSTD 0 240 241 /* Define if LLVM is using tflite instead of libtensorflow */ 242 /* #undef LLVM_HAVE_TFLITE */ 243 244 /* Define to 1 if you have the <sysexits.h> header file. */ 245 /* #undef HAVE_SYSEXITS_H */ 246 247 /* Define if the xar_open() function is supported on this platform. */ 248 /* #undef LLVM_HAVE_LIBXAR */ 249 250 /* Define if building libLLVM shared library */ 251 /* #undef LLVM_BUILD_LLVM_DYLIB */ 252 253 /* Define if building LLVM with BUILD_SHARED_LIBS */ 254 /* #undef LLVM_BUILD_SHARED_LIBS */ 255 256 /* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */ 257 /* #undef LLVM_FORCE_USE_OLD_TOOLCHAIN */ 258 259 /* Define if llvm_unreachable should be optimized with undefined behavior 260 * in non assert builds */ 261 #define LLVM_UNREACHABLE_OPTIMIZE 1 262 263 /* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */ 264 #define LLVM_ENABLE_DIA_SDK 0 265 266 /* Define if plugins enabled */ 267 /* #undef LLVM_ENABLE_PLUGINS */ 268 269 #endif 270