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 #if defined(__x86_64__) 36 #define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-pc-win32" 37 #elif defined(__i386__) 38 #define LLVM_DEFAULT_TARGET_TRIPLE "i686-pc-win32" 39 #elif defined(__arm__) 40 #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-pc-win32" 41 #elif defined(__aarch64__) 42 #define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-pc-win32" 43 #elif defined(__mips__) 44 #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-pc-win32" 45 #elif defined(__mips64) 46 #define LLVM_DEFAULT_TARGET_TRIPLE "mips64el-pc-win32" 47 #else 48 #error "unknown architecture" 49 #endif 50 51 /* Define if threads enabled */ 52 #define LLVM_ENABLE_THREADS 1 53 54 /* Has gcc/MSVC atomic intrinsics */ 55 #define LLVM_HAS_ATOMICS 1 56 57 /* Host triple LLVM will be executed on */ 58 #if defined(__x86_64__) 59 #define LLVM_HOST_TRIPLE "x86_64-pc-win32" 60 #elif defined(__i386__) 61 #define LLVM_HOST_TRIPLE "i686-pc-win32" 62 #elif defined(__arm__) 63 #define LLVM_HOST_TRIPLE "armv7-pc-win32" 64 #elif defined(__aarch64__) 65 #define LLVM_HOST_TRIPLE "aarch64-pc-win32" 66 #elif defined(__mips__) 67 #define LLVM_HOST_TRIPLE "mipsel-pc-win32" 68 #elif defined(__mips64) 69 #define LLVM_HOST_TRIPLE "mips64el-pc-win32" 70 #else 71 #error "unknown architecture" 72 #endif 73 74 /* LLVM architecture name for the native architecture, if available */ 75 #if defined(__aarch64__) 76 #define LLVM_NATIVE_ARCH AArch64 77 #elif defined(__arm__) 78 #define LLVM_NATIVE_ARCH ARM 79 #elif defined(__i386__) || defined(__x86_64__) 80 #define LLVM_NATIVE_ARCH X86 81 #elif defined(__mips__) 82 #define LLVM_NATIVE_ARCH Mips 83 #elif defined(__powerpc64__) 84 #define LLVM_NATIVE_ARCH PowerPC 85 #else 86 #error "unknown architecture" 87 #endif 88 89 /* LLVM name for the native AsmParser init function, if available */ 90 #if defined(__aarch64__) 91 #define LLVM_NATIVE_ASMPARSER LLVMInitializeAArch64AsmParser 92 #elif defined(__arm__) 93 #define LLVM_NATIVE_ASMPARSER LLVMInitializeARMAsmParser 94 #elif defined(__i386__) || defined(__x86_64__) 95 #define LLVM_NATIVE_ASMPARSER LLVMInitializeX86AsmParser 96 #elif defined(__mips__) 97 #define LLVM_NATIVE_ASMPARSER LLVMInitializeMipsAsmParser 98 #elif defined(__powerpc64__) 99 #define LLVM_NATIVE_ASMPARSER LLVMInitializePowerPCAsmParser 100 #else 101 #error "unknown architecture" 102 #endif 103 104 /* LLVM name for the native AsmPrinter init function, if available */ 105 #if defined(__aarch64__) 106 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeAArch64AsmPrinter 107 #elif defined(__arm__) 108 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeARMAsmPrinter 109 #elif defined(__i386__) || defined(__x86_64__) 110 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeX86AsmPrinter 111 #elif defined(__mips__) 112 #define LLVM_NATIVE_ASMPRINTER LLVMInitializeMipsAsmPrinter 113 #elif defined(__powerpc64__) 114 #define LLVM_NATIVE_ASMPRINTER LLVMInitializePowerPCAsmPrinter 115 #else 116 #error "unknown architecture" 117 #endif 118 119 /* LLVM name for the native Disassembler init function, if available */ 120 #if defined(__aarch64__) 121 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeAArch64Disassembler 122 #elif defined(__arm__) 123 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeARMDisassembler 124 #elif defined(__i386__) || defined(__x86_64__) 125 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeX86Disassembler 126 #elif defined(__mips__) 127 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializeMipsDisassembler 128 #elif defined(__powerpc64__) 129 #define LLVM_NATIVE_DISASSEMBLER LLVMInitializePowerPCDisassembler 130 #else 131 #error "unknown architecture" 132 #endif 133 134 /* LLVM name for the native Target init function, if available */ 135 #if defined(__aarch64__) 136 #define LLVM_NATIVE_TARGET LLVMInitializeAArch64Target 137 #elif defined(__arm__) 138 #define LLVM_NATIVE_TARGET LLVMInitializeARMTarget 139 #elif defined(__i386__) || defined(__x86_64__) 140 #define LLVM_NATIVE_TARGET LLVMInitializeX86Target 141 #elif defined(__mips__) 142 #define LLVM_NATIVE_TARGET LLVMInitializeMipsTarget 143 #elif defined(__powerpc64__) 144 #define LLVM_NATIVE_TARGET LLVMInitializePowerPCTarget 145 #else 146 #error "unknown architecture" 147 #endif 148 149 /* LLVM name for the native TargetInfo init function, if available */ 150 #if defined(__aarch64__) 151 #define LLVM_NATIVE_TARGETINFO LLVMInitializeAArch64TargetInfo 152 #elif defined(__arm__) 153 #define LLVM_NATIVE_TARGETINFO LLVMInitializeARMTargetInfo 154 #elif defined(__i386__) || defined(__x86_64__) 155 #define LLVM_NATIVE_TARGETINFO LLVMInitializeX86TargetInfo 156 #elif defined(__mips__) 157 #define LLVM_NATIVE_TARGETINFO LLVMInitializeMipsTargetInfo 158 #elif defined(__powerpc64__) 159 #define LLVM_NATIVE_TARGETINFO LLVMInitializePowerPCTargetInfo 160 #else 161 #error "unknown architecture" 162 #endif 163 164 /* LLVM name for the native target MC init function, if available */ 165 #if defined(__aarch64__) 166 #define LLVM_NATIVE_TARGETMC LLVMInitializeAArch64TargetMC 167 #elif defined(__arm__) 168 #define LLVM_NATIVE_TARGETMC LLVMInitializeARMTargetMC 169 #elif defined(__i386__) || defined(__x86_64__) 170 #define LLVM_NATIVE_TARGETMC LLVMInitializeX86TargetMC 171 #elif defined(__mips__) 172 #define LLVM_NATIVE_TARGETMC LLVMInitializeMipsTargetMC 173 #elif defined(__powerpc64__) 174 #define LLVM_NATIVE_TARGETMC LLVMInitializePowerPCTargetMC 175 #else 176 #error "unknown architecture" 177 #endif 178 179 /* Define if this is Unixish platform */ 180 /* #undef LLVM_ON_UNIX */ 181 182 /* Define if we have the Intel JIT API runtime support library */ 183 #define LLVM_USE_INTEL_JITEVENTS 0 184 185 /* Define if we have the oprofile JIT-support library */ 186 #define LLVM_USE_OPROFILE 0 187 188 /* Define if we have the perf JIT-support library */ 189 #define LLVM_USE_PERF 0 190 191 /* Major version of the LLVM API */ 192 #define LLVM_VERSION_MAJOR 10 193 194 /* Minor version of the LLVM API */ 195 #define LLVM_VERSION_MINOR 0 196 197 /* Patch version of the LLVM API */ 198 #define LLVM_VERSION_PATCH 0 199 200 /* LLVM version string */ 201 #define LLVM_VERSION_STRING "10.0.0" 202 203 /* Whether LLVM records statistics for use with GetStatistics(), 204 * PrintStatistics() or PrintStatisticsJSON() 205 */ 206 #define LLVM_FORCE_ENABLE_STATS 0 207 208 #endif 209